diff --git a/chaos/chaos-api/pom.xml b/chaos/chaos-api/pom.xml new file mode 100644 index 000000000..551a64cf6 --- /dev/null +++ b/chaos/chaos-api/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + run.mone + chaos + 1.4.0-jdk21-SNAPSHOT + + + chaos-api + + + 21 + 21 + UTF-8 + + + \ No newline at end of file diff --git a/chaos/chaos-service/pom.xml b/chaos/chaos-service/pom.xml new file mode 100644 index 000000000..5259ed09b --- /dev/null +++ b/chaos/chaos-service/pom.xml @@ -0,0 +1,224 @@ + + + 4.0.0 + + run.mone + chaos + 1.4.0-jdk21-SNAPSHOT + + + chaos-service + + + 21 + 21 + + + + + io.grpc + grpc-netty + 1.60.0 + + + io.grpc + grpc-protobuf + 1.60.0 + + + io.grpc + grpc-stub + 1.60.0 + + + + org.apache.commons + commons-compress + 1.21 + + + + run.mone + docean + 1.5.0-jdk21-SNAPSHOT + + + + + run.mone + docean-plugin-k8s + 1.4-SNAPSHOT + + + + run.mone + docean-plugin-configuration + 1.4-SNAPSHOT + + + + run.mone + docean-plugin-dubbo + + + + run.mone + dubbo + + + + org.apache.commons + commons-lang3 + + + + mi-tpclogin-sdk + run.mone + 1.0.0-SNAPSHOT + + + + run.mone + mi-tpc-api + 1.0.0 + + + + ch.qos.logback + logback-classic + 1.1.2 + + + + ch.qos.logback + logback-core + 1.1.2 + + + + org.projectlombok + lombok + + + + run.mone + nacos + 1.4-SNAPSHOT + + + nacos-client + com.alibaba.nacos + + + + + + run.mone + nacos-client + 1.2.1-mone-v3-SNAPSHOT + + + + com.fasterxml.jackson.core + jackson-databind + + + + com.fasterxml.jackson.core + jackson-core + + + + dev.morphia.morphia + core + 1.6.1 + + + + junit + junit + 4.13.2 + test + + + + run.mone + docean-plugin-nacos + + + + redis.clients + jedis + + + + run.mone + log-common + 1.4.0-jdk21 + + + + com.squareup.okhttp3 + okhttp + + + + + + + + + + + + kr.motd.maven + os-maven-plugin + 1.5.0.Final + + + + + + + staging + + staging + + + + src/main/resources/config/staging.properties + + + + + + dev + + dev + + + true + + + + src/main/resources/config/dev.properties + + + + + + online + + online + + + + src/main/resources/config/online.properties + + + + + + \ No newline at end of file diff --git a/chaos/chaos-service/src/main/java/pb/ChaosDaemonGrpc.java b/chaos/chaos-service/src/main/java/pb/ChaosDaemonGrpc.java new file mode 100644 index 000000000..9a12dc2b4 --- /dev/null +++ b/chaos/chaos-service/src/main/java/pb/ChaosDaemonGrpc.java @@ -0,0 +1,1401 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 pb; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.48.0)", + comments = "Source: chaosdaemon.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ChaosDaemonGrpc { + + private ChaosDaemonGrpc() {} + + public static final String SERVICE_NAME = "pb.ChaosDaemon"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSetTcsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetTcs", + requestType = pb.Chaosdaemon.TcsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetTcsMethod() { + io.grpc.MethodDescriptor getSetTcsMethod; + if ((getSetTcsMethod = ChaosDaemonGrpc.getSetTcsMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getSetTcsMethod = ChaosDaemonGrpc.getSetTcsMethod) == null) { + ChaosDaemonGrpc.getSetTcsMethod = getSetTcsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTcs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.TcsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("SetTcs")) + .build(); + } + } + } + return getSetTcsMethod; + } + + private static volatile io.grpc.MethodDescriptor getFlushIPSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FlushIPSets", + requestType = pb.Chaosdaemon.IPSetsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getFlushIPSetsMethod() { + io.grpc.MethodDescriptor getFlushIPSetsMethod; + if ((getFlushIPSetsMethod = ChaosDaemonGrpc.getFlushIPSetsMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getFlushIPSetsMethod = ChaosDaemonGrpc.getFlushIPSetsMethod) == null) { + ChaosDaemonGrpc.getFlushIPSetsMethod = getFlushIPSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FlushIPSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.IPSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("FlushIPSets")) + .build(); + } + } + } + return getFlushIPSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetIptablesChainsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIptablesChains", + requestType = pb.Chaosdaemon.IptablesChainsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetIptablesChainsMethod() { + io.grpc.MethodDescriptor getSetIptablesChainsMethod; + if ((getSetIptablesChainsMethod = ChaosDaemonGrpc.getSetIptablesChainsMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getSetIptablesChainsMethod = ChaosDaemonGrpc.getSetIptablesChainsMethod) == null) { + ChaosDaemonGrpc.getSetIptablesChainsMethod = getSetIptablesChainsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIptablesChains")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.IptablesChainsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("SetIptablesChains")) + .build(); + } + } + } + return getSetIptablesChainsMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetTimeOffsetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetTimeOffset", + requestType = pb.Chaosdaemon.TimeRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetTimeOffsetMethod() { + io.grpc.MethodDescriptor getSetTimeOffsetMethod; + if ((getSetTimeOffsetMethod = ChaosDaemonGrpc.getSetTimeOffsetMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getSetTimeOffsetMethod = ChaosDaemonGrpc.getSetTimeOffsetMethod) == null) { + ChaosDaemonGrpc.getSetTimeOffsetMethod = getSetTimeOffsetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTimeOffset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.TimeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("SetTimeOffset")) + .build(); + } + } + } + return getSetTimeOffsetMethod; + } + + private static volatile io.grpc.MethodDescriptor getRecoverTimeOffsetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RecoverTimeOffset", + requestType = pb.Chaosdaemon.TimeRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRecoverTimeOffsetMethod() { + io.grpc.MethodDescriptor getRecoverTimeOffsetMethod; + if ((getRecoverTimeOffsetMethod = ChaosDaemonGrpc.getRecoverTimeOffsetMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getRecoverTimeOffsetMethod = ChaosDaemonGrpc.getRecoverTimeOffsetMethod) == null) { + ChaosDaemonGrpc.getRecoverTimeOffsetMethod = getRecoverTimeOffsetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecoverTimeOffset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.TimeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("RecoverTimeOffset")) + .build(); + } + } + } + return getRecoverTimeOffsetMethod; + } + + private static volatile io.grpc.MethodDescriptor getContainerKillMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ContainerKill", + requestType = pb.Chaosdaemon.ContainerRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getContainerKillMethod() { + io.grpc.MethodDescriptor getContainerKillMethod; + if ((getContainerKillMethod = ChaosDaemonGrpc.getContainerKillMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getContainerKillMethod = ChaosDaemonGrpc.getContainerKillMethod) == null) { + ChaosDaemonGrpc.getContainerKillMethod = getContainerKillMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ContainerKill")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ContainerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("ContainerKill")) + .build(); + } + } + } + return getContainerKillMethod; + } + + private static volatile io.grpc.MethodDescriptor getContainerGetPidMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ContainerGetPid", + requestType = pb.Chaosdaemon.ContainerRequest.class, + responseType = pb.Chaosdaemon.ContainerResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getContainerGetPidMethod() { + io.grpc.MethodDescriptor getContainerGetPidMethod; + if ((getContainerGetPidMethod = ChaosDaemonGrpc.getContainerGetPidMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getContainerGetPidMethod = ChaosDaemonGrpc.getContainerGetPidMethod) == null) { + ChaosDaemonGrpc.getContainerGetPidMethod = getContainerGetPidMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ContainerGetPid")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ContainerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ContainerResponse.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("ContainerGetPid")) + .build(); + } + } + } + return getContainerGetPidMethod; + } + + private static volatile io.grpc.MethodDescriptor getExecStressorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecStressors", + requestType = pb.Chaosdaemon.ExecStressRequest.class, + responseType = pb.Chaosdaemon.ExecStressResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExecStressorsMethod() { + io.grpc.MethodDescriptor getExecStressorsMethod; + if ((getExecStressorsMethod = ChaosDaemonGrpc.getExecStressorsMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getExecStressorsMethod = ChaosDaemonGrpc.getExecStressorsMethod) == null) { + ChaosDaemonGrpc.getExecStressorsMethod = getExecStressorsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecStressors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ExecStressRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ExecStressResponse.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("ExecStressors")) + .build(); + } + } + } + return getExecStressorsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCancelStressorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelStressors", + requestType = pb.Chaosdaemon.CancelStressRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCancelStressorsMethod() { + io.grpc.MethodDescriptor getCancelStressorsMethod; + if ((getCancelStressorsMethod = ChaosDaemonGrpc.getCancelStressorsMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getCancelStressorsMethod = ChaosDaemonGrpc.getCancelStressorsMethod) == null) { + ChaosDaemonGrpc.getCancelStressorsMethod = getCancelStressorsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelStressors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.CancelStressRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("CancelStressors")) + .build(); + } + } + } + return getCancelStressorsMethod; + } + + private static volatile io.grpc.MethodDescriptor getApplyIOChaosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ApplyIOChaos", + requestType = pb.Chaosdaemon.ApplyIOChaosRequest.class, + responseType = pb.Chaosdaemon.ApplyIOChaosResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getApplyIOChaosMethod() { + io.grpc.MethodDescriptor getApplyIOChaosMethod; + if ((getApplyIOChaosMethod = ChaosDaemonGrpc.getApplyIOChaosMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getApplyIOChaosMethod = ChaosDaemonGrpc.getApplyIOChaosMethod) == null) { + ChaosDaemonGrpc.getApplyIOChaosMethod = getApplyIOChaosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplyIOChaos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ApplyIOChaosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ApplyIOChaosResponse.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("ApplyIOChaos")) + .build(); + } + } + } + return getApplyIOChaosMethod; + } + + private static volatile io.grpc.MethodDescriptor getApplyHttpChaosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ApplyHttpChaos", + requestType = pb.Chaosdaemon.ApplyHttpChaosRequest.class, + responseType = pb.Chaosdaemon.ApplyHttpChaosResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getApplyHttpChaosMethod() { + io.grpc.MethodDescriptor getApplyHttpChaosMethod; + if ((getApplyHttpChaosMethod = ChaosDaemonGrpc.getApplyHttpChaosMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getApplyHttpChaosMethod = ChaosDaemonGrpc.getApplyHttpChaosMethod) == null) { + ChaosDaemonGrpc.getApplyHttpChaosMethod = getApplyHttpChaosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplyHttpChaos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ApplyHttpChaosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ApplyHttpChaosResponse.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("ApplyHttpChaos")) + .build(); + } + } + } + return getApplyHttpChaosMethod; + } + + private static volatile io.grpc.MethodDescriptor getApplyBlockChaosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ApplyBlockChaos", + requestType = pb.Chaosdaemon.ApplyBlockChaosRequest.class, + responseType = pb.Chaosdaemon.ApplyBlockChaosResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getApplyBlockChaosMethod() { + io.grpc.MethodDescriptor getApplyBlockChaosMethod; + if ((getApplyBlockChaosMethod = ChaosDaemonGrpc.getApplyBlockChaosMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getApplyBlockChaosMethod = ChaosDaemonGrpc.getApplyBlockChaosMethod) == null) { + ChaosDaemonGrpc.getApplyBlockChaosMethod = getApplyBlockChaosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplyBlockChaos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ApplyBlockChaosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.ApplyBlockChaosResponse.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("ApplyBlockChaos")) + .build(); + } + } + } + return getApplyBlockChaosMethod; + } + + private static volatile io.grpc.MethodDescriptor getRecoverBlockChaosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RecoverBlockChaos", + requestType = pb.Chaosdaemon.RecoverBlockChaosRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRecoverBlockChaosMethod() { + io.grpc.MethodDescriptor getRecoverBlockChaosMethod; + if ((getRecoverBlockChaosMethod = ChaosDaemonGrpc.getRecoverBlockChaosMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getRecoverBlockChaosMethod = ChaosDaemonGrpc.getRecoverBlockChaosMethod) == null) { + ChaosDaemonGrpc.getRecoverBlockChaosMethod = getRecoverBlockChaosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecoverBlockChaos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.RecoverBlockChaosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("RecoverBlockChaos")) + .build(); + } + } + } + return getRecoverBlockChaosMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetDNSServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetDNSServer", + requestType = pb.Chaosdaemon.SetDNSServerRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetDNSServerMethod() { + io.grpc.MethodDescriptor getSetDNSServerMethod; + if ((getSetDNSServerMethod = ChaosDaemonGrpc.getSetDNSServerMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getSetDNSServerMethod = ChaosDaemonGrpc.getSetDNSServerMethod) == null) { + ChaosDaemonGrpc.getSetDNSServerMethod = getSetDNSServerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetDNSServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.SetDNSServerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("SetDNSServer")) + .build(); + } + } + } + return getSetDNSServerMethod; + } + + private static volatile io.grpc.MethodDescriptor getInstallJVMRulesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InstallJVMRules", + requestType = pb.Chaosdaemon.InstallJVMRulesRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getInstallJVMRulesMethod() { + io.grpc.MethodDescriptor getInstallJVMRulesMethod; + if ((getInstallJVMRulesMethod = ChaosDaemonGrpc.getInstallJVMRulesMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getInstallJVMRulesMethod = ChaosDaemonGrpc.getInstallJVMRulesMethod) == null) { + ChaosDaemonGrpc.getInstallJVMRulesMethod = getInstallJVMRulesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "InstallJVMRules")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.InstallJVMRulesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("InstallJVMRules")) + .build(); + } + } + } + return getInstallJVMRulesMethod; + } + + private static volatile io.grpc.MethodDescriptor getUninstallJVMRulesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UninstallJVMRules", + requestType = pb.Chaosdaemon.UninstallJVMRulesRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUninstallJVMRulesMethod() { + io.grpc.MethodDescriptor getUninstallJVMRulesMethod; + if ((getUninstallJVMRulesMethod = ChaosDaemonGrpc.getUninstallJVMRulesMethod) == null) { + synchronized (ChaosDaemonGrpc.class) { + if ((getUninstallJVMRulesMethod = ChaosDaemonGrpc.getUninstallJVMRulesMethod) == null) { + ChaosDaemonGrpc.getUninstallJVMRulesMethod = getUninstallJVMRulesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UninstallJVMRules")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pb.Chaosdaemon.UninstallJVMRulesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ChaosDaemonMethodDescriptorSupplier("UninstallJVMRules")) + .build(); + } + } + } + return getUninstallJVMRulesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ChaosDaemonStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ChaosDaemonStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ChaosDaemonStub(channel, callOptions); + } + }; + return ChaosDaemonStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ChaosDaemonBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ChaosDaemonBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ChaosDaemonBlockingStub(channel, callOptions); + } + }; + return ChaosDaemonBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ChaosDaemonFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ChaosDaemonFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ChaosDaemonFutureStub(channel, callOptions); + } + }; + return ChaosDaemonFutureStub.newStub(factory, channel); + } + + /** + */ + public static abstract class ChaosDaemonImplBase implements io.grpc.BindableService { + + /** + */ + public void setTcs(pb.Chaosdaemon.TcsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTcsMethod(), responseObserver); + } + + /** + */ + public void flushIPSets(pb.Chaosdaemon.IPSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFlushIPSetsMethod(), responseObserver); + } + + /** + */ + public void setIptablesChains(pb.Chaosdaemon.IptablesChainsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetIptablesChainsMethod(), responseObserver); + } + + /** + */ + public void setTimeOffset(pb.Chaosdaemon.TimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTimeOffsetMethod(), responseObserver); + } + + /** + */ + public void recoverTimeOffset(pb.Chaosdaemon.TimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecoverTimeOffsetMethod(), responseObserver); + } + + /** + */ + public void containerKill(pb.Chaosdaemon.ContainerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getContainerKillMethod(), responseObserver); + } + + /** + */ + public void containerGetPid(pb.Chaosdaemon.ContainerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getContainerGetPidMethod(), responseObserver); + } + + /** + */ + public void execStressors(pb.Chaosdaemon.ExecStressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecStressorsMethod(), responseObserver); + } + + /** + */ + public void cancelStressors(pb.Chaosdaemon.CancelStressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelStressorsMethod(), responseObserver); + } + + /** + */ + public void applyIOChaos(pb.Chaosdaemon.ApplyIOChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getApplyIOChaosMethod(), responseObserver); + } + + /** + */ + public void applyHttpChaos(pb.Chaosdaemon.ApplyHttpChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getApplyHttpChaosMethod(), responseObserver); + } + + /** + */ + public void applyBlockChaos(pb.Chaosdaemon.ApplyBlockChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getApplyBlockChaosMethod(), responseObserver); + } + + /** + */ + public void recoverBlockChaos(pb.Chaosdaemon.RecoverBlockChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecoverBlockChaosMethod(), responseObserver); + } + + /** + */ + public void setDNSServer(pb.Chaosdaemon.SetDNSServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDNSServerMethod(), responseObserver); + } + + /** + */ + public void installJVMRules(pb.Chaosdaemon.InstallJVMRulesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getInstallJVMRulesMethod(), responseObserver); + } + + /** + */ + public void uninstallJVMRules(pb.Chaosdaemon.UninstallJVMRulesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUninstallJVMRulesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSetTcsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.TcsRequest, + com.google.protobuf.Empty>( + this, METHODID_SET_TCS))) + .addMethod( + getFlushIPSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.IPSetsRequest, + com.google.protobuf.Empty>( + this, METHODID_FLUSH_IPSETS))) + .addMethod( + getSetIptablesChainsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.IptablesChainsRequest, + com.google.protobuf.Empty>( + this, METHODID_SET_IPTABLES_CHAINS))) + .addMethod( + getSetTimeOffsetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.TimeRequest, + com.google.protobuf.Empty>( + this, METHODID_SET_TIME_OFFSET))) + .addMethod( + getRecoverTimeOffsetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.TimeRequest, + com.google.protobuf.Empty>( + this, METHODID_RECOVER_TIME_OFFSET))) + .addMethod( + getContainerKillMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.ContainerRequest, + com.google.protobuf.Empty>( + this, METHODID_CONTAINER_KILL))) + .addMethod( + getContainerGetPidMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.ContainerRequest, + pb.Chaosdaemon.ContainerResponse>( + this, METHODID_CONTAINER_GET_PID))) + .addMethod( + getExecStressorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.ExecStressRequest, + pb.Chaosdaemon.ExecStressResponse>( + this, METHODID_EXEC_STRESSORS))) + .addMethod( + getCancelStressorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.CancelStressRequest, + com.google.protobuf.Empty>( + this, METHODID_CANCEL_STRESSORS))) + .addMethod( + getApplyIOChaosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.ApplyIOChaosRequest, + pb.Chaosdaemon.ApplyIOChaosResponse>( + this, METHODID_APPLY_IOCHAOS))) + .addMethod( + getApplyHttpChaosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.ApplyHttpChaosRequest, + pb.Chaosdaemon.ApplyHttpChaosResponse>( + this, METHODID_APPLY_HTTP_CHAOS))) + .addMethod( + getApplyBlockChaosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.ApplyBlockChaosRequest, + pb.Chaosdaemon.ApplyBlockChaosResponse>( + this, METHODID_APPLY_BLOCK_CHAOS))) + .addMethod( + getRecoverBlockChaosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.RecoverBlockChaosRequest, + com.google.protobuf.Empty>( + this, METHODID_RECOVER_BLOCK_CHAOS))) + .addMethod( + getSetDNSServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.SetDNSServerRequest, + com.google.protobuf.Empty>( + this, METHODID_SET_DNSSERVER))) + .addMethod( + getInstallJVMRulesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.InstallJVMRulesRequest, + com.google.protobuf.Empty>( + this, METHODID_INSTALL_JVMRULES))) + .addMethod( + getUninstallJVMRulesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pb.Chaosdaemon.UninstallJVMRulesRequest, + com.google.protobuf.Empty>( + this, METHODID_UNINSTALL_JVMRULES))) + .build(); + } + } + + /** + */ + public static final class ChaosDaemonStub extends io.grpc.stub.AbstractAsyncStub { + private ChaosDaemonStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ChaosDaemonStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ChaosDaemonStub(channel, callOptions); + } + + /** + */ + public void setTcs(pb.Chaosdaemon.TcsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetTcsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void flushIPSets(pb.Chaosdaemon.IPSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFlushIPSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setIptablesChains(pb.Chaosdaemon.IptablesChainsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIptablesChainsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setTimeOffset(pb.Chaosdaemon.TimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetTimeOffsetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void recoverTimeOffset(pb.Chaosdaemon.TimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRecoverTimeOffsetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void containerKill(pb.Chaosdaemon.ContainerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getContainerKillMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void containerGetPid(pb.Chaosdaemon.ContainerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getContainerGetPidMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void execStressors(pb.Chaosdaemon.ExecStressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExecStressorsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void cancelStressors(pb.Chaosdaemon.CancelStressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelStressorsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void applyIOChaos(pb.Chaosdaemon.ApplyIOChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getApplyIOChaosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void applyHttpChaos(pb.Chaosdaemon.ApplyHttpChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getApplyHttpChaosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void applyBlockChaos(pb.Chaosdaemon.ApplyBlockChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getApplyBlockChaosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void recoverBlockChaos(pb.Chaosdaemon.RecoverBlockChaosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRecoverBlockChaosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setDNSServer(pb.Chaosdaemon.SetDNSServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetDNSServerMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void installJVMRules(pb.Chaosdaemon.InstallJVMRulesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getInstallJVMRulesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void uninstallJVMRules(pb.Chaosdaemon.UninstallJVMRulesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUninstallJVMRulesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + */ + public static final class ChaosDaemonBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ChaosDaemonBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ChaosDaemonBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ChaosDaemonBlockingStub(channel, callOptions); + } + + /** + */ + public com.google.protobuf.Empty setTcs(pb.Chaosdaemon.TcsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetTcsMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty flushIPSets(pb.Chaosdaemon.IPSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFlushIPSetsMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty setIptablesChains(pb.Chaosdaemon.IptablesChainsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIptablesChainsMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty setTimeOffset(pb.Chaosdaemon.TimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetTimeOffsetMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty recoverTimeOffset(pb.Chaosdaemon.TimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRecoverTimeOffsetMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty containerKill(pb.Chaosdaemon.ContainerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getContainerKillMethod(), getCallOptions(), request); + } + + /** + */ + public pb.Chaosdaemon.ContainerResponse containerGetPid(pb.Chaosdaemon.ContainerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getContainerGetPidMethod(), getCallOptions(), request); + } + + /** + */ + public pb.Chaosdaemon.ExecStressResponse execStressors(pb.Chaosdaemon.ExecStressRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExecStressorsMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty cancelStressors(pb.Chaosdaemon.CancelStressRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelStressorsMethod(), getCallOptions(), request); + } + + /** + */ + public pb.Chaosdaemon.ApplyIOChaosResponse applyIOChaos(pb.Chaosdaemon.ApplyIOChaosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getApplyIOChaosMethod(), getCallOptions(), request); + } + + /** + */ + public pb.Chaosdaemon.ApplyHttpChaosResponse applyHttpChaos(pb.Chaosdaemon.ApplyHttpChaosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getApplyHttpChaosMethod(), getCallOptions(), request); + } + + /** + */ + public pb.Chaosdaemon.ApplyBlockChaosResponse applyBlockChaos(pb.Chaosdaemon.ApplyBlockChaosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getApplyBlockChaosMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty recoverBlockChaos(pb.Chaosdaemon.RecoverBlockChaosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRecoverBlockChaosMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty setDNSServer(pb.Chaosdaemon.SetDNSServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetDNSServerMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty installJVMRules(pb.Chaosdaemon.InstallJVMRulesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getInstallJVMRulesMethod(), getCallOptions(), request); + } + + /** + */ + public com.google.protobuf.Empty uninstallJVMRules(pb.Chaosdaemon.UninstallJVMRulesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUninstallJVMRulesMethod(), getCallOptions(), request); + } + } + + /** + */ + public static final class ChaosDaemonFutureStub extends io.grpc.stub.AbstractFutureStub { + private ChaosDaemonFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ChaosDaemonFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ChaosDaemonFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setTcs( + pb.Chaosdaemon.TcsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetTcsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture flushIPSets( + pb.Chaosdaemon.IPSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFlushIPSetsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setIptablesChains( + pb.Chaosdaemon.IptablesChainsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetIptablesChainsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setTimeOffset( + pb.Chaosdaemon.TimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetTimeOffsetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture recoverTimeOffset( + pb.Chaosdaemon.TimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRecoverTimeOffsetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture containerKill( + pb.Chaosdaemon.ContainerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getContainerKillMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture containerGetPid( + pb.Chaosdaemon.ContainerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getContainerGetPidMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture execStressors( + pb.Chaosdaemon.ExecStressRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExecStressorsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture cancelStressors( + pb.Chaosdaemon.CancelStressRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelStressorsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture applyIOChaos( + pb.Chaosdaemon.ApplyIOChaosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getApplyIOChaosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture applyHttpChaos( + pb.Chaosdaemon.ApplyHttpChaosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getApplyHttpChaosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture applyBlockChaos( + pb.Chaosdaemon.ApplyBlockChaosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getApplyBlockChaosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture recoverBlockChaos( + pb.Chaosdaemon.RecoverBlockChaosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRecoverBlockChaosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setDNSServer( + pb.Chaosdaemon.SetDNSServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetDNSServerMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture installJVMRules( + pb.Chaosdaemon.InstallJVMRulesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getInstallJVMRulesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture uninstallJVMRules( + pb.Chaosdaemon.UninstallJVMRulesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUninstallJVMRulesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SET_TCS = 0; + private static final int METHODID_FLUSH_IPSETS = 1; + private static final int METHODID_SET_IPTABLES_CHAINS = 2; + private static final int METHODID_SET_TIME_OFFSET = 3; + private static final int METHODID_RECOVER_TIME_OFFSET = 4; + private static final int METHODID_CONTAINER_KILL = 5; + private static final int METHODID_CONTAINER_GET_PID = 6; + private static final int METHODID_EXEC_STRESSORS = 7; + private static final int METHODID_CANCEL_STRESSORS = 8; + private static final int METHODID_APPLY_IOCHAOS = 9; + private static final int METHODID_APPLY_HTTP_CHAOS = 10; + private static final int METHODID_APPLY_BLOCK_CHAOS = 11; + private static final int METHODID_RECOVER_BLOCK_CHAOS = 12; + private static final int METHODID_SET_DNSSERVER = 13; + private static final int METHODID_INSTALL_JVMRULES = 14; + private static final int METHODID_UNINSTALL_JVMRULES = 15; + + 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 ChaosDaemonImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ChaosDaemonImplBase 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_SET_TCS: + serviceImpl.setTcs((pb.Chaosdaemon.TcsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FLUSH_IPSETS: + serviceImpl.flushIPSets((pb.Chaosdaemon.IPSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_IPTABLES_CHAINS: + serviceImpl.setIptablesChains((pb.Chaosdaemon.IptablesChainsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_TIME_OFFSET: + serviceImpl.setTimeOffset((pb.Chaosdaemon.TimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RECOVER_TIME_OFFSET: + serviceImpl.recoverTimeOffset((pb.Chaosdaemon.TimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CONTAINER_KILL: + serviceImpl.containerKill((pb.Chaosdaemon.ContainerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CONTAINER_GET_PID: + serviceImpl.containerGetPid((pb.Chaosdaemon.ContainerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXEC_STRESSORS: + serviceImpl.execStressors((pb.Chaosdaemon.ExecStressRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_STRESSORS: + serviceImpl.cancelStressors((pb.Chaosdaemon.CancelStressRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_APPLY_IOCHAOS: + serviceImpl.applyIOChaos((pb.Chaosdaemon.ApplyIOChaosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_APPLY_HTTP_CHAOS: + serviceImpl.applyHttpChaos((pb.Chaosdaemon.ApplyHttpChaosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_APPLY_BLOCK_CHAOS: + serviceImpl.applyBlockChaos((pb.Chaosdaemon.ApplyBlockChaosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RECOVER_BLOCK_CHAOS: + serviceImpl.recoverBlockChaos((pb.Chaosdaemon.RecoverBlockChaosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_DNSSERVER: + serviceImpl.setDNSServer((pb.Chaosdaemon.SetDNSServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_INSTALL_JVMRULES: + serviceImpl.installJVMRules((pb.Chaosdaemon.InstallJVMRulesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNINSTALL_JVMRULES: + serviceImpl.uninstallJVMRules((pb.Chaosdaemon.UninstallJVMRulesRequest) 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 static abstract class ChaosDaemonBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ChaosDaemonBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return pb.Chaosdaemon.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ChaosDaemon"); + } + } + + private static final class ChaosDaemonFileDescriptorSupplier + extends ChaosDaemonBaseDescriptorSupplier { + ChaosDaemonFileDescriptorSupplier() {} + } + + private static final class ChaosDaemonMethodDescriptorSupplier + extends ChaosDaemonBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ChaosDaemonMethodDescriptorSupplier(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 (ChaosDaemonGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ChaosDaemonFileDescriptorSupplier()) + .addMethod(getSetTcsMethod()) + .addMethod(getFlushIPSetsMethod()) + .addMethod(getSetIptablesChainsMethod()) + .addMethod(getSetTimeOffsetMethod()) + .addMethod(getRecoverTimeOffsetMethod()) + .addMethod(getContainerKillMethod()) + .addMethod(getContainerGetPidMethod()) + .addMethod(getExecStressorsMethod()) + .addMethod(getCancelStressorsMethod()) + .addMethod(getApplyIOChaosMethod()) + .addMethod(getApplyHttpChaosMethod()) + .addMethod(getApplyBlockChaosMethod()) + .addMethod(getRecoverBlockChaosMethod()) + .addMethod(getSetDNSServerMethod()) + .addMethod(getInstallJVMRulesMethod()) + .addMethod(getUninstallJVMRulesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/chaos/chaos-service/src/main/java/pb/Chaosdaemon.java b/chaos/chaos-service/src/main/java/pb/Chaosdaemon.java new file mode 100644 index 000000000..760949c38 --- /dev/null +++ b/chaos/chaos-service/src/main/java/pb/Chaosdaemon.java @@ -0,0 +1,36450 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: chaosdaemon.proto +/* + * Copyright 2020 Xiaomi + * + * 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 pb; + +public final class Chaosdaemon { + private Chaosdaemon() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TcHandleOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.TcHandle) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 major = 1; + * @return The major. + */ + int getMajor(); + + /** + * uint32 minor = 2; + * @return The minor. + */ + int getMinor(); + } + /** + * Protobuf type {@code pb.TcHandle} + */ + public static final class TcHandle extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.TcHandle) + TcHandleOrBuilder { + private static final long serialVersionUID = 0L; + // Use TcHandle.newBuilder() to construct. + private TcHandle(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TcHandle() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TcHandle(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TcHandle( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + major_ = input.readUInt32(); + break; + } + case 16: { + + minor_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_TcHandle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcHandle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcHandle.class, pb.Chaosdaemon.TcHandle.Builder.class); + } + + public static final int MAJOR_FIELD_NUMBER = 1; + private int major_; + /** + * uint32 major = 1; + * @return The major. + */ + @java.lang.Override + public int getMajor() { + return major_; + } + + public static final int MINOR_FIELD_NUMBER = 2; + private int minor_; + /** + * uint32 minor = 2; + * @return The minor. + */ + @java.lang.Override + public int getMinor() { + return minor_; + } + + 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 (major_ != 0) { + output.writeUInt32(1, major_); + } + if (minor_ != 0) { + output.writeUInt32(2, minor_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (major_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, major_); + } + if (minor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, minor_); + } + 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 pb.Chaosdaemon.TcHandle)) { + return super.equals(obj); + } + pb.Chaosdaemon.TcHandle other = (pb.Chaosdaemon.TcHandle) obj; + + if (getMajor() + != other.getMajor()) return false; + if (getMinor() + != other.getMinor()) 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) + MAJOR_FIELD_NUMBER; + hash = (53 * hash) + getMajor(); + hash = (37 * hash) + MINOR_FIELD_NUMBER; + hash = (53 * hash) + getMinor(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.TcHandle parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcHandle parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcHandle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcHandle parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcHandle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcHandle parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcHandle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcHandle 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 pb.Chaosdaemon.TcHandle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcHandle 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 pb.Chaosdaemon.TcHandle parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcHandle 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(pb.Chaosdaemon.TcHandle 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; + } + /** + * Protobuf type {@code pb.TcHandle} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.TcHandle) + pb.Chaosdaemon.TcHandleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TcHandle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcHandle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcHandle.class, pb.Chaosdaemon.TcHandle.Builder.class); + } + + // Construct using pb.Chaosdaemon.TcHandle.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(); + major_ = 0; + + minor_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_TcHandle_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.TcHandle getDefaultInstanceForType() { + return pb.Chaosdaemon.TcHandle.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.TcHandle build() { + pb.Chaosdaemon.TcHandle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.TcHandle buildPartial() { + pb.Chaosdaemon.TcHandle result = new pb.Chaosdaemon.TcHandle(this); + result.major_ = major_; + result.minor_ = minor_; + 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 pb.Chaosdaemon.TcHandle) { + return mergeFrom((pb.Chaosdaemon.TcHandle)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.TcHandle other) { + if (other == pb.Chaosdaemon.TcHandle.getDefaultInstance()) return this; + if (other.getMajor() != 0) { + setMajor(other.getMajor()); + } + if (other.getMinor() != 0) { + setMinor(other.getMinor()); + } + 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 { + pb.Chaosdaemon.TcHandle parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.TcHandle) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int major_ ; + /** + * uint32 major = 1; + * @return The major. + */ + @java.lang.Override + public int getMajor() { + return major_; + } + /** + * uint32 major = 1; + * @param value The major to set. + * @return This builder for chaining. + */ + public Builder setMajor(int value) { + + major_ = value; + onChanged(); + return this; + } + /** + * uint32 major = 1; + * @return This builder for chaining. + */ + public Builder clearMajor() { + + major_ = 0; + onChanged(); + return this; + } + + private int minor_ ; + /** + * uint32 minor = 2; + * @return The minor. + */ + @java.lang.Override + public int getMinor() { + return minor_; + } + /** + * uint32 minor = 2; + * @param value The minor to set. + * @return This builder for chaining. + */ + public Builder setMinor(int value) { + + minor_ = value; + onChanged(); + return this; + } + /** + * uint32 minor = 2; + * @return This builder for chaining. + */ + public Builder clearMinor() { + + minor_ = 0; + 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:pb.TcHandle) + } + + // @@protoc_insertion_point(class_scope:pb.TcHandle) + private static final pb.Chaosdaemon.TcHandle DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.TcHandle(); + } + + public static pb.Chaosdaemon.TcHandle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TcHandle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TcHandle(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 pb.Chaosdaemon.TcHandle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ContainerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ContainerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.ContainerAction action = 1; + * @return Whether the action field is set. + */ + boolean hasAction(); + /** + * .pb.ContainerAction action = 1; + * @return The action. + */ + pb.Chaosdaemon.ContainerAction getAction(); + /** + * .pb.ContainerAction action = 1; + */ + pb.Chaosdaemon.ContainerActionOrBuilder getActionOrBuilder(); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + } + /** + * Protobuf type {@code pb.ContainerRequest} + */ + public static final class ContainerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ContainerRequest) + ContainerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerRequest.newBuilder() to construct. + private ContainerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ContainerRequest() { + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ContainerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContainerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.ContainerAction.Builder subBuilder = null; + if (action_ != null) { + subBuilder = action_.toBuilder(); + } + action_ = input.readMessage(pb.Chaosdaemon.ContainerAction.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(action_); + action_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ContainerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ContainerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ContainerRequest.class, pb.Chaosdaemon.ContainerRequest.Builder.class); + } + + public static final int ACTION_FIELD_NUMBER = 1; + private pb.Chaosdaemon.ContainerAction action_; + /** + * .pb.ContainerAction action = 1; + * @return Whether the action field is set. + */ + @java.lang.Override + public boolean hasAction() { + return action_ != null; + } + /** + * .pb.ContainerAction action = 1; + * @return The action. + */ + @java.lang.Override + public pb.Chaosdaemon.ContainerAction getAction() { + return action_ == null ? pb.Chaosdaemon.ContainerAction.getDefaultInstance() : action_; + } + /** + * .pb.ContainerAction action = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.ContainerActionOrBuilder getActionOrBuilder() { + return getAction(); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = 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 (action_ != null) { + output.writeMessage(1, getAction()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (action_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAction()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + 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 pb.Chaosdaemon.ContainerRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.ContainerRequest other = (pb.Chaosdaemon.ContainerRequest) obj; + + if (hasAction() != other.hasAction()) return false; + if (hasAction()) { + if (!getAction() + .equals(other.getAction())) return false; + } + if (!getContainerId() + .equals(other.getContainerId())) 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 (hasAction()) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ContainerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerRequest 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 pb.Chaosdaemon.ContainerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerRequest 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 pb.Chaosdaemon.ContainerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerRequest 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(pb.Chaosdaemon.ContainerRequest 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; + } + /** + * Protobuf type {@code pb.ContainerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ContainerRequest) + pb.Chaosdaemon.ContainerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ContainerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ContainerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ContainerRequest.class, pb.Chaosdaemon.ContainerRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.ContainerRequest.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 (actionBuilder_ == null) { + action_ = null; + } else { + action_ = null; + actionBuilder_ = null; + } + containerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ContainerRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.ContainerRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerRequest build() { + pb.Chaosdaemon.ContainerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerRequest buildPartial() { + pb.Chaosdaemon.ContainerRequest result = new pb.Chaosdaemon.ContainerRequest(this); + if (actionBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = actionBuilder_.build(); + } + result.containerId_ = containerId_; + 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 pb.Chaosdaemon.ContainerRequest) { + return mergeFrom((pb.Chaosdaemon.ContainerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ContainerRequest other) { + if (other == pb.Chaosdaemon.ContainerRequest.getDefaultInstance()) return this; + if (other.hasAction()) { + mergeAction(other.getAction()); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + 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 { + pb.Chaosdaemon.ContainerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ContainerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.ContainerAction action_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.ContainerAction, pb.Chaosdaemon.ContainerAction.Builder, pb.Chaosdaemon.ContainerActionOrBuilder> actionBuilder_; + /** + * .pb.ContainerAction action = 1; + * @return Whether the action field is set. + */ + public boolean hasAction() { + return actionBuilder_ != null || action_ != null; + } + /** + * .pb.ContainerAction action = 1; + * @return The action. + */ + public pb.Chaosdaemon.ContainerAction getAction() { + if (actionBuilder_ == null) { + return action_ == null ? pb.Chaosdaemon.ContainerAction.getDefaultInstance() : action_; + } else { + return actionBuilder_.getMessage(); + } + } + /** + * .pb.ContainerAction action = 1; + */ + public Builder setAction(pb.Chaosdaemon.ContainerAction value) { + if (actionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + actionBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.ContainerAction action = 1; + */ + public Builder setAction( + pb.Chaosdaemon.ContainerAction.Builder builderForValue) { + if (actionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + actionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.ContainerAction action = 1; + */ + public Builder mergeAction(pb.Chaosdaemon.ContainerAction value) { + if (actionBuilder_ == null) { + if (action_ != null) { + action_ = + pb.Chaosdaemon.ContainerAction.newBuilder(action_).mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + actionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.ContainerAction action = 1; + */ + public Builder clearAction() { + if (actionBuilder_ == null) { + action_ = null; + onChanged(); + } else { + action_ = null; + actionBuilder_ = null; + } + + return this; + } + /** + * .pb.ContainerAction action = 1; + */ + public pb.Chaosdaemon.ContainerAction.Builder getActionBuilder() { + + onChanged(); + return getActionFieldBuilder().getBuilder(); + } + /** + * .pb.ContainerAction action = 1; + */ + public pb.Chaosdaemon.ContainerActionOrBuilder getActionOrBuilder() { + if (actionBuilder_ != null) { + return actionBuilder_.getMessageOrBuilder(); + } else { + return action_ == null ? + pb.Chaosdaemon.ContainerAction.getDefaultInstance() : action_; + } + } + /** + * .pb.ContainerAction action = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.ContainerAction, pb.Chaosdaemon.ContainerAction.Builder, pb.Chaosdaemon.ContainerActionOrBuilder> + getActionFieldBuilder() { + if (actionBuilder_ == null) { + actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.ContainerAction, pb.Chaosdaemon.ContainerAction.Builder, pb.Chaosdaemon.ContainerActionOrBuilder>( + getAction(), + getParentForChildren(), + isClean()); + action_ = null; + } + return actionBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = 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:pb.ContainerRequest) + } + + // @@protoc_insertion_point(class_scope:pb.ContainerRequest) + private static final pb.Chaosdaemon.ContainerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ContainerRequest(); + } + + public static pb.Chaosdaemon.ContainerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerRequest(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 pb.Chaosdaemon.ContainerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ContainerResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ContainerResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 pid = 1; + * @return The pid. + */ + int getPid(); + } + /** + * Protobuf type {@code pb.ContainerResponse} + */ + public static final class ContainerResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ContainerResponse) + ContainerResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerResponse.newBuilder() to construct. + private ContainerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ContainerResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ContainerResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContainerResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + pid_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ContainerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ContainerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ContainerResponse.class, pb.Chaosdaemon.ContainerResponse.Builder.class); + } + + public static final int PID_FIELD_NUMBER = 1; + private int pid_; + /** + * uint32 pid = 1; + * @return The pid. + */ + @java.lang.Override + public int getPid() { + return pid_; + } + + 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 (pid_ != 0) { + output.writeUInt32(1, pid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pid_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, pid_); + } + 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 pb.Chaosdaemon.ContainerResponse)) { + return super.equals(obj); + } + pb.Chaosdaemon.ContainerResponse other = (pb.Chaosdaemon.ContainerResponse) obj; + + if (getPid() + != other.getPid()) 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) + PID_FIELD_NUMBER; + hash = (53 * hash) + getPid(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ContainerResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerResponse 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 pb.Chaosdaemon.ContainerResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerResponse 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 pb.Chaosdaemon.ContainerResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerResponse 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(pb.Chaosdaemon.ContainerResponse 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; + } + /** + * Protobuf type {@code pb.ContainerResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ContainerResponse) + pb.Chaosdaemon.ContainerResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ContainerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ContainerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ContainerResponse.class, pb.Chaosdaemon.ContainerResponse.Builder.class); + } + + // Construct using pb.Chaosdaemon.ContainerResponse.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(); + pid_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ContainerResponse_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerResponse getDefaultInstanceForType() { + return pb.Chaosdaemon.ContainerResponse.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerResponse build() { + pb.Chaosdaemon.ContainerResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerResponse buildPartial() { + pb.Chaosdaemon.ContainerResponse result = new pb.Chaosdaemon.ContainerResponse(this); + result.pid_ = pid_; + 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 pb.Chaosdaemon.ContainerResponse) { + return mergeFrom((pb.Chaosdaemon.ContainerResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ContainerResponse other) { + if (other == pb.Chaosdaemon.ContainerResponse.getDefaultInstance()) return this; + if (other.getPid() != 0) { + setPid(other.getPid()); + } + 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 { + pb.Chaosdaemon.ContainerResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ContainerResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pid_ ; + /** + * uint32 pid = 1; + * @return The pid. + */ + @java.lang.Override + public int getPid() { + return pid_; + } + /** + * uint32 pid = 1; + * @param value The pid to set. + * @return This builder for chaining. + */ + public Builder setPid(int value) { + + pid_ = value; + onChanged(); + return this; + } + /** + * uint32 pid = 1; + * @return This builder for chaining. + */ + public Builder clearPid() { + + pid_ = 0; + 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:pb.ContainerResponse) + } + + // @@protoc_insertion_point(class_scope:pb.ContainerResponse) + private static final pb.Chaosdaemon.ContainerResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ContainerResponse(); + } + + public static pb.Chaosdaemon.ContainerResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerResponse(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 pb.Chaosdaemon.ContainerResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NetemRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.NetemRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.Netem netem = 1; + * @return Whether the netem field is set. + */ + boolean hasNetem(); + /** + * .pb.Netem netem = 1; + * @return The netem. + */ + pb.Chaosdaemon.Netem getNetem(); + /** + * .pb.Netem netem = 1; + */ + pb.Chaosdaemon.NetemOrBuilder getNetemOrBuilder(); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * .pb.TcHandle handle = 3; + * @return Whether the handle field is set. + */ + boolean hasHandle(); + /** + * .pb.TcHandle handle = 3; + * @return The handle. + */ + pb.Chaosdaemon.TcHandle getHandle(); + /** + * .pb.TcHandle handle = 3; + */ + pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder(); + + /** + * .pb.TcHandle parent = 4; + * @return Whether the parent field is set. + */ + boolean hasParent(); + /** + * .pb.TcHandle parent = 4; + * @return The parent. + */ + pb.Chaosdaemon.TcHandle getParent(); + /** + * .pb.TcHandle parent = 4; + */ + pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder(); + } + /** + * Protobuf type {@code pb.NetemRequest} + */ + public static final class NetemRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.NetemRequest) + NetemRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetemRequest.newBuilder() to construct. + private NetemRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetemRequest() { + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetemRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NetemRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.Netem.Builder subBuilder = null; + if (netem_ != null) { + subBuilder = netem_.toBuilder(); + } + netem_ = input.readMessage(pb.Chaosdaemon.Netem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(netem_); + netem_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 26: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (handle_ != null) { + subBuilder = handle_.toBuilder(); + } + handle_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(handle_); + handle_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (parent_ != null) { + subBuilder = parent_.toBuilder(); + } + parent_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parent_); + parent_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_NetemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_NetemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.NetemRequest.class, pb.Chaosdaemon.NetemRequest.Builder.class); + } + + public static final int NETEM_FIELD_NUMBER = 1; + private pb.Chaosdaemon.Netem netem_; + /** + * .pb.Netem netem = 1; + * @return Whether the netem field is set. + */ + @java.lang.Override + public boolean hasNetem() { + return netem_ != null; + } + /** + * .pb.Netem netem = 1; + * @return The netem. + */ + @java.lang.Override + public pb.Chaosdaemon.Netem getNetem() { + return netem_ == null ? pb.Chaosdaemon.Netem.getDefaultInstance() : netem_; + } + /** + * .pb.Netem netem = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.NetemOrBuilder getNetemOrBuilder() { + return getNetem(); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HANDLE_FIELD_NUMBER = 3; + private pb.Chaosdaemon.TcHandle handle_; + /** + * .pb.TcHandle handle = 3; + * @return Whether the handle field is set. + */ + @java.lang.Override + public boolean hasHandle() { + return handle_ != null; + } + /** + * .pb.TcHandle handle = 3; + * @return The handle. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getHandle() { + return handle_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } + /** + * .pb.TcHandle handle = 3; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder() { + return getHandle(); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private pb.Chaosdaemon.TcHandle parent_; + /** + * .pb.TcHandle parent = 4; + * @return Whether the parent field is set. + */ + @java.lang.Override + public boolean hasParent() { + return parent_ != null; + } + /** + * .pb.TcHandle parent = 4; + * @return The parent. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getParent() { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + /** + * .pb.TcHandle parent = 4; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + return getParent(); + } + + 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 (netem_ != null) { + output.writeMessage(1, getNetem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + if (handle_ != null) { + output.writeMessage(3, getHandle()); + } + if (parent_ != null) { + output.writeMessage(4, getParent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (netem_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getNetem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + if (handle_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getHandle()); + } + if (parent_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getParent()); + } + 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 pb.Chaosdaemon.NetemRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.NetemRequest other = (pb.Chaosdaemon.NetemRequest) obj; + + if (hasNetem() != other.hasNetem()) return false; + if (hasNetem()) { + if (!getNetem() + .equals(other.getNetem())) return false; + } + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (hasHandle() != other.hasHandle()) return false; + if (hasHandle()) { + if (!getHandle() + .equals(other.getHandle())) return false; + } + if (hasParent() != other.hasParent()) return false; + if (hasParent()) { + if (!getParent() + .equals(other.getParent())) 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 (hasNetem()) { + hash = (37 * hash) + NETEM_FIELD_NUMBER; + hash = (53 * hash) + getNetem().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + if (hasHandle()) { + hash = (37 * hash) + HANDLE_FIELD_NUMBER; + hash = (53 * hash) + getHandle().hashCode(); + } + if (hasParent()) { + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.NetemRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.NetemRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.NetemRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.NetemRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.NetemRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.NetemRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.NetemRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.NetemRequest 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 pb.Chaosdaemon.NetemRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.NetemRequest 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 pb.Chaosdaemon.NetemRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.NetemRequest 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(pb.Chaosdaemon.NetemRequest 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; + } + /** + * Protobuf type {@code pb.NetemRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.NetemRequest) + pb.Chaosdaemon.NetemRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_NetemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_NetemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.NetemRequest.class, pb.Chaosdaemon.NetemRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.NetemRequest.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 (netemBuilder_ == null) { + netem_ = null; + } else { + netem_ = null; + netemBuilder_ = null; + } + containerId_ = ""; + + if (handleBuilder_ == null) { + handle_ = null; + } else { + handle_ = null; + handleBuilder_ = null; + } + if (parentBuilder_ == null) { + parent_ = null; + } else { + parent_ = null; + parentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_NetemRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.NetemRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.NetemRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.NetemRequest build() { + pb.Chaosdaemon.NetemRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.NetemRequest buildPartial() { + pb.Chaosdaemon.NetemRequest result = new pb.Chaosdaemon.NetemRequest(this); + if (netemBuilder_ == null) { + result.netem_ = netem_; + } else { + result.netem_ = netemBuilder_.build(); + } + result.containerId_ = containerId_; + if (handleBuilder_ == null) { + result.handle_ = handle_; + } else { + result.handle_ = handleBuilder_.build(); + } + if (parentBuilder_ == null) { + result.parent_ = parent_; + } else { + result.parent_ = parentBuilder_.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 pb.Chaosdaemon.NetemRequest) { + return mergeFrom((pb.Chaosdaemon.NetemRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.NetemRequest other) { + if (other == pb.Chaosdaemon.NetemRequest.getDefaultInstance()) return this; + if (other.hasNetem()) { + mergeNetem(other.getNetem()); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.hasHandle()) { + mergeHandle(other.getHandle()); + } + if (other.hasParent()) { + mergeParent(other.getParent()); + } + 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 { + pb.Chaosdaemon.NetemRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.NetemRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.Netem netem_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Netem, pb.Chaosdaemon.Netem.Builder, pb.Chaosdaemon.NetemOrBuilder> netemBuilder_; + /** + * .pb.Netem netem = 1; + * @return Whether the netem field is set. + */ + public boolean hasNetem() { + return netemBuilder_ != null || netem_ != null; + } + /** + * .pb.Netem netem = 1; + * @return The netem. + */ + public pb.Chaosdaemon.Netem getNetem() { + if (netemBuilder_ == null) { + return netem_ == null ? pb.Chaosdaemon.Netem.getDefaultInstance() : netem_; + } else { + return netemBuilder_.getMessage(); + } + } + /** + * .pb.Netem netem = 1; + */ + public Builder setNetem(pb.Chaosdaemon.Netem value) { + if (netemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + netem_ = value; + onChanged(); + } else { + netemBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.Netem netem = 1; + */ + public Builder setNetem( + pb.Chaosdaemon.Netem.Builder builderForValue) { + if (netemBuilder_ == null) { + netem_ = builderForValue.build(); + onChanged(); + } else { + netemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.Netem netem = 1; + */ + public Builder mergeNetem(pb.Chaosdaemon.Netem value) { + if (netemBuilder_ == null) { + if (netem_ != null) { + netem_ = + pb.Chaosdaemon.Netem.newBuilder(netem_).mergeFrom(value).buildPartial(); + } else { + netem_ = value; + } + onChanged(); + } else { + netemBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.Netem netem = 1; + */ + public Builder clearNetem() { + if (netemBuilder_ == null) { + netem_ = null; + onChanged(); + } else { + netem_ = null; + netemBuilder_ = null; + } + + return this; + } + /** + * .pb.Netem netem = 1; + */ + public pb.Chaosdaemon.Netem.Builder getNetemBuilder() { + + onChanged(); + return getNetemFieldBuilder().getBuilder(); + } + /** + * .pb.Netem netem = 1; + */ + public pb.Chaosdaemon.NetemOrBuilder getNetemOrBuilder() { + if (netemBuilder_ != null) { + return netemBuilder_.getMessageOrBuilder(); + } else { + return netem_ == null ? + pb.Chaosdaemon.Netem.getDefaultInstance() : netem_; + } + } + /** + * .pb.Netem netem = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Netem, pb.Chaosdaemon.Netem.Builder, pb.Chaosdaemon.NetemOrBuilder> + getNetemFieldBuilder() { + if (netemBuilder_ == null) { + netemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Netem, pb.Chaosdaemon.Netem.Builder, pb.Chaosdaemon.NetemOrBuilder>( + getNetem(), + getParentForChildren(), + isClean()); + netem_ = null; + } + return netemBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private pb.Chaosdaemon.TcHandle handle_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> handleBuilder_; + /** + * .pb.TcHandle handle = 3; + * @return Whether the handle field is set. + */ + public boolean hasHandle() { + return handleBuilder_ != null || handle_ != null; + } + /** + * .pb.TcHandle handle = 3; + * @return The handle. + */ + public pb.Chaosdaemon.TcHandle getHandle() { + if (handleBuilder_ == null) { + return handle_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } else { + return handleBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle handle = 3; + */ + public Builder setHandle(pb.Chaosdaemon.TcHandle value) { + if (handleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handle_ = value; + onChanged(); + } else { + handleBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle handle = 3; + */ + public Builder setHandle( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (handleBuilder_ == null) { + handle_ = builderForValue.build(); + onChanged(); + } else { + handleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle handle = 3; + */ + public Builder mergeHandle(pb.Chaosdaemon.TcHandle value) { + if (handleBuilder_ == null) { + if (handle_ != null) { + handle_ = + pb.Chaosdaemon.TcHandle.newBuilder(handle_).mergeFrom(value).buildPartial(); + } else { + handle_ = value; + } + onChanged(); + } else { + handleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle handle = 3; + */ + public Builder clearHandle() { + if (handleBuilder_ == null) { + handle_ = null; + onChanged(); + } else { + handle_ = null; + handleBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle handle = 3; + */ + public pb.Chaosdaemon.TcHandle.Builder getHandleBuilder() { + + onChanged(); + return getHandleFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle handle = 3; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder() { + if (handleBuilder_ != null) { + return handleBuilder_.getMessageOrBuilder(); + } else { + return handle_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } + } + /** + * .pb.TcHandle handle = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getHandleFieldBuilder() { + if (handleBuilder_ == null) { + handleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getHandle(), + getParentForChildren(), + isClean()); + handle_ = null; + } + return handleBuilder_; + } + + private pb.Chaosdaemon.TcHandle parent_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> parentBuilder_; + /** + * .pb.TcHandle parent = 4; + * @return Whether the parent field is set. + */ + public boolean hasParent() { + return parentBuilder_ != null || parent_ != null; + } + /** + * .pb.TcHandle parent = 4; + * @return The parent. + */ + public pb.Chaosdaemon.TcHandle getParent() { + if (parentBuilder_ == null) { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } else { + return parentBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle parent = 4; + */ + public Builder setParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + } else { + parentBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 4; + */ + public Builder setParent( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (parentBuilder_ == null) { + parent_ = builderForValue.build(); + onChanged(); + } else { + parentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle parent = 4; + */ + public Builder mergeParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (parent_ != null) { + parent_ = + pb.Chaosdaemon.TcHandle.newBuilder(parent_).mergeFrom(value).buildPartial(); + } else { + parent_ = value; + } + onChanged(); + } else { + parentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 4; + */ + public Builder clearParent() { + if (parentBuilder_ == null) { + parent_ = null; + onChanged(); + } else { + parent_ = null; + parentBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle parent = 4; + */ + public pb.Chaosdaemon.TcHandle.Builder getParentBuilder() { + + onChanged(); + return getParentFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle parent = 4; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + if (parentBuilder_ != null) { + return parentBuilder_.getMessageOrBuilder(); + } else { + return parent_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + } + /** + * .pb.TcHandle parent = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getParentFieldBuilder() { + if (parentBuilder_ == null) { + parentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getParent(), + getParentForChildren(), + isClean()); + parent_ = null; + } + return parentBuilder_; + } + @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:pb.NetemRequest) + } + + // @@protoc_insertion_point(class_scope:pb.NetemRequest) + private static final pb.Chaosdaemon.NetemRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.NetemRequest(); + } + + public static pb.Chaosdaemon.NetemRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetemRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetemRequest(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 pb.Chaosdaemon.NetemRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NetemOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.Netem) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 time = 1; + * @return The time. + */ + int getTime(); + + /** + * uint32 jitter = 2; + * @return The jitter. + */ + int getJitter(); + + /** + * float delay_corr = 3; + * @return The delayCorr. + */ + float getDelayCorr(); + + /** + * uint32 limit = 4; + * @return The limit. + */ + int getLimit(); + + /** + * float loss = 5; + * @return The loss. + */ + float getLoss(); + + /** + * float loss_corr = 6; + * @return The lossCorr. + */ + float getLossCorr(); + + /** + * uint32 gap = 7; + * @return The gap. + */ + int getGap(); + + /** + * float duplicate = 8; + * @return The duplicate. + */ + float getDuplicate(); + + /** + * float duplicate_corr = 9; + * @return The duplicateCorr. + */ + float getDuplicateCorr(); + + /** + * float reorder = 10; + * @return The reorder. + */ + float getReorder(); + + /** + * float reorder_corr = 11; + * @return The reorderCorr. + */ + float getReorderCorr(); + + /** + * float corrupt = 12; + * @return The corrupt. + */ + float getCorrupt(); + + /** + * float corrupt_corr = 13; + * @return The corruptCorr. + */ + float getCorruptCorr(); + + /** + * .pb.TcHandle parent = 14; + * @return Whether the parent field is set. + */ + boolean hasParent(); + /** + * .pb.TcHandle parent = 14; + * @return The parent. + */ + pb.Chaosdaemon.TcHandle getParent(); + /** + * .pb.TcHandle parent = 14; + */ + pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder(); + + /** + * .pb.TcHandle handle = 15; + * @return Whether the handle field is set. + */ + boolean hasHandle(); + /** + * .pb.TcHandle handle = 15; + * @return The handle. + */ + pb.Chaosdaemon.TcHandle getHandle(); + /** + * .pb.TcHandle handle = 15; + */ + pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder(); + } + /** + * Protobuf type {@code pb.Netem} + */ + public static final class Netem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.Netem) + NetemOrBuilder { + private static final long serialVersionUID = 0L; + // Use Netem.newBuilder() to construct. + private Netem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Netem() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Netem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Netem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + time_ = input.readUInt32(); + break; + } + case 16: { + + jitter_ = input.readUInt32(); + break; + } + case 29: { + + delayCorr_ = input.readFloat(); + break; + } + case 32: { + + limit_ = input.readUInt32(); + break; + } + case 45: { + + loss_ = input.readFloat(); + break; + } + case 53: { + + lossCorr_ = input.readFloat(); + break; + } + case 56: { + + gap_ = input.readUInt32(); + break; + } + case 69: { + + duplicate_ = input.readFloat(); + break; + } + case 77: { + + duplicateCorr_ = input.readFloat(); + break; + } + case 85: { + + reorder_ = input.readFloat(); + break; + } + case 93: { + + reorderCorr_ = input.readFloat(); + break; + } + case 101: { + + corrupt_ = input.readFloat(); + break; + } + case 109: { + + corruptCorr_ = input.readFloat(); + break; + } + case 114: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (parent_ != null) { + subBuilder = parent_.toBuilder(); + } + parent_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parent_); + parent_ = subBuilder.buildPartial(); + } + + break; + } + case 122: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (handle_ != null) { + subBuilder = handle_.toBuilder(); + } + handle_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(handle_); + handle_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_Netem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Netem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Netem.class, pb.Chaosdaemon.Netem.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private int time_; + /** + * uint32 time = 1; + * @return The time. + */ + @java.lang.Override + public int getTime() { + return time_; + } + + public static final int JITTER_FIELD_NUMBER = 2; + private int jitter_; + /** + * uint32 jitter = 2; + * @return The jitter. + */ + @java.lang.Override + public int getJitter() { + return jitter_; + } + + public static final int DELAY_CORR_FIELD_NUMBER = 3; + private float delayCorr_; + /** + * float delay_corr = 3; + * @return The delayCorr. + */ + @java.lang.Override + public float getDelayCorr() { + return delayCorr_; + } + + public static final int LIMIT_FIELD_NUMBER = 4; + private int limit_; + /** + * uint32 limit = 4; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + public static final int LOSS_FIELD_NUMBER = 5; + private float loss_; + /** + * float loss = 5; + * @return The loss. + */ + @java.lang.Override + public float getLoss() { + return loss_; + } + + public static final int LOSS_CORR_FIELD_NUMBER = 6; + private float lossCorr_; + /** + * float loss_corr = 6; + * @return The lossCorr. + */ + @java.lang.Override + public float getLossCorr() { + return lossCorr_; + } + + public static final int GAP_FIELD_NUMBER = 7; + private int gap_; + /** + * uint32 gap = 7; + * @return The gap. + */ + @java.lang.Override + public int getGap() { + return gap_; + } + + public static final int DUPLICATE_FIELD_NUMBER = 8; + private float duplicate_; + /** + * float duplicate = 8; + * @return The duplicate. + */ + @java.lang.Override + public float getDuplicate() { + return duplicate_; + } + + public static final int DUPLICATE_CORR_FIELD_NUMBER = 9; + private float duplicateCorr_; + /** + * float duplicate_corr = 9; + * @return The duplicateCorr. + */ + @java.lang.Override + public float getDuplicateCorr() { + return duplicateCorr_; + } + + public static final int REORDER_FIELD_NUMBER = 10; + private float reorder_; + /** + * float reorder = 10; + * @return The reorder. + */ + @java.lang.Override + public float getReorder() { + return reorder_; + } + + public static final int REORDER_CORR_FIELD_NUMBER = 11; + private float reorderCorr_; + /** + * float reorder_corr = 11; + * @return The reorderCorr. + */ + @java.lang.Override + public float getReorderCorr() { + return reorderCorr_; + } + + public static final int CORRUPT_FIELD_NUMBER = 12; + private float corrupt_; + /** + * float corrupt = 12; + * @return The corrupt. + */ + @java.lang.Override + public float getCorrupt() { + return corrupt_; + } + + public static final int CORRUPT_CORR_FIELD_NUMBER = 13; + private float corruptCorr_; + /** + * float corrupt_corr = 13; + * @return The corruptCorr. + */ + @java.lang.Override + public float getCorruptCorr() { + return corruptCorr_; + } + + public static final int PARENT_FIELD_NUMBER = 14; + private pb.Chaosdaemon.TcHandle parent_; + /** + * .pb.TcHandle parent = 14; + * @return Whether the parent field is set. + */ + @java.lang.Override + public boolean hasParent() { + return parent_ != null; + } + /** + * .pb.TcHandle parent = 14; + * @return The parent. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getParent() { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + /** + * .pb.TcHandle parent = 14; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + return getParent(); + } + + public static final int HANDLE_FIELD_NUMBER = 15; + private pb.Chaosdaemon.TcHandle handle_; + /** + * .pb.TcHandle handle = 15; + * @return Whether the handle field is set. + */ + @java.lang.Override + public boolean hasHandle() { + return handle_ != null; + } + /** + * .pb.TcHandle handle = 15; + * @return The handle. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getHandle() { + return handle_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } + /** + * .pb.TcHandle handle = 15; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder() { + return getHandle(); + } + + 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 (time_ != 0) { + output.writeUInt32(1, time_); + } + if (jitter_ != 0) { + output.writeUInt32(2, jitter_); + } + if (java.lang.Float.floatToRawIntBits(delayCorr_) != 0) { + output.writeFloat(3, delayCorr_); + } + if (limit_ != 0) { + output.writeUInt32(4, limit_); + } + if (java.lang.Float.floatToRawIntBits(loss_) != 0) { + output.writeFloat(5, loss_); + } + if (java.lang.Float.floatToRawIntBits(lossCorr_) != 0) { + output.writeFloat(6, lossCorr_); + } + if (gap_ != 0) { + output.writeUInt32(7, gap_); + } + if (java.lang.Float.floatToRawIntBits(duplicate_) != 0) { + output.writeFloat(8, duplicate_); + } + if (java.lang.Float.floatToRawIntBits(duplicateCorr_) != 0) { + output.writeFloat(9, duplicateCorr_); + } + if (java.lang.Float.floatToRawIntBits(reorder_) != 0) { + output.writeFloat(10, reorder_); + } + if (java.lang.Float.floatToRawIntBits(reorderCorr_) != 0) { + output.writeFloat(11, reorderCorr_); + } + if (java.lang.Float.floatToRawIntBits(corrupt_) != 0) { + output.writeFloat(12, corrupt_); + } + if (java.lang.Float.floatToRawIntBits(corruptCorr_) != 0) { + output.writeFloat(13, corruptCorr_); + } + if (parent_ != null) { + output.writeMessage(14, getParent()); + } + if (handle_ != null) { + output.writeMessage(15, getHandle()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, time_); + } + if (jitter_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, jitter_); + } + if (java.lang.Float.floatToRawIntBits(delayCorr_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, delayCorr_); + } + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, limit_); + } + if (java.lang.Float.floatToRawIntBits(loss_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, loss_); + } + if (java.lang.Float.floatToRawIntBits(lossCorr_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, lossCorr_); + } + if (gap_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, gap_); + } + if (java.lang.Float.floatToRawIntBits(duplicate_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, duplicate_); + } + if (java.lang.Float.floatToRawIntBits(duplicateCorr_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(9, duplicateCorr_); + } + if (java.lang.Float.floatToRawIntBits(reorder_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(10, reorder_); + } + if (java.lang.Float.floatToRawIntBits(reorderCorr_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(11, reorderCorr_); + } + if (java.lang.Float.floatToRawIntBits(corrupt_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(12, corrupt_); + } + if (java.lang.Float.floatToRawIntBits(corruptCorr_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(13, corruptCorr_); + } + if (parent_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getParent()); + } + if (handle_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getHandle()); + } + 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 pb.Chaosdaemon.Netem)) { + return super.equals(obj); + } + pb.Chaosdaemon.Netem other = (pb.Chaosdaemon.Netem) obj; + + if (getTime() + != other.getTime()) return false; + if (getJitter() + != other.getJitter()) return false; + if (java.lang.Float.floatToIntBits(getDelayCorr()) + != java.lang.Float.floatToIntBits( + other.getDelayCorr())) return false; + if (getLimit() + != other.getLimit()) return false; + if (java.lang.Float.floatToIntBits(getLoss()) + != java.lang.Float.floatToIntBits( + other.getLoss())) return false; + if (java.lang.Float.floatToIntBits(getLossCorr()) + != java.lang.Float.floatToIntBits( + other.getLossCorr())) return false; + if (getGap() + != other.getGap()) return false; + if (java.lang.Float.floatToIntBits(getDuplicate()) + != java.lang.Float.floatToIntBits( + other.getDuplicate())) return false; + if (java.lang.Float.floatToIntBits(getDuplicateCorr()) + != java.lang.Float.floatToIntBits( + other.getDuplicateCorr())) return false; + if (java.lang.Float.floatToIntBits(getReorder()) + != java.lang.Float.floatToIntBits( + other.getReorder())) return false; + if (java.lang.Float.floatToIntBits(getReorderCorr()) + != java.lang.Float.floatToIntBits( + other.getReorderCorr())) return false; + if (java.lang.Float.floatToIntBits(getCorrupt()) + != java.lang.Float.floatToIntBits( + other.getCorrupt())) return false; + if (java.lang.Float.floatToIntBits(getCorruptCorr()) + != java.lang.Float.floatToIntBits( + other.getCorruptCorr())) return false; + if (hasParent() != other.hasParent()) return false; + if (hasParent()) { + if (!getParent() + .equals(other.getParent())) return false; + } + if (hasHandle() != other.hasHandle()) return false; + if (hasHandle()) { + if (!getHandle() + .equals(other.getHandle())) 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) + TIME_FIELD_NUMBER; + hash = (53 * hash) + getTime(); + hash = (37 * hash) + JITTER_FIELD_NUMBER; + hash = (53 * hash) + getJitter(); + hash = (37 * hash) + DELAY_CORR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDelayCorr()); + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + hash = (37 * hash) + LOSS_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLoss()); + hash = (37 * hash) + LOSS_CORR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLossCorr()); + hash = (37 * hash) + GAP_FIELD_NUMBER; + hash = (53 * hash) + getGap(); + hash = (37 * hash) + DUPLICATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDuplicate()); + hash = (37 * hash) + DUPLICATE_CORR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDuplicateCorr()); + hash = (37 * hash) + REORDER_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getReorder()); + hash = (37 * hash) + REORDER_CORR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getReorderCorr()); + hash = (37 * hash) + CORRUPT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getCorrupt()); + hash = (37 * hash) + CORRUPT_CORR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getCorruptCorr()); + if (hasParent()) { + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + } + if (hasHandle()) { + hash = (37 * hash) + HANDLE_FIELD_NUMBER; + hash = (53 * hash) + getHandle().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.Netem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Netem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Netem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Netem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Netem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Netem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Netem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Netem 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 pb.Chaosdaemon.Netem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Netem 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 pb.Chaosdaemon.Netem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Netem 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(pb.Chaosdaemon.Netem 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; + } + /** + * Protobuf type {@code pb.Netem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.Netem) + pb.Chaosdaemon.NetemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Netem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Netem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Netem.class, pb.Chaosdaemon.Netem.Builder.class); + } + + // Construct using pb.Chaosdaemon.Netem.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(); + time_ = 0; + + jitter_ = 0; + + delayCorr_ = 0F; + + limit_ = 0; + + loss_ = 0F; + + lossCorr_ = 0F; + + gap_ = 0; + + duplicate_ = 0F; + + duplicateCorr_ = 0F; + + reorder_ = 0F; + + reorderCorr_ = 0F; + + corrupt_ = 0F; + + corruptCorr_ = 0F; + + if (parentBuilder_ == null) { + parent_ = null; + } else { + parent_ = null; + parentBuilder_ = null; + } + if (handleBuilder_ == null) { + handle_ = null; + } else { + handle_ = null; + handleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_Netem_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.Netem getDefaultInstanceForType() { + return pb.Chaosdaemon.Netem.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.Netem build() { + pb.Chaosdaemon.Netem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.Netem buildPartial() { + pb.Chaosdaemon.Netem result = new pb.Chaosdaemon.Netem(this); + result.time_ = time_; + result.jitter_ = jitter_; + result.delayCorr_ = delayCorr_; + result.limit_ = limit_; + result.loss_ = loss_; + result.lossCorr_ = lossCorr_; + result.gap_ = gap_; + result.duplicate_ = duplicate_; + result.duplicateCorr_ = duplicateCorr_; + result.reorder_ = reorder_; + result.reorderCorr_ = reorderCorr_; + result.corrupt_ = corrupt_; + result.corruptCorr_ = corruptCorr_; + if (parentBuilder_ == null) { + result.parent_ = parent_; + } else { + result.parent_ = parentBuilder_.build(); + } + if (handleBuilder_ == null) { + result.handle_ = handle_; + } else { + result.handle_ = handleBuilder_.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 pb.Chaosdaemon.Netem) { + return mergeFrom((pb.Chaosdaemon.Netem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.Netem other) { + if (other == pb.Chaosdaemon.Netem.getDefaultInstance()) return this; + if (other.getTime() != 0) { + setTime(other.getTime()); + } + if (other.getJitter() != 0) { + setJitter(other.getJitter()); + } + if (other.getDelayCorr() != 0F) { + setDelayCorr(other.getDelayCorr()); + } + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + if (other.getLoss() != 0F) { + setLoss(other.getLoss()); + } + if (other.getLossCorr() != 0F) { + setLossCorr(other.getLossCorr()); + } + if (other.getGap() != 0) { + setGap(other.getGap()); + } + if (other.getDuplicate() != 0F) { + setDuplicate(other.getDuplicate()); + } + if (other.getDuplicateCorr() != 0F) { + setDuplicateCorr(other.getDuplicateCorr()); + } + if (other.getReorder() != 0F) { + setReorder(other.getReorder()); + } + if (other.getReorderCorr() != 0F) { + setReorderCorr(other.getReorderCorr()); + } + if (other.getCorrupt() != 0F) { + setCorrupt(other.getCorrupt()); + } + if (other.getCorruptCorr() != 0F) { + setCorruptCorr(other.getCorruptCorr()); + } + if (other.hasParent()) { + mergeParent(other.getParent()); + } + if (other.hasHandle()) { + mergeHandle(other.getHandle()); + } + 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 { + pb.Chaosdaemon.Netem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.Netem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int time_ ; + /** + * uint32 time = 1; + * @return The time. + */ + @java.lang.Override + public int getTime() { + return time_; + } + /** + * uint32 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(int value) { + + time_ = value; + onChanged(); + return this; + } + /** + * uint32 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + + time_ = 0; + onChanged(); + return this; + } + + private int jitter_ ; + /** + * uint32 jitter = 2; + * @return The jitter. + */ + @java.lang.Override + public int getJitter() { + return jitter_; + } + /** + * uint32 jitter = 2; + * @param value The jitter to set. + * @return This builder for chaining. + */ + public Builder setJitter(int value) { + + jitter_ = value; + onChanged(); + return this; + } + /** + * uint32 jitter = 2; + * @return This builder for chaining. + */ + public Builder clearJitter() { + + jitter_ = 0; + onChanged(); + return this; + } + + private float delayCorr_ ; + /** + * float delay_corr = 3; + * @return The delayCorr. + */ + @java.lang.Override + public float getDelayCorr() { + return delayCorr_; + } + /** + * float delay_corr = 3; + * @param value The delayCorr to set. + * @return This builder for chaining. + */ + public Builder setDelayCorr(float value) { + + delayCorr_ = value; + onChanged(); + return this; + } + /** + * float delay_corr = 3; + * @return This builder for chaining. + */ + public Builder clearDelayCorr() { + + delayCorr_ = 0F; + onChanged(); + return this; + } + + private int limit_ ; + /** + * uint32 limit = 4; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + * uint32 limit = 4; + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + onChanged(); + return this; + } + /** + * uint32 limit = 4; + * @return This builder for chaining. + */ + public Builder clearLimit() { + + limit_ = 0; + onChanged(); + return this; + } + + private float loss_ ; + /** + * float loss = 5; + * @return The loss. + */ + @java.lang.Override + public float getLoss() { + return loss_; + } + /** + * float loss = 5; + * @param value The loss to set. + * @return This builder for chaining. + */ + public Builder setLoss(float value) { + + loss_ = value; + onChanged(); + return this; + } + /** + * float loss = 5; + * @return This builder for chaining. + */ + public Builder clearLoss() { + + loss_ = 0F; + onChanged(); + return this; + } + + private float lossCorr_ ; + /** + * float loss_corr = 6; + * @return The lossCorr. + */ + @java.lang.Override + public float getLossCorr() { + return lossCorr_; + } + /** + * float loss_corr = 6; + * @param value The lossCorr to set. + * @return This builder for chaining. + */ + public Builder setLossCorr(float value) { + + lossCorr_ = value; + onChanged(); + return this; + } + /** + * float loss_corr = 6; + * @return This builder for chaining. + */ + public Builder clearLossCorr() { + + lossCorr_ = 0F; + onChanged(); + return this; + } + + private int gap_ ; + /** + * uint32 gap = 7; + * @return The gap. + */ + @java.lang.Override + public int getGap() { + return gap_; + } + /** + * uint32 gap = 7; + * @param value The gap to set. + * @return This builder for chaining. + */ + public Builder setGap(int value) { + + gap_ = value; + onChanged(); + return this; + } + /** + * uint32 gap = 7; + * @return This builder for chaining. + */ + public Builder clearGap() { + + gap_ = 0; + onChanged(); + return this; + } + + private float duplicate_ ; + /** + * float duplicate = 8; + * @return The duplicate. + */ + @java.lang.Override + public float getDuplicate() { + return duplicate_; + } + /** + * float duplicate = 8; + * @param value The duplicate to set. + * @return This builder for chaining. + */ + public Builder setDuplicate(float value) { + + duplicate_ = value; + onChanged(); + return this; + } + /** + * float duplicate = 8; + * @return This builder for chaining. + */ + public Builder clearDuplicate() { + + duplicate_ = 0F; + onChanged(); + return this; + } + + private float duplicateCorr_ ; + /** + * float duplicate_corr = 9; + * @return The duplicateCorr. + */ + @java.lang.Override + public float getDuplicateCorr() { + return duplicateCorr_; + } + /** + * float duplicate_corr = 9; + * @param value The duplicateCorr to set. + * @return This builder for chaining. + */ + public Builder setDuplicateCorr(float value) { + + duplicateCorr_ = value; + onChanged(); + return this; + } + /** + * float duplicate_corr = 9; + * @return This builder for chaining. + */ + public Builder clearDuplicateCorr() { + + duplicateCorr_ = 0F; + onChanged(); + return this; + } + + private float reorder_ ; + /** + * float reorder = 10; + * @return The reorder. + */ + @java.lang.Override + public float getReorder() { + return reorder_; + } + /** + * float reorder = 10; + * @param value The reorder to set. + * @return This builder for chaining. + */ + public Builder setReorder(float value) { + + reorder_ = value; + onChanged(); + return this; + } + /** + * float reorder = 10; + * @return This builder for chaining. + */ + public Builder clearReorder() { + + reorder_ = 0F; + onChanged(); + return this; + } + + private float reorderCorr_ ; + /** + * float reorder_corr = 11; + * @return The reorderCorr. + */ + @java.lang.Override + public float getReorderCorr() { + return reorderCorr_; + } + /** + * float reorder_corr = 11; + * @param value The reorderCorr to set. + * @return This builder for chaining. + */ + public Builder setReorderCorr(float value) { + + reorderCorr_ = value; + onChanged(); + return this; + } + /** + * float reorder_corr = 11; + * @return This builder for chaining. + */ + public Builder clearReorderCorr() { + + reorderCorr_ = 0F; + onChanged(); + return this; + } + + private float corrupt_ ; + /** + * float corrupt = 12; + * @return The corrupt. + */ + @java.lang.Override + public float getCorrupt() { + return corrupt_; + } + /** + * float corrupt = 12; + * @param value The corrupt to set. + * @return This builder for chaining. + */ + public Builder setCorrupt(float value) { + + corrupt_ = value; + onChanged(); + return this; + } + /** + * float corrupt = 12; + * @return This builder for chaining. + */ + public Builder clearCorrupt() { + + corrupt_ = 0F; + onChanged(); + return this; + } + + private float corruptCorr_ ; + /** + * float corrupt_corr = 13; + * @return The corruptCorr. + */ + @java.lang.Override + public float getCorruptCorr() { + return corruptCorr_; + } + /** + * float corrupt_corr = 13; + * @param value The corruptCorr to set. + * @return This builder for chaining. + */ + public Builder setCorruptCorr(float value) { + + corruptCorr_ = value; + onChanged(); + return this; + } + /** + * float corrupt_corr = 13; + * @return This builder for chaining. + */ + public Builder clearCorruptCorr() { + + corruptCorr_ = 0F; + onChanged(); + return this; + } + + private pb.Chaosdaemon.TcHandle parent_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> parentBuilder_; + /** + * .pb.TcHandle parent = 14; + * @return Whether the parent field is set. + */ + public boolean hasParent() { + return parentBuilder_ != null || parent_ != null; + } + /** + * .pb.TcHandle parent = 14; + * @return The parent. + */ + public pb.Chaosdaemon.TcHandle getParent() { + if (parentBuilder_ == null) { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } else { + return parentBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle parent = 14; + */ + public Builder setParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + } else { + parentBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 14; + */ + public Builder setParent( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (parentBuilder_ == null) { + parent_ = builderForValue.build(); + onChanged(); + } else { + parentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle parent = 14; + */ + public Builder mergeParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (parent_ != null) { + parent_ = + pb.Chaosdaemon.TcHandle.newBuilder(parent_).mergeFrom(value).buildPartial(); + } else { + parent_ = value; + } + onChanged(); + } else { + parentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 14; + */ + public Builder clearParent() { + if (parentBuilder_ == null) { + parent_ = null; + onChanged(); + } else { + parent_ = null; + parentBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle parent = 14; + */ + public pb.Chaosdaemon.TcHandle.Builder getParentBuilder() { + + onChanged(); + return getParentFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle parent = 14; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + if (parentBuilder_ != null) { + return parentBuilder_.getMessageOrBuilder(); + } else { + return parent_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + } + /** + * .pb.TcHandle parent = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getParentFieldBuilder() { + if (parentBuilder_ == null) { + parentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getParent(), + getParentForChildren(), + isClean()); + parent_ = null; + } + return parentBuilder_; + } + + private pb.Chaosdaemon.TcHandle handle_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> handleBuilder_; + /** + * .pb.TcHandle handle = 15; + * @return Whether the handle field is set. + */ + public boolean hasHandle() { + return handleBuilder_ != null || handle_ != null; + } + /** + * .pb.TcHandle handle = 15; + * @return The handle. + */ + public pb.Chaosdaemon.TcHandle getHandle() { + if (handleBuilder_ == null) { + return handle_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } else { + return handleBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle handle = 15; + */ + public Builder setHandle(pb.Chaosdaemon.TcHandle value) { + if (handleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handle_ = value; + onChanged(); + } else { + handleBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle handle = 15; + */ + public Builder setHandle( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (handleBuilder_ == null) { + handle_ = builderForValue.build(); + onChanged(); + } else { + handleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle handle = 15; + */ + public Builder mergeHandle(pb.Chaosdaemon.TcHandle value) { + if (handleBuilder_ == null) { + if (handle_ != null) { + handle_ = + pb.Chaosdaemon.TcHandle.newBuilder(handle_).mergeFrom(value).buildPartial(); + } else { + handle_ = value; + } + onChanged(); + } else { + handleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle handle = 15; + */ + public Builder clearHandle() { + if (handleBuilder_ == null) { + handle_ = null; + onChanged(); + } else { + handle_ = null; + handleBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle handle = 15; + */ + public pb.Chaosdaemon.TcHandle.Builder getHandleBuilder() { + + onChanged(); + return getHandleFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle handle = 15; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder() { + if (handleBuilder_ != null) { + return handleBuilder_.getMessageOrBuilder(); + } else { + return handle_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } + } + /** + * .pb.TcHandle handle = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getHandleFieldBuilder() { + if (handleBuilder_ == null) { + handleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getHandle(), + getParentForChildren(), + isClean()); + handle_ = null; + } + return handleBuilder_; + } + @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:pb.Netem) + } + + // @@protoc_insertion_point(class_scope:pb.Netem) + private static final pb.Chaosdaemon.Netem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.Netem(); + } + + public static pb.Chaosdaemon.Netem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Netem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Netem(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 pb.Chaosdaemon.Netem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TbfRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.TbfRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.Tbf tbf = 1; + * @return Whether the tbf field is set. + */ + boolean hasTbf(); + /** + * .pb.Tbf tbf = 1; + * @return The tbf. + */ + pb.Chaosdaemon.Tbf getTbf(); + /** + * .pb.Tbf tbf = 1; + */ + pb.Chaosdaemon.TbfOrBuilder getTbfOrBuilder(); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + } + /** + * Protobuf type {@code pb.TbfRequest} + */ + public static final class TbfRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.TbfRequest) + TbfRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TbfRequest.newBuilder() to construct. + private TbfRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TbfRequest() { + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TbfRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TbfRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.Tbf.Builder subBuilder = null; + if (tbf_ != null) { + subBuilder = tbf_.toBuilder(); + } + tbf_ = input.readMessage(pb.Chaosdaemon.Tbf.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tbf_); + tbf_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_TbfRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TbfRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TbfRequest.class, pb.Chaosdaemon.TbfRequest.Builder.class); + } + + public static final int TBF_FIELD_NUMBER = 1; + private pb.Chaosdaemon.Tbf tbf_; + /** + * .pb.Tbf tbf = 1; + * @return Whether the tbf field is set. + */ + @java.lang.Override + public boolean hasTbf() { + return tbf_ != null; + } + /** + * .pb.Tbf tbf = 1; + * @return The tbf. + */ + @java.lang.Override + public pb.Chaosdaemon.Tbf getTbf() { + return tbf_ == null ? pb.Chaosdaemon.Tbf.getDefaultInstance() : tbf_; + } + /** + * .pb.Tbf tbf = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.TbfOrBuilder getTbfOrBuilder() { + return getTbf(); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = 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 (tbf_ != null) { + output.writeMessage(1, getTbf()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tbf_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTbf()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + 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 pb.Chaosdaemon.TbfRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.TbfRequest other = (pb.Chaosdaemon.TbfRequest) obj; + + if (hasTbf() != other.hasTbf()) return false; + if (hasTbf()) { + if (!getTbf() + .equals(other.getTbf())) return false; + } + if (!getContainerId() + .equals(other.getContainerId())) 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 (hasTbf()) { + hash = (37 * hash) + TBF_FIELD_NUMBER; + hash = (53 * hash) + getTbf().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.TbfRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TbfRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TbfRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TbfRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TbfRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TbfRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TbfRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TbfRequest 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 pb.Chaosdaemon.TbfRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TbfRequest 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 pb.Chaosdaemon.TbfRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TbfRequest 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(pb.Chaosdaemon.TbfRequest 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; + } + /** + * Protobuf type {@code pb.TbfRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.TbfRequest) + pb.Chaosdaemon.TbfRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TbfRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TbfRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TbfRequest.class, pb.Chaosdaemon.TbfRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.TbfRequest.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 (tbfBuilder_ == null) { + tbf_ = null; + } else { + tbf_ = null; + tbfBuilder_ = null; + } + containerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_TbfRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.TbfRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.TbfRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.TbfRequest build() { + pb.Chaosdaemon.TbfRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.TbfRequest buildPartial() { + pb.Chaosdaemon.TbfRequest result = new pb.Chaosdaemon.TbfRequest(this); + if (tbfBuilder_ == null) { + result.tbf_ = tbf_; + } else { + result.tbf_ = tbfBuilder_.build(); + } + result.containerId_ = containerId_; + 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 pb.Chaosdaemon.TbfRequest) { + return mergeFrom((pb.Chaosdaemon.TbfRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.TbfRequest other) { + if (other == pb.Chaosdaemon.TbfRequest.getDefaultInstance()) return this; + if (other.hasTbf()) { + mergeTbf(other.getTbf()); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + 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 { + pb.Chaosdaemon.TbfRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.TbfRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.Tbf tbf_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Tbf, pb.Chaosdaemon.Tbf.Builder, pb.Chaosdaemon.TbfOrBuilder> tbfBuilder_; + /** + * .pb.Tbf tbf = 1; + * @return Whether the tbf field is set. + */ + public boolean hasTbf() { + return tbfBuilder_ != null || tbf_ != null; + } + /** + * .pb.Tbf tbf = 1; + * @return The tbf. + */ + public pb.Chaosdaemon.Tbf getTbf() { + if (tbfBuilder_ == null) { + return tbf_ == null ? pb.Chaosdaemon.Tbf.getDefaultInstance() : tbf_; + } else { + return tbfBuilder_.getMessage(); + } + } + /** + * .pb.Tbf tbf = 1; + */ + public Builder setTbf(pb.Chaosdaemon.Tbf value) { + if (tbfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tbf_ = value; + onChanged(); + } else { + tbfBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.Tbf tbf = 1; + */ + public Builder setTbf( + pb.Chaosdaemon.Tbf.Builder builderForValue) { + if (tbfBuilder_ == null) { + tbf_ = builderForValue.build(); + onChanged(); + } else { + tbfBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.Tbf tbf = 1; + */ + public Builder mergeTbf(pb.Chaosdaemon.Tbf value) { + if (tbfBuilder_ == null) { + if (tbf_ != null) { + tbf_ = + pb.Chaosdaemon.Tbf.newBuilder(tbf_).mergeFrom(value).buildPartial(); + } else { + tbf_ = value; + } + onChanged(); + } else { + tbfBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.Tbf tbf = 1; + */ + public Builder clearTbf() { + if (tbfBuilder_ == null) { + tbf_ = null; + onChanged(); + } else { + tbf_ = null; + tbfBuilder_ = null; + } + + return this; + } + /** + * .pb.Tbf tbf = 1; + */ + public pb.Chaosdaemon.Tbf.Builder getTbfBuilder() { + + onChanged(); + return getTbfFieldBuilder().getBuilder(); + } + /** + * .pb.Tbf tbf = 1; + */ + public pb.Chaosdaemon.TbfOrBuilder getTbfOrBuilder() { + if (tbfBuilder_ != null) { + return tbfBuilder_.getMessageOrBuilder(); + } else { + return tbf_ == null ? + pb.Chaosdaemon.Tbf.getDefaultInstance() : tbf_; + } + } + /** + * .pb.Tbf tbf = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Tbf, pb.Chaosdaemon.Tbf.Builder, pb.Chaosdaemon.TbfOrBuilder> + getTbfFieldBuilder() { + if (tbfBuilder_ == null) { + tbfBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Tbf, pb.Chaosdaemon.Tbf.Builder, pb.Chaosdaemon.TbfOrBuilder>( + getTbf(), + getParentForChildren(), + isClean()); + tbf_ = null; + } + return tbfBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = 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:pb.TbfRequest) + } + + // @@protoc_insertion_point(class_scope:pb.TbfRequest) + private static final pb.Chaosdaemon.TbfRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.TbfRequest(); + } + + public static pb.Chaosdaemon.TbfRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TbfRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TbfRequest(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 pb.Chaosdaemon.TbfRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TbfOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.Tbf) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 rate = 1; + * @return The rate. + */ + long getRate(); + + /** + * uint32 limit = 2; + * @return The limit. + */ + int getLimit(); + + /** + * uint32 buffer = 3; + * @return The buffer. + */ + int getBuffer(); + + /** + * uint64 peak_rate = 4; + * @return The peakRate. + */ + long getPeakRate(); + + /** + * uint32 min_burst = 5; + * @return The minBurst. + */ + int getMinBurst(); + } + /** + * Protobuf type {@code pb.Tbf} + */ + public static final class Tbf extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.Tbf) + TbfOrBuilder { + private static final long serialVersionUID = 0L; + // Use Tbf.newBuilder() to construct. + private Tbf(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Tbf() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Tbf(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Tbf( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + rate_ = input.readUInt64(); + break; + } + case 16: { + + limit_ = input.readUInt32(); + break; + } + case 24: { + + buffer_ = input.readUInt32(); + break; + } + case 32: { + + peakRate_ = input.readUInt64(); + break; + } + case 40: { + + minBurst_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_Tbf_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Tbf_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Tbf.class, pb.Chaosdaemon.Tbf.Builder.class); + } + + public static final int RATE_FIELD_NUMBER = 1; + private long rate_; + /** + * uint64 rate = 1; + * @return The rate. + */ + @java.lang.Override + public long getRate() { + return rate_; + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private int limit_; + /** + * uint32 limit = 2; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + public static final int BUFFER_FIELD_NUMBER = 3; + private int buffer_; + /** + * uint32 buffer = 3; + * @return The buffer. + */ + @java.lang.Override + public int getBuffer() { + return buffer_; + } + + public static final int PEAK_RATE_FIELD_NUMBER = 4; + private long peakRate_; + /** + * uint64 peak_rate = 4; + * @return The peakRate. + */ + @java.lang.Override + public long getPeakRate() { + return peakRate_; + } + + public static final int MIN_BURST_FIELD_NUMBER = 5; + private int minBurst_; + /** + * uint32 min_burst = 5; + * @return The minBurst. + */ + @java.lang.Override + public int getMinBurst() { + return minBurst_; + } + + 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 (rate_ != 0L) { + output.writeUInt64(1, rate_); + } + if (limit_ != 0) { + output.writeUInt32(2, limit_); + } + if (buffer_ != 0) { + output.writeUInt32(3, buffer_); + } + if (peakRate_ != 0L) { + output.writeUInt64(4, peakRate_); + } + if (minBurst_ != 0) { + output.writeUInt32(5, minBurst_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rate_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, rate_); + } + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, limit_); + } + if (buffer_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, buffer_); + } + if (peakRate_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, peakRate_); + } + if (minBurst_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, minBurst_); + } + 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 pb.Chaosdaemon.Tbf)) { + return super.equals(obj); + } + pb.Chaosdaemon.Tbf other = (pb.Chaosdaemon.Tbf) obj; + + if (getRate() + != other.getRate()) return false; + if (getLimit() + != other.getLimit()) return false; + if (getBuffer() + != other.getBuffer()) return false; + if (getPeakRate() + != other.getPeakRate()) return false; + if (getMinBurst() + != other.getMinBurst()) 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) + RATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRate()); + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + hash = (37 * hash) + BUFFER_FIELD_NUMBER; + hash = (53 * hash) + getBuffer(); + hash = (37 * hash) + PEAK_RATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPeakRate()); + hash = (37 * hash) + MIN_BURST_FIELD_NUMBER; + hash = (53 * hash) + getMinBurst(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.Tbf parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Tbf parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Tbf parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Tbf parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Tbf parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Tbf parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Tbf parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Tbf 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 pb.Chaosdaemon.Tbf parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Tbf 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 pb.Chaosdaemon.Tbf parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Tbf 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(pb.Chaosdaemon.Tbf 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; + } + /** + * Protobuf type {@code pb.Tbf} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.Tbf) + pb.Chaosdaemon.TbfOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Tbf_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Tbf_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Tbf.class, pb.Chaosdaemon.Tbf.Builder.class); + } + + // Construct using pb.Chaosdaemon.Tbf.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(); + rate_ = 0L; + + limit_ = 0; + + buffer_ = 0; + + peakRate_ = 0L; + + minBurst_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_Tbf_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.Tbf getDefaultInstanceForType() { + return pb.Chaosdaemon.Tbf.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.Tbf build() { + pb.Chaosdaemon.Tbf result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.Tbf buildPartial() { + pb.Chaosdaemon.Tbf result = new pb.Chaosdaemon.Tbf(this); + result.rate_ = rate_; + result.limit_ = limit_; + result.buffer_ = buffer_; + result.peakRate_ = peakRate_; + result.minBurst_ = minBurst_; + 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 pb.Chaosdaemon.Tbf) { + return mergeFrom((pb.Chaosdaemon.Tbf)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.Tbf other) { + if (other == pb.Chaosdaemon.Tbf.getDefaultInstance()) return this; + if (other.getRate() != 0L) { + setRate(other.getRate()); + } + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + if (other.getBuffer() != 0) { + setBuffer(other.getBuffer()); + } + if (other.getPeakRate() != 0L) { + setPeakRate(other.getPeakRate()); + } + if (other.getMinBurst() != 0) { + setMinBurst(other.getMinBurst()); + } + 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 { + pb.Chaosdaemon.Tbf parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.Tbf) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long rate_ ; + /** + * uint64 rate = 1; + * @return The rate. + */ + @java.lang.Override + public long getRate() { + return rate_; + } + /** + * uint64 rate = 1; + * @param value The rate to set. + * @return This builder for chaining. + */ + public Builder setRate(long value) { + + rate_ = value; + onChanged(); + return this; + } + /** + * uint64 rate = 1; + * @return This builder for chaining. + */ + public Builder clearRate() { + + rate_ = 0L; + onChanged(); + return this; + } + + private int limit_ ; + /** + * uint32 limit = 2; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + * uint32 limit = 2; + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + onChanged(); + return this; + } + /** + * uint32 limit = 2; + * @return This builder for chaining. + */ + public Builder clearLimit() { + + limit_ = 0; + onChanged(); + return this; + } + + private int buffer_ ; + /** + * uint32 buffer = 3; + * @return The buffer. + */ + @java.lang.Override + public int getBuffer() { + return buffer_; + } + /** + * uint32 buffer = 3; + * @param value The buffer to set. + * @return This builder for chaining. + */ + public Builder setBuffer(int value) { + + buffer_ = value; + onChanged(); + return this; + } + /** + * uint32 buffer = 3; + * @return This builder for chaining. + */ + public Builder clearBuffer() { + + buffer_ = 0; + onChanged(); + return this; + } + + private long peakRate_ ; + /** + * uint64 peak_rate = 4; + * @return The peakRate. + */ + @java.lang.Override + public long getPeakRate() { + return peakRate_; + } + /** + * uint64 peak_rate = 4; + * @param value The peakRate to set. + * @return This builder for chaining. + */ + public Builder setPeakRate(long value) { + + peakRate_ = value; + onChanged(); + return this; + } + /** + * uint64 peak_rate = 4; + * @return This builder for chaining. + */ + public Builder clearPeakRate() { + + peakRate_ = 0L; + onChanged(); + return this; + } + + private int minBurst_ ; + /** + * uint32 min_burst = 5; + * @return The minBurst. + */ + @java.lang.Override + public int getMinBurst() { + return minBurst_; + } + /** + * uint32 min_burst = 5; + * @param value The minBurst to set. + * @return This builder for chaining. + */ + public Builder setMinBurst(int value) { + + minBurst_ = value; + onChanged(); + return this; + } + /** + * uint32 min_burst = 5; + * @return This builder for chaining. + */ + public Builder clearMinBurst() { + + minBurst_ = 0; + 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:pb.Tbf) + } + + // @@protoc_insertion_point(class_scope:pb.Tbf) + private static final pb.Chaosdaemon.Tbf DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.Tbf(); + } + + public static pb.Chaosdaemon.Tbf getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tbf parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Tbf(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 pb.Chaosdaemon.Tbf getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QdiscRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.QdiscRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.Qdisc qdisc = 1; + * @return Whether the qdisc field is set. + */ + boolean hasQdisc(); + /** + * .pb.Qdisc qdisc = 1; + * @return The qdisc. + */ + pb.Chaosdaemon.Qdisc getQdisc(); + /** + * .pb.Qdisc qdisc = 1; + */ + pb.Chaosdaemon.QdiscOrBuilder getQdiscOrBuilder(); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + } + /** + * Protobuf type {@code pb.QdiscRequest} + */ + public static final class QdiscRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.QdiscRequest) + QdiscRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use QdiscRequest.newBuilder() to construct. + private QdiscRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QdiscRequest() { + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QdiscRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QdiscRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.Qdisc.Builder subBuilder = null; + if (qdisc_ != null) { + subBuilder = qdisc_.toBuilder(); + } + qdisc_ = input.readMessage(pb.Chaosdaemon.Qdisc.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(qdisc_); + qdisc_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_QdiscRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_QdiscRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.QdiscRequest.class, pb.Chaosdaemon.QdiscRequest.Builder.class); + } + + public static final int QDISC_FIELD_NUMBER = 1; + private pb.Chaosdaemon.Qdisc qdisc_; + /** + * .pb.Qdisc qdisc = 1; + * @return Whether the qdisc field is set. + */ + @java.lang.Override + public boolean hasQdisc() { + return qdisc_ != null; + } + /** + * .pb.Qdisc qdisc = 1; + * @return The qdisc. + */ + @java.lang.Override + public pb.Chaosdaemon.Qdisc getQdisc() { + return qdisc_ == null ? pb.Chaosdaemon.Qdisc.getDefaultInstance() : qdisc_; + } + /** + * .pb.Qdisc qdisc = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.QdiscOrBuilder getQdiscOrBuilder() { + return getQdisc(); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = 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 (qdisc_ != null) { + output.writeMessage(1, getQdisc()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (qdisc_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getQdisc()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + 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 pb.Chaosdaemon.QdiscRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.QdiscRequest other = (pb.Chaosdaemon.QdiscRequest) obj; + + if (hasQdisc() != other.hasQdisc()) return false; + if (hasQdisc()) { + if (!getQdisc() + .equals(other.getQdisc())) return false; + } + if (!getContainerId() + .equals(other.getContainerId())) 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 (hasQdisc()) { + hash = (37 * hash) + QDISC_FIELD_NUMBER; + hash = (53 * hash) + getQdisc().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.QdiscRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.QdiscRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.QdiscRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.QdiscRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.QdiscRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.QdiscRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.QdiscRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.QdiscRequest 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 pb.Chaosdaemon.QdiscRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.QdiscRequest 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 pb.Chaosdaemon.QdiscRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.QdiscRequest 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(pb.Chaosdaemon.QdiscRequest 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; + } + /** + * Protobuf type {@code pb.QdiscRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.QdiscRequest) + pb.Chaosdaemon.QdiscRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_QdiscRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_QdiscRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.QdiscRequest.class, pb.Chaosdaemon.QdiscRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.QdiscRequest.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 (qdiscBuilder_ == null) { + qdisc_ = null; + } else { + qdisc_ = null; + qdiscBuilder_ = null; + } + containerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_QdiscRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.QdiscRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.QdiscRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.QdiscRequest build() { + pb.Chaosdaemon.QdiscRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.QdiscRequest buildPartial() { + pb.Chaosdaemon.QdiscRequest result = new pb.Chaosdaemon.QdiscRequest(this); + if (qdiscBuilder_ == null) { + result.qdisc_ = qdisc_; + } else { + result.qdisc_ = qdiscBuilder_.build(); + } + result.containerId_ = containerId_; + 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 pb.Chaosdaemon.QdiscRequest) { + return mergeFrom((pb.Chaosdaemon.QdiscRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.QdiscRequest other) { + if (other == pb.Chaosdaemon.QdiscRequest.getDefaultInstance()) return this; + if (other.hasQdisc()) { + mergeQdisc(other.getQdisc()); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + 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 { + pb.Chaosdaemon.QdiscRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.QdiscRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.Qdisc qdisc_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Qdisc, pb.Chaosdaemon.Qdisc.Builder, pb.Chaosdaemon.QdiscOrBuilder> qdiscBuilder_; + /** + * .pb.Qdisc qdisc = 1; + * @return Whether the qdisc field is set. + */ + public boolean hasQdisc() { + return qdiscBuilder_ != null || qdisc_ != null; + } + /** + * .pb.Qdisc qdisc = 1; + * @return The qdisc. + */ + public pb.Chaosdaemon.Qdisc getQdisc() { + if (qdiscBuilder_ == null) { + return qdisc_ == null ? pb.Chaosdaemon.Qdisc.getDefaultInstance() : qdisc_; + } else { + return qdiscBuilder_.getMessage(); + } + } + /** + * .pb.Qdisc qdisc = 1; + */ + public Builder setQdisc(pb.Chaosdaemon.Qdisc value) { + if (qdiscBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + qdisc_ = value; + onChanged(); + } else { + qdiscBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.Qdisc qdisc = 1; + */ + public Builder setQdisc( + pb.Chaosdaemon.Qdisc.Builder builderForValue) { + if (qdiscBuilder_ == null) { + qdisc_ = builderForValue.build(); + onChanged(); + } else { + qdiscBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.Qdisc qdisc = 1; + */ + public Builder mergeQdisc(pb.Chaosdaemon.Qdisc value) { + if (qdiscBuilder_ == null) { + if (qdisc_ != null) { + qdisc_ = + pb.Chaosdaemon.Qdisc.newBuilder(qdisc_).mergeFrom(value).buildPartial(); + } else { + qdisc_ = value; + } + onChanged(); + } else { + qdiscBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.Qdisc qdisc = 1; + */ + public Builder clearQdisc() { + if (qdiscBuilder_ == null) { + qdisc_ = null; + onChanged(); + } else { + qdisc_ = null; + qdiscBuilder_ = null; + } + + return this; + } + /** + * .pb.Qdisc qdisc = 1; + */ + public pb.Chaosdaemon.Qdisc.Builder getQdiscBuilder() { + + onChanged(); + return getQdiscFieldBuilder().getBuilder(); + } + /** + * .pb.Qdisc qdisc = 1; + */ + public pb.Chaosdaemon.QdiscOrBuilder getQdiscOrBuilder() { + if (qdiscBuilder_ != null) { + return qdiscBuilder_.getMessageOrBuilder(); + } else { + return qdisc_ == null ? + pb.Chaosdaemon.Qdisc.getDefaultInstance() : qdisc_; + } + } + /** + * .pb.Qdisc qdisc = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Qdisc, pb.Chaosdaemon.Qdisc.Builder, pb.Chaosdaemon.QdiscOrBuilder> + getQdiscFieldBuilder() { + if (qdiscBuilder_ == null) { + qdiscBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Qdisc, pb.Chaosdaemon.Qdisc.Builder, pb.Chaosdaemon.QdiscOrBuilder>( + getQdisc(), + getParentForChildren(), + isClean()); + qdisc_ = null; + } + return qdiscBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = 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:pb.QdiscRequest) + } + + // @@protoc_insertion_point(class_scope:pb.QdiscRequest) + private static final pb.Chaosdaemon.QdiscRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.QdiscRequest(); + } + + public static pb.Chaosdaemon.QdiscRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QdiscRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QdiscRequest(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 pb.Chaosdaemon.QdiscRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QdiscOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.Qdisc) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.TcHandle parent = 1; + * @return Whether the parent field is set. + */ + boolean hasParent(); + /** + * .pb.TcHandle parent = 1; + * @return The parent. + */ + pb.Chaosdaemon.TcHandle getParent(); + /** + * .pb.TcHandle parent = 1; + */ + pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder(); + + /** + * .pb.TcHandle handle = 2; + * @return Whether the handle field is set. + */ + boolean hasHandle(); + /** + * .pb.TcHandle handle = 2; + * @return The handle. + */ + pb.Chaosdaemon.TcHandle getHandle(); + /** + * .pb.TcHandle handle = 2; + */ + pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder(); + + /** + * string type = 3; + * @return The type. + */ + java.lang.String getType(); + /** + * string type = 3; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * repeated string args = 4; + * @return A list containing the args. + */ + java.util.List + getArgsList(); + /** + * repeated string args = 4; + * @return The count of args. + */ + int getArgsCount(); + /** + * repeated string args = 4; + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * repeated string args = 4; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString + getArgsBytes(int index); + } + /** + * Protobuf type {@code pb.Qdisc} + */ + public static final class Qdisc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.Qdisc) + QdiscOrBuilder { + private static final long serialVersionUID = 0L; + // Use Qdisc.newBuilder() to construct. + private Qdisc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Qdisc() { + type_ = ""; + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Qdisc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Qdisc( + 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: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (parent_ != null) { + subBuilder = parent_.toBuilder(); + } + parent_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parent_); + parent_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (handle_ != null) { + subBuilder = handle_.toBuilder(); + } + handle_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(handle_); + handle_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + args_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + args_ = args_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Qdisc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Qdisc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Qdisc.class, pb.Chaosdaemon.Qdisc.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private pb.Chaosdaemon.TcHandle parent_; + /** + * .pb.TcHandle parent = 1; + * @return Whether the parent field is set. + */ + @java.lang.Override + public boolean hasParent() { + return parent_ != null; + } + /** + * .pb.TcHandle parent = 1; + * @return The parent. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getParent() { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + /** + * .pb.TcHandle parent = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + return getParent(); + } + + public static final int HANDLE_FIELD_NUMBER = 2; + private pb.Chaosdaemon.TcHandle handle_; + /** + * .pb.TcHandle handle = 2; + * @return Whether the handle field is set. + */ + @java.lang.Override + public boolean hasHandle() { + return handle_ != null; + } + /** + * .pb.TcHandle handle = 2; + * @return The handle. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getHandle() { + return handle_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } + /** + * .pb.TcHandle handle = 2; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder() { + return getHandle(); + } + + public static final int TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object type_; + /** + * string type = 3; + * @return The type. + */ + @java.lang.Override + 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; + } + } + /** + * string type = 3; + * @return The bytes for type. + */ + @java.lang.Override + 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 ARGS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList args_; + /** + * repeated string args = 4; + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList + getArgsList() { + return args_; + } + /** + * repeated string args = 4; + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * repeated string args = 4; + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * repeated string args = 4; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString + getArgsBytes(int index) { + return args_.getByteString(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 (parent_ != null) { + output.writeMessage(1, getParent()); + } + if (handle_ != null) { + output.writeMessage(2, getHandle()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, args_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parent_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getParent()); + } + if (handle_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getHandle()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().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 pb.Chaosdaemon.Qdisc)) { + return super.equals(obj); + } + pb.Chaosdaemon.Qdisc other = (pb.Chaosdaemon.Qdisc) obj; + + if (hasParent() != other.hasParent()) return false; + if (hasParent()) { + if (!getParent() + .equals(other.getParent())) return false; + } + if (hasHandle() != other.hasHandle()) return false; + if (hasHandle()) { + if (!getHandle() + .equals(other.getHandle())) return false; + } + if (!getType() + .equals(other.getType())) return false; + if (!getArgsList() + .equals(other.getArgsList())) 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 (hasParent()) { + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + } + if (hasHandle()) { + hash = (37 * hash) + HANDLE_FIELD_NUMBER; + hash = (53 * hash) + getHandle().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.Qdisc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Qdisc parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Qdisc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Qdisc parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Qdisc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Qdisc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Qdisc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Qdisc 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 pb.Chaosdaemon.Qdisc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Qdisc 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 pb.Chaosdaemon.Qdisc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Qdisc 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(pb.Chaosdaemon.Qdisc 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; + } + /** + * Protobuf type {@code pb.Qdisc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.Qdisc) + pb.Chaosdaemon.QdiscOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Qdisc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Qdisc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Qdisc.class, pb.Chaosdaemon.Qdisc.Builder.class); + } + + // Construct using pb.Chaosdaemon.Qdisc.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 (parentBuilder_ == null) { + parent_ = null; + } else { + parent_ = null; + parentBuilder_ = null; + } + if (handleBuilder_ == null) { + handle_ = null; + } else { + handle_ = null; + handleBuilder_ = null; + } + type_ = ""; + + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_Qdisc_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.Qdisc getDefaultInstanceForType() { + return pb.Chaosdaemon.Qdisc.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.Qdisc build() { + pb.Chaosdaemon.Qdisc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.Qdisc buildPartial() { + pb.Chaosdaemon.Qdisc result = new pb.Chaosdaemon.Qdisc(this); + int from_bitField0_ = bitField0_; + if (parentBuilder_ == null) { + result.parent_ = parent_; + } else { + result.parent_ = parentBuilder_.build(); + } + if (handleBuilder_ == null) { + result.handle_ = handle_; + } else { + result.handle_ = handleBuilder_.build(); + } + result.type_ = type_; + if (((bitField0_ & 0x00000001) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.args_ = args_; + 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 pb.Chaosdaemon.Qdisc) { + return mergeFrom((pb.Chaosdaemon.Qdisc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.Qdisc other) { + if (other == pb.Chaosdaemon.Qdisc.getDefaultInstance()) return this; + if (other.hasParent()) { + mergeParent(other.getParent()); + } + if (other.hasHandle()) { + mergeHandle(other.getHandle()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + 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 { + pb.Chaosdaemon.Qdisc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.Qdisc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private pb.Chaosdaemon.TcHandle parent_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> parentBuilder_; + /** + * .pb.TcHandle parent = 1; + * @return Whether the parent field is set. + */ + public boolean hasParent() { + return parentBuilder_ != null || parent_ != null; + } + /** + * .pb.TcHandle parent = 1; + * @return The parent. + */ + public pb.Chaosdaemon.TcHandle getParent() { + if (parentBuilder_ == null) { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } else { + return parentBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder setParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + } else { + parentBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder setParent( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (parentBuilder_ == null) { + parent_ = builderForValue.build(); + onChanged(); + } else { + parentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder mergeParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (parent_ != null) { + parent_ = + pb.Chaosdaemon.TcHandle.newBuilder(parent_).mergeFrom(value).buildPartial(); + } else { + parent_ = value; + } + onChanged(); + } else { + parentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder clearParent() { + if (parentBuilder_ == null) { + parent_ = null; + onChanged(); + } else { + parent_ = null; + parentBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public pb.Chaosdaemon.TcHandle.Builder getParentBuilder() { + + onChanged(); + return getParentFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle parent = 1; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + if (parentBuilder_ != null) { + return parentBuilder_.getMessageOrBuilder(); + } else { + return parent_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + } + /** + * .pb.TcHandle parent = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getParentFieldBuilder() { + if (parentBuilder_ == null) { + parentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getParent(), + getParentForChildren(), + isClean()); + parent_ = null; + } + return parentBuilder_; + } + + private pb.Chaosdaemon.TcHandle handle_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> handleBuilder_; + /** + * .pb.TcHandle handle = 2; + * @return Whether the handle field is set. + */ + public boolean hasHandle() { + return handleBuilder_ != null || handle_ != null; + } + /** + * .pb.TcHandle handle = 2; + * @return The handle. + */ + public pb.Chaosdaemon.TcHandle getHandle() { + if (handleBuilder_ == null) { + return handle_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } else { + return handleBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle handle = 2; + */ + public Builder setHandle(pb.Chaosdaemon.TcHandle value) { + if (handleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + handle_ = value; + onChanged(); + } else { + handleBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle handle = 2; + */ + public Builder setHandle( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (handleBuilder_ == null) { + handle_ = builderForValue.build(); + onChanged(); + } else { + handleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle handle = 2; + */ + public Builder mergeHandle(pb.Chaosdaemon.TcHandle value) { + if (handleBuilder_ == null) { + if (handle_ != null) { + handle_ = + pb.Chaosdaemon.TcHandle.newBuilder(handle_).mergeFrom(value).buildPartial(); + } else { + handle_ = value; + } + onChanged(); + } else { + handleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle handle = 2; + */ + public Builder clearHandle() { + if (handleBuilder_ == null) { + handle_ = null; + onChanged(); + } else { + handle_ = null; + handleBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle handle = 2; + */ + public pb.Chaosdaemon.TcHandle.Builder getHandleBuilder() { + + onChanged(); + return getHandleFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle handle = 2; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getHandleOrBuilder() { + if (handleBuilder_ != null) { + return handleBuilder_.getMessageOrBuilder(); + } else { + return handle_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : handle_; + } + } + /** + * .pb.TcHandle handle = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getHandleFieldBuilder() { + if (handleBuilder_ == null) { + handleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getHandle(), + getParentForChildren(), + isClean()); + handle_ = null; + } + return handleBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * string type = 3; + * @return The type. + */ + 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; + } + } + /** + * string type = 3; + * @return The bytes for type. + */ + 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; + } + } + /** + * string type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 3; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string args = 4; + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList + getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * repeated string args = 4; + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * repeated string args = 4; + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * repeated string args = 4; + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString + getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * repeated string args = 4; + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string args = 4; + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * repeated string args = 4; + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs( + java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, args_); + onChanged(); + return this; + } + /** + * repeated string args = 4; + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string args = 4; + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(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:pb.Qdisc) + } + + // @@protoc_insertion_point(class_scope:pb.Qdisc) + private static final pb.Chaosdaemon.Qdisc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.Qdisc(); + } + + public static pb.Chaosdaemon.Qdisc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Qdisc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Qdisc(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 pb.Chaosdaemon.Qdisc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EmatchFilterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.EmatchFilterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.EmatchFilter filter = 1; + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * .pb.EmatchFilter filter = 1; + * @return The filter. + */ + pb.Chaosdaemon.EmatchFilter getFilter(); + /** + * .pb.EmatchFilter filter = 1; + */ + pb.Chaosdaemon.EmatchFilterOrBuilder getFilterOrBuilder(); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + } + /** + * Protobuf type {@code pb.EmatchFilterRequest} + */ + public static final class EmatchFilterRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.EmatchFilterRequest) + EmatchFilterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use EmatchFilterRequest.newBuilder() to construct. + private EmatchFilterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EmatchFilterRequest() { + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EmatchFilterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EmatchFilterRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.EmatchFilter.Builder subBuilder = null; + if (filter_ != null) { + subBuilder = filter_.toBuilder(); + } + filter_ = input.readMessage(pb.Chaosdaemon.EmatchFilter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filter_); + filter_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_EmatchFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.EmatchFilterRequest.class, pb.Chaosdaemon.EmatchFilterRequest.Builder.class); + } + + public static final int FILTER_FIELD_NUMBER = 1; + private pb.Chaosdaemon.EmatchFilter filter_; + /** + * .pb.EmatchFilter filter = 1; + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return filter_ != null; + } + /** + * .pb.EmatchFilter filter = 1; + * @return The filter. + */ + @java.lang.Override + public pb.Chaosdaemon.EmatchFilter getFilter() { + return filter_ == null ? pb.Chaosdaemon.EmatchFilter.getDefaultInstance() : filter_; + } + /** + * .pb.EmatchFilter filter = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.EmatchFilterOrBuilder getFilterOrBuilder() { + return getFilter(); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = 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 (filter_ != null) { + output.writeMessage(1, getFilter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (filter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFilter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + 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 pb.Chaosdaemon.EmatchFilterRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.EmatchFilterRequest other = (pb.Chaosdaemon.EmatchFilterRequest) obj; + + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter() + .equals(other.getFilter())) return false; + } + if (!getContainerId() + .equals(other.getContainerId())) 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 (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.EmatchFilterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.EmatchFilterRequest 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 pb.Chaosdaemon.EmatchFilterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.EmatchFilterRequest 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 pb.Chaosdaemon.EmatchFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.EmatchFilterRequest 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(pb.Chaosdaemon.EmatchFilterRequest 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; + } + /** + * Protobuf type {@code pb.EmatchFilterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.EmatchFilterRequest) + pb.Chaosdaemon.EmatchFilterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.EmatchFilterRequest.class, pb.Chaosdaemon.EmatchFilterRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.EmatchFilterRequest.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 (filterBuilder_ == null) { + filter_ = null; + } else { + filter_ = null; + filterBuilder_ = null; + } + containerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilterRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.EmatchFilterRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.EmatchFilterRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.EmatchFilterRequest build() { + pb.Chaosdaemon.EmatchFilterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.EmatchFilterRequest buildPartial() { + pb.Chaosdaemon.EmatchFilterRequest result = new pb.Chaosdaemon.EmatchFilterRequest(this); + if (filterBuilder_ == null) { + result.filter_ = filter_; + } else { + result.filter_ = filterBuilder_.build(); + } + result.containerId_ = containerId_; + 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 pb.Chaosdaemon.EmatchFilterRequest) { + return mergeFrom((pb.Chaosdaemon.EmatchFilterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.EmatchFilterRequest other) { + if (other == pb.Chaosdaemon.EmatchFilterRequest.getDefaultInstance()) return this; + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + 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 { + pb.Chaosdaemon.EmatchFilterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.EmatchFilterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.EmatchFilter filter_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.EmatchFilter, pb.Chaosdaemon.EmatchFilter.Builder, pb.Chaosdaemon.EmatchFilterOrBuilder> filterBuilder_; + /** + * .pb.EmatchFilter filter = 1; + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return filterBuilder_ != null || filter_ != null; + } + /** + * .pb.EmatchFilter filter = 1; + * @return The filter. + */ + public pb.Chaosdaemon.EmatchFilter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null ? pb.Chaosdaemon.EmatchFilter.getDefaultInstance() : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + /** + * .pb.EmatchFilter filter = 1; + */ + public Builder setFilter(pb.Chaosdaemon.EmatchFilter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + onChanged(); + } else { + filterBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.EmatchFilter filter = 1; + */ + public Builder setFilter( + pb.Chaosdaemon.EmatchFilter.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + onChanged(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.EmatchFilter filter = 1; + */ + public Builder mergeFilter(pb.Chaosdaemon.EmatchFilter value) { + if (filterBuilder_ == null) { + if (filter_ != null) { + filter_ = + pb.Chaosdaemon.EmatchFilter.newBuilder(filter_).mergeFrom(value).buildPartial(); + } else { + filter_ = value; + } + onChanged(); + } else { + filterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.EmatchFilter filter = 1; + */ + public Builder clearFilter() { + if (filterBuilder_ == null) { + filter_ = null; + onChanged(); + } else { + filter_ = null; + filterBuilder_ = null; + } + + return this; + } + /** + * .pb.EmatchFilter filter = 1; + */ + public pb.Chaosdaemon.EmatchFilter.Builder getFilterBuilder() { + + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + /** + * .pb.EmatchFilter filter = 1; + */ + public pb.Chaosdaemon.EmatchFilterOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null ? + pb.Chaosdaemon.EmatchFilter.getDefaultInstance() : filter_; + } + } + /** + * .pb.EmatchFilter filter = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.EmatchFilter, pb.Chaosdaemon.EmatchFilter.Builder, pb.Chaosdaemon.EmatchFilterOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.EmatchFilter, pb.Chaosdaemon.EmatchFilter.Builder, pb.Chaosdaemon.EmatchFilterOrBuilder>( + getFilter(), + getParentForChildren(), + isClean()); + filter_ = null; + } + return filterBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = 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:pb.EmatchFilterRequest) + } + + // @@protoc_insertion_point(class_scope:pb.EmatchFilterRequest) + private static final pb.Chaosdaemon.EmatchFilterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.EmatchFilterRequest(); + } + + public static pb.Chaosdaemon.EmatchFilterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EmatchFilterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EmatchFilterRequest(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 pb.Chaosdaemon.EmatchFilterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EmatchFilterOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.EmatchFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * string match = 1; + * @return The match. + */ + java.lang.String getMatch(); + /** + * string match = 1; + * @return The bytes for match. + */ + com.google.protobuf.ByteString + getMatchBytes(); + + /** + * .pb.TcHandle parent = 2; + * @return Whether the parent field is set. + */ + boolean hasParent(); + /** + * .pb.TcHandle parent = 2; + * @return The parent. + */ + pb.Chaosdaemon.TcHandle getParent(); + /** + * .pb.TcHandle parent = 2; + */ + pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder(); + + /** + * .pb.TcHandle classid = 3; + * @return Whether the classid field is set. + */ + boolean hasClassid(); + /** + * .pb.TcHandle classid = 3; + * @return The classid. + */ + pb.Chaosdaemon.TcHandle getClassid(); + /** + * .pb.TcHandle classid = 3; + */ + pb.Chaosdaemon.TcHandleOrBuilder getClassidOrBuilder(); + } + /** + * Protobuf type {@code pb.EmatchFilter} + */ + public static final class EmatchFilter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.EmatchFilter) + EmatchFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use EmatchFilter.newBuilder() to construct. + private EmatchFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EmatchFilter() { + match_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EmatchFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EmatchFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + match_ = s; + break; + } + case 18: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (parent_ != null) { + subBuilder = parent_.toBuilder(); + } + parent_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parent_); + parent_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (classid_ != null) { + subBuilder = classid_.toBuilder(); + } + classid_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(classid_); + classid_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_EmatchFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.EmatchFilter.class, pb.Chaosdaemon.EmatchFilter.Builder.class); + } + + public static final int MATCH_FIELD_NUMBER = 1; + private volatile java.lang.Object match_; + /** + * string match = 1; + * @return The match. + */ + @java.lang.Override + public java.lang.String getMatch() { + java.lang.Object ref = match_; + 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(); + match_ = s; + return s; + } + } + /** + * string match = 1; + * @return The bytes for match. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchBytes() { + java.lang.Object ref = match_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + match_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 2; + private pb.Chaosdaemon.TcHandle parent_; + /** + * .pb.TcHandle parent = 2; + * @return Whether the parent field is set. + */ + @java.lang.Override + public boolean hasParent() { + return parent_ != null; + } + /** + * .pb.TcHandle parent = 2; + * @return The parent. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getParent() { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + /** + * .pb.TcHandle parent = 2; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + return getParent(); + } + + public static final int CLASSID_FIELD_NUMBER = 3; + private pb.Chaosdaemon.TcHandle classid_; + /** + * .pb.TcHandle classid = 3; + * @return Whether the classid field is set. + */ + @java.lang.Override + public boolean hasClassid() { + return classid_ != null; + } + /** + * .pb.TcHandle classid = 3; + * @return The classid. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getClassid() { + return classid_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : classid_; + } + /** + * .pb.TcHandle classid = 3; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getClassidOrBuilder() { + return getClassid(); + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(match_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, match_); + } + if (parent_ != null) { + output.writeMessage(2, getParent()); + } + if (classid_ != null) { + output.writeMessage(3, getClassid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(match_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, match_); + } + if (parent_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getParent()); + } + if (classid_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getClassid()); + } + 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 pb.Chaosdaemon.EmatchFilter)) { + return super.equals(obj); + } + pb.Chaosdaemon.EmatchFilter other = (pb.Chaosdaemon.EmatchFilter) obj; + + if (!getMatch() + .equals(other.getMatch())) return false; + if (hasParent() != other.hasParent()) return false; + if (hasParent()) { + if (!getParent() + .equals(other.getParent())) return false; + } + if (hasClassid() != other.hasClassid()) return false; + if (hasClassid()) { + if (!getClassid() + .equals(other.getClassid())) 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) + MATCH_FIELD_NUMBER; + hash = (53 * hash) + getMatch().hashCode(); + if (hasParent()) { + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + } + if (hasClassid()) { + hash = (37 * hash) + CLASSID_FIELD_NUMBER; + hash = (53 * hash) + getClassid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.EmatchFilter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.EmatchFilter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.EmatchFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.EmatchFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.EmatchFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.EmatchFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.EmatchFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.EmatchFilter 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 pb.Chaosdaemon.EmatchFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.EmatchFilter 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 pb.Chaosdaemon.EmatchFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.EmatchFilter 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(pb.Chaosdaemon.EmatchFilter 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; + } + /** + * Protobuf type {@code pb.EmatchFilter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.EmatchFilter) + pb.Chaosdaemon.EmatchFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.EmatchFilter.class, pb.Chaosdaemon.EmatchFilter.Builder.class); + } + + // Construct using pb.Chaosdaemon.EmatchFilter.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(); + match_ = ""; + + if (parentBuilder_ == null) { + parent_ = null; + } else { + parent_ = null; + parentBuilder_ = null; + } + if (classidBuilder_ == null) { + classid_ = null; + } else { + classid_ = null; + classidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_EmatchFilter_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.EmatchFilter getDefaultInstanceForType() { + return pb.Chaosdaemon.EmatchFilter.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.EmatchFilter build() { + pb.Chaosdaemon.EmatchFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.EmatchFilter buildPartial() { + pb.Chaosdaemon.EmatchFilter result = new pb.Chaosdaemon.EmatchFilter(this); + result.match_ = match_; + if (parentBuilder_ == null) { + result.parent_ = parent_; + } else { + result.parent_ = parentBuilder_.build(); + } + if (classidBuilder_ == null) { + result.classid_ = classid_; + } else { + result.classid_ = classidBuilder_.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 pb.Chaosdaemon.EmatchFilter) { + return mergeFrom((pb.Chaosdaemon.EmatchFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.EmatchFilter other) { + if (other == pb.Chaosdaemon.EmatchFilter.getDefaultInstance()) return this; + if (!other.getMatch().isEmpty()) { + match_ = other.match_; + onChanged(); + } + if (other.hasParent()) { + mergeParent(other.getParent()); + } + if (other.hasClassid()) { + mergeClassid(other.getClassid()); + } + 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 { + pb.Chaosdaemon.EmatchFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.EmatchFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object match_ = ""; + /** + * string match = 1; + * @return The match. + */ + public java.lang.String getMatch() { + java.lang.Object ref = match_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + match_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string match = 1; + * @return The bytes for match. + */ + public com.google.protobuf.ByteString + getMatchBytes() { + java.lang.Object ref = match_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + match_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string match = 1; + * @param value The match to set. + * @return This builder for chaining. + */ + public Builder setMatch( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + match_ = value; + onChanged(); + return this; + } + /** + * string match = 1; + * @return This builder for chaining. + */ + public Builder clearMatch() { + + match_ = getDefaultInstance().getMatch(); + onChanged(); + return this; + } + /** + * string match = 1; + * @param value The bytes for match to set. + * @return This builder for chaining. + */ + public Builder setMatchBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + match_ = value; + onChanged(); + return this; + } + + private pb.Chaosdaemon.TcHandle parent_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> parentBuilder_; + /** + * .pb.TcHandle parent = 2; + * @return Whether the parent field is set. + */ + public boolean hasParent() { + return parentBuilder_ != null || parent_ != null; + } + /** + * .pb.TcHandle parent = 2; + * @return The parent. + */ + public pb.Chaosdaemon.TcHandle getParent() { + if (parentBuilder_ == null) { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } else { + return parentBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle parent = 2; + */ + public Builder setParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + } else { + parentBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 2; + */ + public Builder setParent( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (parentBuilder_ == null) { + parent_ = builderForValue.build(); + onChanged(); + } else { + parentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle parent = 2; + */ + public Builder mergeParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (parent_ != null) { + parent_ = + pb.Chaosdaemon.TcHandle.newBuilder(parent_).mergeFrom(value).buildPartial(); + } else { + parent_ = value; + } + onChanged(); + } else { + parentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 2; + */ + public Builder clearParent() { + if (parentBuilder_ == null) { + parent_ = null; + onChanged(); + } else { + parent_ = null; + parentBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle parent = 2; + */ + public pb.Chaosdaemon.TcHandle.Builder getParentBuilder() { + + onChanged(); + return getParentFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle parent = 2; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + if (parentBuilder_ != null) { + return parentBuilder_.getMessageOrBuilder(); + } else { + return parent_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + } + /** + * .pb.TcHandle parent = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getParentFieldBuilder() { + if (parentBuilder_ == null) { + parentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getParent(), + getParentForChildren(), + isClean()); + parent_ = null; + } + return parentBuilder_; + } + + private pb.Chaosdaemon.TcHandle classid_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> classidBuilder_; + /** + * .pb.TcHandle classid = 3; + * @return Whether the classid field is set. + */ + public boolean hasClassid() { + return classidBuilder_ != null || classid_ != null; + } + /** + * .pb.TcHandle classid = 3; + * @return The classid. + */ + public pb.Chaosdaemon.TcHandle getClassid() { + if (classidBuilder_ == null) { + return classid_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : classid_; + } else { + return classidBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle classid = 3; + */ + public Builder setClassid(pb.Chaosdaemon.TcHandle value) { + if (classidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + classid_ = value; + onChanged(); + } else { + classidBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle classid = 3; + */ + public Builder setClassid( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (classidBuilder_ == null) { + classid_ = builderForValue.build(); + onChanged(); + } else { + classidBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle classid = 3; + */ + public Builder mergeClassid(pb.Chaosdaemon.TcHandle value) { + if (classidBuilder_ == null) { + if (classid_ != null) { + classid_ = + pb.Chaosdaemon.TcHandle.newBuilder(classid_).mergeFrom(value).buildPartial(); + } else { + classid_ = value; + } + onChanged(); + } else { + classidBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle classid = 3; + */ + public Builder clearClassid() { + if (classidBuilder_ == null) { + classid_ = null; + onChanged(); + } else { + classid_ = null; + classidBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle classid = 3; + */ + public pb.Chaosdaemon.TcHandle.Builder getClassidBuilder() { + + onChanged(); + return getClassidFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle classid = 3; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getClassidOrBuilder() { + if (classidBuilder_ != null) { + return classidBuilder_.getMessageOrBuilder(); + } else { + return classid_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : classid_; + } + } + /** + * .pb.TcHandle classid = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getClassidFieldBuilder() { + if (classidBuilder_ == null) { + classidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getClassid(), + getParentForChildren(), + isClean()); + classid_ = null; + } + return classidBuilder_; + } + @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:pb.EmatchFilter) + } + + // @@protoc_insertion_point(class_scope:pb.EmatchFilter) + private static final pb.Chaosdaemon.EmatchFilter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.EmatchFilter(); + } + + public static pb.Chaosdaemon.EmatchFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EmatchFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EmatchFilter(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 pb.Chaosdaemon.EmatchFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TcFilterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.TcFilterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.TcFilter filter = 1; + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * .pb.TcFilter filter = 1; + * @return The filter. + */ + pb.Chaosdaemon.TcFilter getFilter(); + /** + * .pb.TcFilter filter = 1; + */ + pb.Chaosdaemon.TcFilterOrBuilder getFilterOrBuilder(); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + } + /** + * Protobuf type {@code pb.TcFilterRequest} + */ + public static final class TcFilterRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.TcFilterRequest) + TcFilterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TcFilterRequest.newBuilder() to construct. + private TcFilterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TcFilterRequest() { + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TcFilterRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TcFilterRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.TcFilter.Builder subBuilder = null; + if (filter_ != null) { + subBuilder = filter_.toBuilder(); + } + filter_ = input.readMessage(pb.Chaosdaemon.TcFilter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filter_); + filter_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_TcFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcFilterRequest.class, pb.Chaosdaemon.TcFilterRequest.Builder.class); + } + + public static final int FILTER_FIELD_NUMBER = 1; + private pb.Chaosdaemon.TcFilter filter_; + /** + * .pb.TcFilter filter = 1; + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return filter_ != null; + } + /** + * .pb.TcFilter filter = 1; + * @return The filter. + */ + @java.lang.Override + public pb.Chaosdaemon.TcFilter getFilter() { + return filter_ == null ? pb.Chaosdaemon.TcFilter.getDefaultInstance() : filter_; + } + /** + * .pb.TcFilter filter = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.TcFilterOrBuilder getFilterOrBuilder() { + return getFilter(); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = 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 (filter_ != null) { + output.writeMessage(1, getFilter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (filter_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFilter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + 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 pb.Chaosdaemon.TcFilterRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.TcFilterRequest other = (pb.Chaosdaemon.TcFilterRequest) obj; + + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter() + .equals(other.getFilter())) return false; + } + if (!getContainerId() + .equals(other.getContainerId())) 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 (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.TcFilterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcFilterRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcFilterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcFilterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcFilterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcFilterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcFilterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcFilterRequest 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 pb.Chaosdaemon.TcFilterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcFilterRequest 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 pb.Chaosdaemon.TcFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcFilterRequest 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(pb.Chaosdaemon.TcFilterRequest 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; + } + /** + * Protobuf type {@code pb.TcFilterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.TcFilterRequest) + pb.Chaosdaemon.TcFilterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TcFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcFilterRequest.class, pb.Chaosdaemon.TcFilterRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.TcFilterRequest.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 (filterBuilder_ == null) { + filter_ = null; + } else { + filter_ = null; + filterBuilder_ = null; + } + containerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_TcFilterRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.TcFilterRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.TcFilterRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.TcFilterRequest build() { + pb.Chaosdaemon.TcFilterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.TcFilterRequest buildPartial() { + pb.Chaosdaemon.TcFilterRequest result = new pb.Chaosdaemon.TcFilterRequest(this); + if (filterBuilder_ == null) { + result.filter_ = filter_; + } else { + result.filter_ = filterBuilder_.build(); + } + result.containerId_ = containerId_; + 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 pb.Chaosdaemon.TcFilterRequest) { + return mergeFrom((pb.Chaosdaemon.TcFilterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.TcFilterRequest other) { + if (other == pb.Chaosdaemon.TcFilterRequest.getDefaultInstance()) return this; + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + 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 { + pb.Chaosdaemon.TcFilterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.TcFilterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.TcFilter filter_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcFilter, pb.Chaosdaemon.TcFilter.Builder, pb.Chaosdaemon.TcFilterOrBuilder> filterBuilder_; + /** + * .pb.TcFilter filter = 1; + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return filterBuilder_ != null || filter_ != null; + } + /** + * .pb.TcFilter filter = 1; + * @return The filter. + */ + public pb.Chaosdaemon.TcFilter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null ? pb.Chaosdaemon.TcFilter.getDefaultInstance() : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + /** + * .pb.TcFilter filter = 1; + */ + public Builder setFilter(pb.Chaosdaemon.TcFilter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + onChanged(); + } else { + filterBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcFilter filter = 1; + */ + public Builder setFilter( + pb.Chaosdaemon.TcFilter.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + onChanged(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcFilter filter = 1; + */ + public Builder mergeFilter(pb.Chaosdaemon.TcFilter value) { + if (filterBuilder_ == null) { + if (filter_ != null) { + filter_ = + pb.Chaosdaemon.TcFilter.newBuilder(filter_).mergeFrom(value).buildPartial(); + } else { + filter_ = value; + } + onChanged(); + } else { + filterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcFilter filter = 1; + */ + public Builder clearFilter() { + if (filterBuilder_ == null) { + filter_ = null; + onChanged(); + } else { + filter_ = null; + filterBuilder_ = null; + } + + return this; + } + /** + * .pb.TcFilter filter = 1; + */ + public pb.Chaosdaemon.TcFilter.Builder getFilterBuilder() { + + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + /** + * .pb.TcFilter filter = 1; + */ + public pb.Chaosdaemon.TcFilterOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null ? + pb.Chaosdaemon.TcFilter.getDefaultInstance() : filter_; + } + } + /** + * .pb.TcFilter filter = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcFilter, pb.Chaosdaemon.TcFilter.Builder, pb.Chaosdaemon.TcFilterOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcFilter, pb.Chaosdaemon.TcFilter.Builder, pb.Chaosdaemon.TcFilterOrBuilder>( + getFilter(), + getParentForChildren(), + isClean()); + filter_ = null; + } + return filterBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = 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:pb.TcFilterRequest) + } + + // @@protoc_insertion_point(class_scope:pb.TcFilterRequest) + private static final pb.Chaosdaemon.TcFilterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.TcFilterRequest(); + } + + public static pb.Chaosdaemon.TcFilterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TcFilterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TcFilterRequest(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 pb.Chaosdaemon.TcFilterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TcFilterOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.TcFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.TcHandle parent = 1; + * @return Whether the parent field is set. + */ + boolean hasParent(); + /** + * .pb.TcHandle parent = 1; + * @return The parent. + */ + pb.Chaosdaemon.TcHandle getParent(); + /** + * .pb.TcHandle parent = 1; + */ + pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder(); + } + /** + * Protobuf type {@code pb.TcFilter} + */ + public static final class TcFilter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.TcFilter) + TcFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use TcFilter.newBuilder() to construct. + private TcFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TcFilter() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TcFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TcFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + pb.Chaosdaemon.TcHandle.Builder subBuilder = null; + if (parent_ != null) { + subBuilder = parent_.toBuilder(); + } + parent_ = input.readMessage(pb.Chaosdaemon.TcHandle.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(parent_); + parent_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_TcFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcFilter.class, pb.Chaosdaemon.TcFilter.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private pb.Chaosdaemon.TcHandle parent_; + /** + * .pb.TcHandle parent = 1; + * @return Whether the parent field is set. + */ + @java.lang.Override + public boolean hasParent() { + return parent_ != null; + } + /** + * .pb.TcHandle parent = 1; + * @return The parent. + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandle getParent() { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + /** + * .pb.TcHandle parent = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + return getParent(); + } + + 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 (parent_ != null) { + output.writeMessage(1, getParent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parent_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getParent()); + } + 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 pb.Chaosdaemon.TcFilter)) { + return super.equals(obj); + } + pb.Chaosdaemon.TcFilter other = (pb.Chaosdaemon.TcFilter) obj; + + if (hasParent() != other.hasParent()) return false; + if (hasParent()) { + if (!getParent() + .equals(other.getParent())) 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 (hasParent()) { + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.TcFilter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcFilter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcFilter 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 pb.Chaosdaemon.TcFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcFilter 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 pb.Chaosdaemon.TcFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcFilter 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(pb.Chaosdaemon.TcFilter 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; + } + /** + * Protobuf type {@code pb.TcFilter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.TcFilter) + pb.Chaosdaemon.TcFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TcFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcFilter.class, pb.Chaosdaemon.TcFilter.Builder.class); + } + + // Construct using pb.Chaosdaemon.TcFilter.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 (parentBuilder_ == null) { + parent_ = null; + } else { + parent_ = null; + parentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_TcFilter_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.TcFilter getDefaultInstanceForType() { + return pb.Chaosdaemon.TcFilter.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.TcFilter build() { + pb.Chaosdaemon.TcFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.TcFilter buildPartial() { + pb.Chaosdaemon.TcFilter result = new pb.Chaosdaemon.TcFilter(this); + if (parentBuilder_ == null) { + result.parent_ = parent_; + } else { + result.parent_ = parentBuilder_.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 pb.Chaosdaemon.TcFilter) { + return mergeFrom((pb.Chaosdaemon.TcFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.TcFilter other) { + if (other == pb.Chaosdaemon.TcFilter.getDefaultInstance()) return this; + if (other.hasParent()) { + mergeParent(other.getParent()); + } + 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 { + pb.Chaosdaemon.TcFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.TcFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pb.Chaosdaemon.TcHandle parent_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> parentBuilder_; + /** + * .pb.TcHandle parent = 1; + * @return Whether the parent field is set. + */ + public boolean hasParent() { + return parentBuilder_ != null || parent_ != null; + } + /** + * .pb.TcHandle parent = 1; + * @return The parent. + */ + public pb.Chaosdaemon.TcHandle getParent() { + if (parentBuilder_ == null) { + return parent_ == null ? pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } else { + return parentBuilder_.getMessage(); + } + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder setParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + } else { + parentBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder setParent( + pb.Chaosdaemon.TcHandle.Builder builderForValue) { + if (parentBuilder_ == null) { + parent_ = builderForValue.build(); + onChanged(); + } else { + parentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder mergeParent(pb.Chaosdaemon.TcHandle value) { + if (parentBuilder_ == null) { + if (parent_ != null) { + parent_ = + pb.Chaosdaemon.TcHandle.newBuilder(parent_).mergeFrom(value).buildPartial(); + } else { + parent_ = value; + } + onChanged(); + } else { + parentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public Builder clearParent() { + if (parentBuilder_ == null) { + parent_ = null; + onChanged(); + } else { + parent_ = null; + parentBuilder_ = null; + } + + return this; + } + /** + * .pb.TcHandle parent = 1; + */ + public pb.Chaosdaemon.TcHandle.Builder getParentBuilder() { + + onChanged(); + return getParentFieldBuilder().getBuilder(); + } + /** + * .pb.TcHandle parent = 1; + */ + public pb.Chaosdaemon.TcHandleOrBuilder getParentOrBuilder() { + if (parentBuilder_ != null) { + return parentBuilder_.getMessageOrBuilder(); + } else { + return parent_ == null ? + pb.Chaosdaemon.TcHandle.getDefaultInstance() : parent_; + } + } + /** + * .pb.TcHandle parent = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder> + getParentFieldBuilder() { + if (parentBuilder_ == null) { + parentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.TcHandle, pb.Chaosdaemon.TcHandle.Builder, pb.Chaosdaemon.TcHandleOrBuilder>( + getParent(), + getParentForChildren(), + isClean()); + parent_ = null; + } + return parentBuilder_; + } + @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:pb.TcFilter) + } + + // @@protoc_insertion_point(class_scope:pb.TcFilter) + private static final pb.Chaosdaemon.TcFilter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.TcFilter(); + } + + public static pb.Chaosdaemon.TcFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TcFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TcFilter(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 pb.Chaosdaemon.TcFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IPSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.IPSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .pb.IPSet ipsets = 1; + */ + java.util.List + getIpsetsList(); + /** + * repeated .pb.IPSet ipsets = 1; + */ + pb.Chaosdaemon.IPSet getIpsets(int index); + /** + * repeated .pb.IPSet ipsets = 1; + */ + int getIpsetsCount(); + /** + * repeated .pb.IPSet ipsets = 1; + */ + java.util.List + getIpsetsOrBuilderList(); + /** + * repeated .pb.IPSet ipsets = 1; + */ + pb.Chaosdaemon.IPSetOrBuilder getIpsetsOrBuilder( + int index); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * bool enterNS = 3; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.IPSetsRequest} + */ + public static final class IPSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.IPSetsRequest) + IPSetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use IPSetsRequest.newBuilder() to construct. + private IPSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IPSetsRequest() { + ipsets_ = java.util.Collections.emptyList(); + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IPSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IPSetsRequest( + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ipsets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ipsets_.add( + input.readMessage(pb.Chaosdaemon.IPSet.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 24: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ipsets_ = java.util.Collections.unmodifiableList(ipsets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_IPSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_IPSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.IPSetsRequest.class, pb.Chaosdaemon.IPSetsRequest.Builder.class); + } + + public static final int IPSETS_FIELD_NUMBER = 1; + private java.util.List ipsets_; + /** + * repeated .pb.IPSet ipsets = 1; + */ + @java.lang.Override + public java.util.List getIpsetsList() { + return ipsets_; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + @java.lang.Override + public java.util.List + getIpsetsOrBuilderList() { + return ipsets_; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + @java.lang.Override + public int getIpsetsCount() { + return ipsets_.size(); + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.IPSet getIpsets(int index) { + return ipsets_.get(index); + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.IPSetOrBuilder getIpsetsOrBuilder( + int index) { + return ipsets_.get(index); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTERNS_FIELD_NUMBER = 3; + private boolean enterNS_; + /** + * bool enterNS = 3; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 < ipsets_.size(); i++) { + output.writeMessage(1, ipsets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + if (enterNS_ != false) { + output.writeBool(3, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ipsets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, ipsets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enterNS_); + } + 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 pb.Chaosdaemon.IPSetsRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.IPSetsRequest other = (pb.Chaosdaemon.IPSetsRequest) obj; + + if (!getIpsetsList() + .equals(other.getIpsetsList())) return false; + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (getEnterNS() + != other.getEnterNS()) 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 (getIpsetsCount() > 0) { + hash = (37 * hash) + IPSETS_FIELD_NUMBER; + hash = (53 * hash) + getIpsetsList().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.IPSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IPSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IPSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IPSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IPSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IPSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IPSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IPSetsRequest 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 pb.Chaosdaemon.IPSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IPSetsRequest 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 pb.Chaosdaemon.IPSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IPSetsRequest 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(pb.Chaosdaemon.IPSetsRequest 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; + } + /** + * Protobuf type {@code pb.IPSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.IPSetsRequest) + pb.Chaosdaemon.IPSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_IPSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_IPSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.IPSetsRequest.class, pb.Chaosdaemon.IPSetsRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.IPSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getIpsetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (ipsetsBuilder_ == null) { + ipsets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ipsetsBuilder_.clear(); + } + containerId_ = ""; + + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_IPSetsRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.IPSetsRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.IPSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.IPSetsRequest build() { + pb.Chaosdaemon.IPSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.IPSetsRequest buildPartial() { + pb.Chaosdaemon.IPSetsRequest result = new pb.Chaosdaemon.IPSetsRequest(this); + int from_bitField0_ = bitField0_; + if (ipsetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ipsets_ = java.util.Collections.unmodifiableList(ipsets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ipsets_ = ipsets_; + } else { + result.ipsets_ = ipsetsBuilder_.build(); + } + result.containerId_ = containerId_; + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.IPSetsRequest) { + return mergeFrom((pb.Chaosdaemon.IPSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.IPSetsRequest other) { + if (other == pb.Chaosdaemon.IPSetsRequest.getDefaultInstance()) return this; + if (ipsetsBuilder_ == null) { + if (!other.ipsets_.isEmpty()) { + if (ipsets_.isEmpty()) { + ipsets_ = other.ipsets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIpsetsIsMutable(); + ipsets_.addAll(other.ipsets_); + } + onChanged(); + } + } else { + if (!other.ipsets_.isEmpty()) { + if (ipsetsBuilder_.isEmpty()) { + ipsetsBuilder_.dispose(); + ipsetsBuilder_ = null; + ipsets_ = other.ipsets_; + bitField0_ = (bitField0_ & ~0x00000001); + ipsetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIpsetsFieldBuilder() : null; + } else { + ipsetsBuilder_.addAllMessages(other.ipsets_); + } + } + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.IPSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.IPSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List ipsets_ = + java.util.Collections.emptyList(); + private void ensureIpsetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ipsets_ = new java.util.ArrayList(ipsets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.IPSet, pb.Chaosdaemon.IPSet.Builder, pb.Chaosdaemon.IPSetOrBuilder> ipsetsBuilder_; + + /** + * repeated .pb.IPSet ipsets = 1; + */ + public java.util.List getIpsetsList() { + if (ipsetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ipsets_); + } else { + return ipsetsBuilder_.getMessageList(); + } + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public int getIpsetsCount() { + if (ipsetsBuilder_ == null) { + return ipsets_.size(); + } else { + return ipsetsBuilder_.getCount(); + } + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public pb.Chaosdaemon.IPSet getIpsets(int index) { + if (ipsetsBuilder_ == null) { + return ipsets_.get(index); + } else { + return ipsetsBuilder_.getMessage(index); + } + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder setIpsets( + int index, pb.Chaosdaemon.IPSet value) { + if (ipsetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpsetsIsMutable(); + ipsets_.set(index, value); + onChanged(); + } else { + ipsetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder setIpsets( + int index, pb.Chaosdaemon.IPSet.Builder builderForValue) { + if (ipsetsBuilder_ == null) { + ensureIpsetsIsMutable(); + ipsets_.set(index, builderForValue.build()); + onChanged(); + } else { + ipsetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder addIpsets(pb.Chaosdaemon.IPSet value) { + if (ipsetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpsetsIsMutable(); + ipsets_.add(value); + onChanged(); + } else { + ipsetsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder addIpsets( + int index, pb.Chaosdaemon.IPSet value) { + if (ipsetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpsetsIsMutable(); + ipsets_.add(index, value); + onChanged(); + } else { + ipsetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder addIpsets( + pb.Chaosdaemon.IPSet.Builder builderForValue) { + if (ipsetsBuilder_ == null) { + ensureIpsetsIsMutable(); + ipsets_.add(builderForValue.build()); + onChanged(); + } else { + ipsetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder addIpsets( + int index, pb.Chaosdaemon.IPSet.Builder builderForValue) { + if (ipsetsBuilder_ == null) { + ensureIpsetsIsMutable(); + ipsets_.add(index, builderForValue.build()); + onChanged(); + } else { + ipsetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder addAllIpsets( + java.lang.Iterable values) { + if (ipsetsBuilder_ == null) { + ensureIpsetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ipsets_); + onChanged(); + } else { + ipsetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder clearIpsets() { + if (ipsetsBuilder_ == null) { + ipsets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ipsetsBuilder_.clear(); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public Builder removeIpsets(int index) { + if (ipsetsBuilder_ == null) { + ensureIpsetsIsMutable(); + ipsets_.remove(index); + onChanged(); + } else { + ipsetsBuilder_.remove(index); + } + return this; + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public pb.Chaosdaemon.IPSet.Builder getIpsetsBuilder( + int index) { + return getIpsetsFieldBuilder().getBuilder(index); + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public pb.Chaosdaemon.IPSetOrBuilder getIpsetsOrBuilder( + int index) { + if (ipsetsBuilder_ == null) { + return ipsets_.get(index); } else { + return ipsetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public java.util.List + getIpsetsOrBuilderList() { + if (ipsetsBuilder_ != null) { + return ipsetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ipsets_); + } + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public pb.Chaosdaemon.IPSet.Builder addIpsetsBuilder() { + return getIpsetsFieldBuilder().addBuilder( + pb.Chaosdaemon.IPSet.getDefaultInstance()); + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public pb.Chaosdaemon.IPSet.Builder addIpsetsBuilder( + int index) { + return getIpsetsFieldBuilder().addBuilder( + index, pb.Chaosdaemon.IPSet.getDefaultInstance()); + } + /** + * repeated .pb.IPSet ipsets = 1; + */ + public java.util.List + getIpsetsBuilderList() { + return getIpsetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.IPSet, pb.Chaosdaemon.IPSet.Builder, pb.Chaosdaemon.IPSetOrBuilder> + getIpsetsFieldBuilder() { + if (ipsetsBuilder_ == null) { + ipsetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.IPSet, pb.Chaosdaemon.IPSet.Builder, pb.Chaosdaemon.IPSetOrBuilder>( + ipsets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + ipsets_ = null; + } + return ipsetsBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 3; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 3; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 3; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.IPSetsRequest) + } + + // @@protoc_insertion_point(class_scope:pb.IPSetsRequest) + private static final pb.Chaosdaemon.IPSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.IPSetsRequest(); + } + + public static pb.Chaosdaemon.IPSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IPSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IPSetsRequest(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 pb.Chaosdaemon.IPSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IPSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.IPSet) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated string cidrs = 2; + * @return A list containing the cidrs. + */ + java.util.List + getCidrsList(); + /** + * repeated string cidrs = 2; + * @return The count of cidrs. + */ + int getCidrsCount(); + /** + * repeated string cidrs = 2; + * @param index The index of the element to return. + * @return The cidrs at the given index. + */ + java.lang.String getCidrs(int index); + /** + * repeated string cidrs = 2; + * @param index The index of the value to return. + * @return The bytes of the cidrs at the given index. + */ + com.google.protobuf.ByteString + getCidrsBytes(int index); + + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + java.util.List + getCidrAndPortsList(); + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + pb.Chaosdaemon.CidrAndPort getCidrAndPorts(int index); + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + int getCidrAndPortsCount(); + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + java.util.List + getCidrAndPortsOrBuilderList(); + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + pb.Chaosdaemon.CidrAndPortOrBuilder getCidrAndPortsOrBuilder( + int index); + + /** + * repeated string set_names = 4; + * @return A list containing the setNames. + */ + java.util.List + getSetNamesList(); + /** + * repeated string set_names = 4; + * @return The count of setNames. + */ + int getSetNamesCount(); + /** + * repeated string set_names = 4; + * @param index The index of the element to return. + * @return The setNames at the given index. + */ + java.lang.String getSetNames(int index); + /** + * repeated string set_names = 4; + * @param index The index of the value to return. + * @return The bytes of the setNames at the given index. + */ + com.google.protobuf.ByteString + getSetNamesBytes(int index); + + /** + * string type = 5; + * @return The type. + */ + java.lang.String getType(); + /** + * string type = 5; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + } + /** + * Protobuf type {@code pb.IPSet} + */ + public static final class IPSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.IPSet) + IPSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use IPSet.newBuilder() to construct. + private IPSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IPSet() { + name_ = ""; + cidrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + cidrAndPorts_ = java.util.Collections.emptyList(); + setNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IPSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IPSet( + 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 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cidrs_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cidrs_.add(s); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + cidrAndPorts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + cidrAndPorts_.add( + input.readMessage(pb.Chaosdaemon.CidrAndPort.parser(), extensionRegistry)); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + setNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + setNames_.add(s); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cidrs_ = cidrs_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + cidrAndPorts_ = java.util.Collections.unmodifiableList(cidrAndPorts_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + setNames_ = setNames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_IPSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_IPSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.IPSet.class, pb.Chaosdaemon.IPSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + 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; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + 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 CIDRS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList cidrs_; + /** + * repeated string cidrs = 2; + * @return A list containing the cidrs. + */ + public com.google.protobuf.ProtocolStringList + getCidrsList() { + return cidrs_; + } + /** + * repeated string cidrs = 2; + * @return The count of cidrs. + */ + public int getCidrsCount() { + return cidrs_.size(); + } + /** + * repeated string cidrs = 2; + * @param index The index of the element to return. + * @return The cidrs at the given index. + */ + public java.lang.String getCidrs(int index) { + return cidrs_.get(index); + } + /** + * repeated string cidrs = 2; + * @param index The index of the value to return. + * @return The bytes of the cidrs at the given index. + */ + public com.google.protobuf.ByteString + getCidrsBytes(int index) { + return cidrs_.getByteString(index); + } + + public static final int CIDR_AND_PORTS_FIELD_NUMBER = 3; + private java.util.List cidrAndPorts_; + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + @java.lang.Override + public java.util.List getCidrAndPortsList() { + return cidrAndPorts_; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + @java.lang.Override + public java.util.List + getCidrAndPortsOrBuilderList() { + return cidrAndPorts_; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + @java.lang.Override + public int getCidrAndPortsCount() { + return cidrAndPorts_.size(); + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + @java.lang.Override + public pb.Chaosdaemon.CidrAndPort getCidrAndPorts(int index) { + return cidrAndPorts_.get(index); + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + @java.lang.Override + public pb.Chaosdaemon.CidrAndPortOrBuilder getCidrAndPortsOrBuilder( + int index) { + return cidrAndPorts_.get(index); + } + + public static final int SET_NAMES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList setNames_; + /** + * repeated string set_names = 4; + * @return A list containing the setNames. + */ + public com.google.protobuf.ProtocolStringList + getSetNamesList() { + return setNames_; + } + /** + * repeated string set_names = 4; + * @return The count of setNames. + */ + public int getSetNamesCount() { + return setNames_.size(); + } + /** + * repeated string set_names = 4; + * @param index The index of the element to return. + * @return The setNames at the given index. + */ + public java.lang.String getSetNames(int index) { + return setNames_.get(index); + } + /** + * repeated string set_names = 4; + * @param index The index of the value to return. + * @return The bytes of the setNames at the given index. + */ + public com.google.protobuf.ByteString + getSetNamesBytes(int index) { + return setNames_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 5; + private volatile java.lang.Object type_; + /** + * string type = 5; + * @return The type. + */ + @java.lang.Override + 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; + } + } + /** + * string type = 5; + * @return The bytes for type. + */ + @java.lang.Override + 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; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < cidrs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cidrs_.getRaw(i)); + } + for (int i = 0; i < cidrAndPorts_.size(); i++) { + output.writeMessage(3, cidrAndPorts_.get(i)); + } + for (int i = 0; i < setNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, setNames_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < cidrs_.size(); i++) { + dataSize += computeStringSizeNoTag(cidrs_.getRaw(i)); + } + size += dataSize; + size += 1 * getCidrsList().size(); + } + for (int i = 0; i < cidrAndPorts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, cidrAndPorts_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < setNames_.size(); i++) { + dataSize += computeStringSizeNoTag(setNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getSetNamesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, type_); + } + 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 pb.Chaosdaemon.IPSet)) { + return super.equals(obj); + } + pb.Chaosdaemon.IPSet other = (pb.Chaosdaemon.IPSet) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getCidrsList() + .equals(other.getCidrsList())) return false; + if (!getCidrAndPortsList() + .equals(other.getCidrAndPortsList())) return false; + if (!getSetNamesList() + .equals(other.getSetNamesList())) return false; + if (!getType() + .equals(other.getType())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getCidrsCount() > 0) { + hash = (37 * hash) + CIDRS_FIELD_NUMBER; + hash = (53 * hash) + getCidrsList().hashCode(); + } + if (getCidrAndPortsCount() > 0) { + hash = (37 * hash) + CIDR_AND_PORTS_FIELD_NUMBER; + hash = (53 * hash) + getCidrAndPortsList().hashCode(); + } + if (getSetNamesCount() > 0) { + hash = (37 * hash) + SET_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getSetNamesList().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.IPSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IPSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IPSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IPSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IPSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IPSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IPSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IPSet 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 pb.Chaosdaemon.IPSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IPSet 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 pb.Chaosdaemon.IPSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IPSet 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(pb.Chaosdaemon.IPSet 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; + } + /** + * Protobuf type {@code pb.IPSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.IPSet) + pb.Chaosdaemon.IPSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_IPSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_IPSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.IPSet.class, pb.Chaosdaemon.IPSet.Builder.class); + } + + // Construct using pb.Chaosdaemon.IPSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCidrAndPortsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + cidrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (cidrAndPortsBuilder_ == null) { + cidrAndPorts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + cidrAndPortsBuilder_.clear(); + } + setNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + type_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_IPSet_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.IPSet getDefaultInstanceForType() { + return pb.Chaosdaemon.IPSet.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.IPSet build() { + pb.Chaosdaemon.IPSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.IPSet buildPartial() { + pb.Chaosdaemon.IPSet result = new pb.Chaosdaemon.IPSet(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + cidrs_ = cidrs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cidrs_ = cidrs_; + if (cidrAndPortsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + cidrAndPorts_ = java.util.Collections.unmodifiableList(cidrAndPorts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.cidrAndPorts_ = cidrAndPorts_; + } else { + result.cidrAndPorts_ = cidrAndPortsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + setNames_ = setNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.setNames_ = setNames_; + result.type_ = type_; + 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 pb.Chaosdaemon.IPSet) { + return mergeFrom((pb.Chaosdaemon.IPSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.IPSet other) { + if (other == pb.Chaosdaemon.IPSet.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.cidrs_.isEmpty()) { + if (cidrs_.isEmpty()) { + cidrs_ = other.cidrs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCidrsIsMutable(); + cidrs_.addAll(other.cidrs_); + } + onChanged(); + } + if (cidrAndPortsBuilder_ == null) { + if (!other.cidrAndPorts_.isEmpty()) { + if (cidrAndPorts_.isEmpty()) { + cidrAndPorts_ = other.cidrAndPorts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.addAll(other.cidrAndPorts_); + } + onChanged(); + } + } else { + if (!other.cidrAndPorts_.isEmpty()) { + if (cidrAndPortsBuilder_.isEmpty()) { + cidrAndPortsBuilder_.dispose(); + cidrAndPortsBuilder_ = null; + cidrAndPorts_ = other.cidrAndPorts_; + bitField0_ = (bitField0_ & ~0x00000002); + cidrAndPortsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCidrAndPortsFieldBuilder() : null; + } else { + cidrAndPortsBuilder_.addAllMessages(other.cidrAndPorts_); + } + } + } + if (!other.setNames_.isEmpty()) { + if (setNames_.isEmpty()) { + setNames_ = other.setNames_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSetNamesIsMutable(); + setNames_.addAll(other.setNames_); + } + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + 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 { + pb.Chaosdaemon.IPSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.IPSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + 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; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList cidrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureCidrsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cidrs_ = new com.google.protobuf.LazyStringArrayList(cidrs_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string cidrs = 2; + * @return A list containing the cidrs. + */ + public com.google.protobuf.ProtocolStringList + getCidrsList() { + return cidrs_.getUnmodifiableView(); + } + /** + * repeated string cidrs = 2; + * @return The count of cidrs. + */ + public int getCidrsCount() { + return cidrs_.size(); + } + /** + * repeated string cidrs = 2; + * @param index The index of the element to return. + * @return The cidrs at the given index. + */ + public java.lang.String getCidrs(int index) { + return cidrs_.get(index); + } + /** + * repeated string cidrs = 2; + * @param index The index of the value to return. + * @return The bytes of the cidrs at the given index. + */ + public com.google.protobuf.ByteString + getCidrsBytes(int index) { + return cidrs_.getByteString(index); + } + /** + * repeated string cidrs = 2; + * @param index The index to set the value at. + * @param value The cidrs to set. + * @return This builder for chaining. + */ + public Builder setCidrs( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCidrsIsMutable(); + cidrs_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string cidrs = 2; + * @param value The cidrs to add. + * @return This builder for chaining. + */ + public Builder addCidrs( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCidrsIsMutable(); + cidrs_.add(value); + onChanged(); + return this; + } + /** + * repeated string cidrs = 2; + * @param values The cidrs to add. + * @return This builder for chaining. + */ + public Builder addAllCidrs( + java.lang.Iterable values) { + ensureCidrsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cidrs_); + onChanged(); + return this; + } + /** + * repeated string cidrs = 2; + * @return This builder for chaining. + */ + public Builder clearCidrs() { + cidrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string cidrs = 2; + * @param value The bytes of the cidrs to add. + * @return This builder for chaining. + */ + public Builder addCidrsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCidrsIsMutable(); + cidrs_.add(value); + onChanged(); + return this; + } + + private java.util.List cidrAndPorts_ = + java.util.Collections.emptyList(); + private void ensureCidrAndPortsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + cidrAndPorts_ = new java.util.ArrayList(cidrAndPorts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.CidrAndPort, pb.Chaosdaemon.CidrAndPort.Builder, pb.Chaosdaemon.CidrAndPortOrBuilder> cidrAndPortsBuilder_; + + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public java.util.List getCidrAndPortsList() { + if (cidrAndPortsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cidrAndPorts_); + } else { + return cidrAndPortsBuilder_.getMessageList(); + } + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public int getCidrAndPortsCount() { + if (cidrAndPortsBuilder_ == null) { + return cidrAndPorts_.size(); + } else { + return cidrAndPortsBuilder_.getCount(); + } + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public pb.Chaosdaemon.CidrAndPort getCidrAndPorts(int index) { + if (cidrAndPortsBuilder_ == null) { + return cidrAndPorts_.get(index); + } else { + return cidrAndPortsBuilder_.getMessage(index); + } + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder setCidrAndPorts( + int index, pb.Chaosdaemon.CidrAndPort value) { + if (cidrAndPortsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.set(index, value); + onChanged(); + } else { + cidrAndPortsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder setCidrAndPorts( + int index, pb.Chaosdaemon.CidrAndPort.Builder builderForValue) { + if (cidrAndPortsBuilder_ == null) { + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.set(index, builderForValue.build()); + onChanged(); + } else { + cidrAndPortsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder addCidrAndPorts(pb.Chaosdaemon.CidrAndPort value) { + if (cidrAndPortsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.add(value); + onChanged(); + } else { + cidrAndPortsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder addCidrAndPorts( + int index, pb.Chaosdaemon.CidrAndPort value) { + if (cidrAndPortsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.add(index, value); + onChanged(); + } else { + cidrAndPortsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder addCidrAndPorts( + pb.Chaosdaemon.CidrAndPort.Builder builderForValue) { + if (cidrAndPortsBuilder_ == null) { + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.add(builderForValue.build()); + onChanged(); + } else { + cidrAndPortsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder addCidrAndPorts( + int index, pb.Chaosdaemon.CidrAndPort.Builder builderForValue) { + if (cidrAndPortsBuilder_ == null) { + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.add(index, builderForValue.build()); + onChanged(); + } else { + cidrAndPortsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder addAllCidrAndPorts( + java.lang.Iterable values) { + if (cidrAndPortsBuilder_ == null) { + ensureCidrAndPortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cidrAndPorts_); + onChanged(); + } else { + cidrAndPortsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder clearCidrAndPorts() { + if (cidrAndPortsBuilder_ == null) { + cidrAndPorts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + cidrAndPortsBuilder_.clear(); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public Builder removeCidrAndPorts(int index) { + if (cidrAndPortsBuilder_ == null) { + ensureCidrAndPortsIsMutable(); + cidrAndPorts_.remove(index); + onChanged(); + } else { + cidrAndPortsBuilder_.remove(index); + } + return this; + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public pb.Chaosdaemon.CidrAndPort.Builder getCidrAndPortsBuilder( + int index) { + return getCidrAndPortsFieldBuilder().getBuilder(index); + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public pb.Chaosdaemon.CidrAndPortOrBuilder getCidrAndPortsOrBuilder( + int index) { + if (cidrAndPortsBuilder_ == null) { + return cidrAndPorts_.get(index); } else { + return cidrAndPortsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public java.util.List + getCidrAndPortsOrBuilderList() { + if (cidrAndPortsBuilder_ != null) { + return cidrAndPortsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cidrAndPorts_); + } + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public pb.Chaosdaemon.CidrAndPort.Builder addCidrAndPortsBuilder() { + return getCidrAndPortsFieldBuilder().addBuilder( + pb.Chaosdaemon.CidrAndPort.getDefaultInstance()); + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public pb.Chaosdaemon.CidrAndPort.Builder addCidrAndPortsBuilder( + int index) { + return getCidrAndPortsFieldBuilder().addBuilder( + index, pb.Chaosdaemon.CidrAndPort.getDefaultInstance()); + } + /** + * repeated .pb.CidrAndPort cidr_and_ports = 3; + */ + public java.util.List + getCidrAndPortsBuilderList() { + return getCidrAndPortsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.CidrAndPort, pb.Chaosdaemon.CidrAndPort.Builder, pb.Chaosdaemon.CidrAndPortOrBuilder> + getCidrAndPortsFieldBuilder() { + if (cidrAndPortsBuilder_ == null) { + cidrAndPortsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.CidrAndPort, pb.Chaosdaemon.CidrAndPort.Builder, pb.Chaosdaemon.CidrAndPortOrBuilder>( + cidrAndPorts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + cidrAndPorts_ = null; + } + return cidrAndPortsBuilder_; + } + + private com.google.protobuf.LazyStringList setNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSetNamesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + setNames_ = new com.google.protobuf.LazyStringArrayList(setNames_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated string set_names = 4; + * @return A list containing the setNames. + */ + public com.google.protobuf.ProtocolStringList + getSetNamesList() { + return setNames_.getUnmodifiableView(); + } + /** + * repeated string set_names = 4; + * @return The count of setNames. + */ + public int getSetNamesCount() { + return setNames_.size(); + } + /** + * repeated string set_names = 4; + * @param index The index of the element to return. + * @return The setNames at the given index. + */ + public java.lang.String getSetNames(int index) { + return setNames_.get(index); + } + /** + * repeated string set_names = 4; + * @param index The index of the value to return. + * @return The bytes of the setNames at the given index. + */ + public com.google.protobuf.ByteString + getSetNamesBytes(int index) { + return setNames_.getByteString(index); + } + /** + * repeated string set_names = 4; + * @param index The index to set the value at. + * @param value The setNames to set. + * @return This builder for chaining. + */ + public Builder setSetNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSetNamesIsMutable(); + setNames_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string set_names = 4; + * @param value The setNames to add. + * @return This builder for chaining. + */ + public Builder addSetNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSetNamesIsMutable(); + setNames_.add(value); + onChanged(); + return this; + } + /** + * repeated string set_names = 4; + * @param values The setNames to add. + * @return This builder for chaining. + */ + public Builder addAllSetNames( + java.lang.Iterable values) { + ensureSetNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, setNames_); + onChanged(); + return this; + } + /** + * repeated string set_names = 4; + * @return This builder for chaining. + */ + public Builder clearSetNames() { + setNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated string set_names = 4; + * @param value The bytes of the setNames to add. + * @return This builder for chaining. + */ + public Builder addSetNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSetNamesIsMutable(); + setNames_.add(value); + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * string type = 5; + * @return The type. + */ + 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; + } + } + /** + * string type = 5; + * @return The bytes for type. + */ + 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; + } + } + /** + * string type = 5; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 5; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 5; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = 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:pb.IPSet) + } + + // @@protoc_insertion_point(class_scope:pb.IPSet) + private static final pb.Chaosdaemon.IPSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.IPSet(); + } + + public static pb.Chaosdaemon.IPSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IPSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IPSet(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 pb.Chaosdaemon.IPSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CidrAndPortOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.CidrAndPort) + com.google.protobuf.MessageOrBuilder { + + /** + * string cidr = 1; + * @return The cidr. + */ + java.lang.String getCidr(); + /** + * string cidr = 1; + * @return The bytes for cidr. + */ + com.google.protobuf.ByteString + getCidrBytes(); + + /** + * uint32 port = 2; + * @return The port. + */ + int getPort(); + } + /** + * Protobuf type {@code pb.CidrAndPort} + */ + public static final class CidrAndPort extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.CidrAndPort) + CidrAndPortOrBuilder { + private static final long serialVersionUID = 0L; + // Use CidrAndPort.newBuilder() to construct. + private CidrAndPort(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CidrAndPort() { + cidr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CidrAndPort(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CidrAndPort( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + cidr_ = s; + break; + } + case 16: { + + port_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_CidrAndPort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_CidrAndPort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.CidrAndPort.class, pb.Chaosdaemon.CidrAndPort.Builder.class); + } + + public static final int CIDR_FIELD_NUMBER = 1; + private volatile java.lang.Object cidr_; + /** + * string cidr = 1; + * @return The cidr. + */ + @java.lang.Override + public java.lang.String getCidr() { + java.lang.Object ref = cidr_; + 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(); + cidr_ = s; + return s; + } + } + /** + * string cidr = 1; + * @return The bytes for cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCidrBytes() { + java.lang.Object ref = cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + /** + * uint32 port = 2; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cidr_); + } + if (port_ != 0) { + output.writeUInt32(2, port_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cidr_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, port_); + } + 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 pb.Chaosdaemon.CidrAndPort)) { + return super.equals(obj); + } + pb.Chaosdaemon.CidrAndPort other = (pb.Chaosdaemon.CidrAndPort) obj; + + if (!getCidr() + .equals(other.getCidr())) return false; + if (getPort() + != other.getPort()) 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) + CIDR_FIELD_NUMBER; + hash = (53 * hash) + getCidr().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.CidrAndPort parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.CidrAndPort parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.CidrAndPort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.CidrAndPort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.CidrAndPort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.CidrAndPort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.CidrAndPort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.CidrAndPort 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 pb.Chaosdaemon.CidrAndPort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.CidrAndPort 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 pb.Chaosdaemon.CidrAndPort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.CidrAndPort 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(pb.Chaosdaemon.CidrAndPort 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; + } + /** + * Protobuf type {@code pb.CidrAndPort} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.CidrAndPort) + pb.Chaosdaemon.CidrAndPortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_CidrAndPort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_CidrAndPort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.CidrAndPort.class, pb.Chaosdaemon.CidrAndPort.Builder.class); + } + + // Construct using pb.Chaosdaemon.CidrAndPort.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(); + cidr_ = ""; + + port_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_CidrAndPort_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.CidrAndPort getDefaultInstanceForType() { + return pb.Chaosdaemon.CidrAndPort.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.CidrAndPort build() { + pb.Chaosdaemon.CidrAndPort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.CidrAndPort buildPartial() { + pb.Chaosdaemon.CidrAndPort result = new pb.Chaosdaemon.CidrAndPort(this); + result.cidr_ = cidr_; + result.port_ = port_; + 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 pb.Chaosdaemon.CidrAndPort) { + return mergeFrom((pb.Chaosdaemon.CidrAndPort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.CidrAndPort other) { + if (other == pb.Chaosdaemon.CidrAndPort.getDefaultInstance()) return this; + if (!other.getCidr().isEmpty()) { + cidr_ = other.cidr_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + 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 { + pb.Chaosdaemon.CidrAndPort parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.CidrAndPort) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cidr_ = ""; + /** + * string cidr = 1; + * @return The cidr. + */ + public java.lang.String getCidr() { + java.lang.Object ref = cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cidr = 1; + * @return The bytes for cidr. + */ + public com.google.protobuf.ByteString + getCidrBytes() { + java.lang.Object ref = cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cidr = 1; + * @param value The cidr to set. + * @return This builder for chaining. + */ + public Builder setCidr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cidr_ = value; + onChanged(); + return this; + } + /** + * string cidr = 1; + * @return This builder for chaining. + */ + public Builder clearCidr() { + + cidr_ = getDefaultInstance().getCidr(); + onChanged(); + return this; + } + /** + * string cidr = 1; + * @param value The bytes for cidr to set. + * @return This builder for chaining. + */ + public Builder setCidrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cidr_ = value; + onChanged(); + return this; + } + + private int port_ ; + /** + * uint32 port = 2; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * uint32 port = 2; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * uint32 port = 2; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + 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:pb.CidrAndPort) + } + + // @@protoc_insertion_point(class_scope:pb.CidrAndPort) + private static final pb.Chaosdaemon.CidrAndPort DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.CidrAndPort(); + } + + public static pb.Chaosdaemon.CidrAndPort getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CidrAndPort parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CidrAndPort(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 pb.Chaosdaemon.CidrAndPort getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IptablesChainsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.IptablesChainsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .pb.Chain chains = 1; + */ + java.util.List + getChainsList(); + /** + * repeated .pb.Chain chains = 1; + */ + pb.Chaosdaemon.Chain getChains(int index); + /** + * repeated .pb.Chain chains = 1; + */ + int getChainsCount(); + /** + * repeated .pb.Chain chains = 1; + */ + java.util.List + getChainsOrBuilderList(); + /** + * repeated .pb.Chain chains = 1; + */ + pb.Chaosdaemon.ChainOrBuilder getChainsOrBuilder( + int index); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * bool enterNS = 3; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.IptablesChainsRequest} + */ + public static final class IptablesChainsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.IptablesChainsRequest) + IptablesChainsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use IptablesChainsRequest.newBuilder() to construct. + private IptablesChainsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IptablesChainsRequest() { + chains_ = java.util.Collections.emptyList(); + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IptablesChainsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IptablesChainsRequest( + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + chains_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + chains_.add( + input.readMessage(pb.Chaosdaemon.Chain.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 24: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + chains_ = java.util.Collections.unmodifiableList(chains_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_IptablesChainsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_IptablesChainsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.IptablesChainsRequest.class, pb.Chaosdaemon.IptablesChainsRequest.Builder.class); + } + + public static final int CHAINS_FIELD_NUMBER = 1; + private java.util.List chains_; + /** + * repeated .pb.Chain chains = 1; + */ + @java.lang.Override + public java.util.List getChainsList() { + return chains_; + } + /** + * repeated .pb.Chain chains = 1; + */ + @java.lang.Override + public java.util.List + getChainsOrBuilderList() { + return chains_; + } + /** + * repeated .pb.Chain chains = 1; + */ + @java.lang.Override + public int getChainsCount() { + return chains_.size(); + } + /** + * repeated .pb.Chain chains = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.Chain getChains(int index) { + return chains_.get(index); + } + /** + * repeated .pb.Chain chains = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.ChainOrBuilder getChainsOrBuilder( + int index) { + return chains_.get(index); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTERNS_FIELD_NUMBER = 3; + private boolean enterNS_; + /** + * bool enterNS = 3; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 < chains_.size(); i++) { + output.writeMessage(1, chains_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + if (enterNS_ != false) { + output.writeBool(3, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < chains_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, chains_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enterNS_); + } + 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 pb.Chaosdaemon.IptablesChainsRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.IptablesChainsRequest other = (pb.Chaosdaemon.IptablesChainsRequest) obj; + + if (!getChainsList() + .equals(other.getChainsList())) return false; + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (getEnterNS() + != other.getEnterNS()) 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 (getChainsCount() > 0) { + hash = (37 * hash) + CHAINS_FIELD_NUMBER; + hash = (53 * hash) + getChainsList().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.IptablesChainsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IptablesChainsRequest 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 pb.Chaosdaemon.IptablesChainsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IptablesChainsRequest 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 pb.Chaosdaemon.IptablesChainsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.IptablesChainsRequest 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(pb.Chaosdaemon.IptablesChainsRequest 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; + } + /** + * Protobuf type {@code pb.IptablesChainsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.IptablesChainsRequest) + pb.Chaosdaemon.IptablesChainsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_IptablesChainsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_IptablesChainsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.IptablesChainsRequest.class, pb.Chaosdaemon.IptablesChainsRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.IptablesChainsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getChainsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (chainsBuilder_ == null) { + chains_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + chainsBuilder_.clear(); + } + containerId_ = ""; + + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_IptablesChainsRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.IptablesChainsRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.IptablesChainsRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.IptablesChainsRequest build() { + pb.Chaosdaemon.IptablesChainsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.IptablesChainsRequest buildPartial() { + pb.Chaosdaemon.IptablesChainsRequest result = new pb.Chaosdaemon.IptablesChainsRequest(this); + int from_bitField0_ = bitField0_; + if (chainsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + chains_ = java.util.Collections.unmodifiableList(chains_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.chains_ = chains_; + } else { + result.chains_ = chainsBuilder_.build(); + } + result.containerId_ = containerId_; + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.IptablesChainsRequest) { + return mergeFrom((pb.Chaosdaemon.IptablesChainsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.IptablesChainsRequest other) { + if (other == pb.Chaosdaemon.IptablesChainsRequest.getDefaultInstance()) return this; + if (chainsBuilder_ == null) { + if (!other.chains_.isEmpty()) { + if (chains_.isEmpty()) { + chains_ = other.chains_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChainsIsMutable(); + chains_.addAll(other.chains_); + } + onChanged(); + } + } else { + if (!other.chains_.isEmpty()) { + if (chainsBuilder_.isEmpty()) { + chainsBuilder_.dispose(); + chainsBuilder_ = null; + chains_ = other.chains_; + bitField0_ = (bitField0_ & ~0x00000001); + chainsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getChainsFieldBuilder() : null; + } else { + chainsBuilder_.addAllMessages(other.chains_); + } + } + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.IptablesChainsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.IptablesChainsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List chains_ = + java.util.Collections.emptyList(); + private void ensureChainsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + chains_ = new java.util.ArrayList(chains_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.Chain, pb.Chaosdaemon.Chain.Builder, pb.Chaosdaemon.ChainOrBuilder> chainsBuilder_; + + /** + * repeated .pb.Chain chains = 1; + */ + public java.util.List getChainsList() { + if (chainsBuilder_ == null) { + return java.util.Collections.unmodifiableList(chains_); + } else { + return chainsBuilder_.getMessageList(); + } + } + /** + * repeated .pb.Chain chains = 1; + */ + public int getChainsCount() { + if (chainsBuilder_ == null) { + return chains_.size(); + } else { + return chainsBuilder_.getCount(); + } + } + /** + * repeated .pb.Chain chains = 1; + */ + public pb.Chaosdaemon.Chain getChains(int index) { + if (chainsBuilder_ == null) { + return chains_.get(index); + } else { + return chainsBuilder_.getMessage(index); + } + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder setChains( + int index, pb.Chaosdaemon.Chain value) { + if (chainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChainsIsMutable(); + chains_.set(index, value); + onChanged(); + } else { + chainsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder setChains( + int index, pb.Chaosdaemon.Chain.Builder builderForValue) { + if (chainsBuilder_ == null) { + ensureChainsIsMutable(); + chains_.set(index, builderForValue.build()); + onChanged(); + } else { + chainsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder addChains(pb.Chaosdaemon.Chain value) { + if (chainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChainsIsMutable(); + chains_.add(value); + onChanged(); + } else { + chainsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder addChains( + int index, pb.Chaosdaemon.Chain value) { + if (chainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChainsIsMutable(); + chains_.add(index, value); + onChanged(); + } else { + chainsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder addChains( + pb.Chaosdaemon.Chain.Builder builderForValue) { + if (chainsBuilder_ == null) { + ensureChainsIsMutable(); + chains_.add(builderForValue.build()); + onChanged(); + } else { + chainsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder addChains( + int index, pb.Chaosdaemon.Chain.Builder builderForValue) { + if (chainsBuilder_ == null) { + ensureChainsIsMutable(); + chains_.add(index, builderForValue.build()); + onChanged(); + } else { + chainsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder addAllChains( + java.lang.Iterable values) { + if (chainsBuilder_ == null) { + ensureChainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, chains_); + onChanged(); + } else { + chainsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder clearChains() { + if (chainsBuilder_ == null) { + chains_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + chainsBuilder_.clear(); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public Builder removeChains(int index) { + if (chainsBuilder_ == null) { + ensureChainsIsMutable(); + chains_.remove(index); + onChanged(); + } else { + chainsBuilder_.remove(index); + } + return this; + } + /** + * repeated .pb.Chain chains = 1; + */ + public pb.Chaosdaemon.Chain.Builder getChainsBuilder( + int index) { + return getChainsFieldBuilder().getBuilder(index); + } + /** + * repeated .pb.Chain chains = 1; + */ + public pb.Chaosdaemon.ChainOrBuilder getChainsOrBuilder( + int index) { + if (chainsBuilder_ == null) { + return chains_.get(index); } else { + return chainsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .pb.Chain chains = 1; + */ + public java.util.List + getChainsOrBuilderList() { + if (chainsBuilder_ != null) { + return chainsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(chains_); + } + } + /** + * repeated .pb.Chain chains = 1; + */ + public pb.Chaosdaemon.Chain.Builder addChainsBuilder() { + return getChainsFieldBuilder().addBuilder( + pb.Chaosdaemon.Chain.getDefaultInstance()); + } + /** + * repeated .pb.Chain chains = 1; + */ + public pb.Chaosdaemon.Chain.Builder addChainsBuilder( + int index) { + return getChainsFieldBuilder().addBuilder( + index, pb.Chaosdaemon.Chain.getDefaultInstance()); + } + /** + * repeated .pb.Chain chains = 1; + */ + public java.util.List + getChainsBuilderList() { + return getChainsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.Chain, pb.Chaosdaemon.Chain.Builder, pb.Chaosdaemon.ChainOrBuilder> + getChainsFieldBuilder() { + if (chainsBuilder_ == null) { + chainsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.Chain, pb.Chaosdaemon.Chain.Builder, pb.Chaosdaemon.ChainOrBuilder>( + chains_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + chains_ = null; + } + return chainsBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 3; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 3; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 3; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.IptablesChainsRequest) + } + + // @@protoc_insertion_point(class_scope:pb.IptablesChainsRequest) + private static final pb.Chaosdaemon.IptablesChainsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.IptablesChainsRequest(); + } + + public static pb.Chaosdaemon.IptablesChainsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IptablesChainsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IptablesChainsRequest(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 pb.Chaosdaemon.IptablesChainsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ChainOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.Chain) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .pb.Chain.Direction direction = 2; + * @return The enum numeric value on the wire for direction. + */ + int getDirectionValue(); + /** + * .pb.Chain.Direction direction = 2; + * @return The direction. + */ + pb.Chaosdaemon.Chain.Direction getDirection(); + + /** + * repeated string ipsets = 3; + * @return A list containing the ipsets. + */ + java.util.List + getIpsetsList(); + /** + * repeated string ipsets = 3; + * @return The count of ipsets. + */ + int getIpsetsCount(); + /** + * repeated string ipsets = 3; + * @param index The index of the element to return. + * @return The ipsets at the given index. + */ + java.lang.String getIpsets(int index); + /** + * repeated string ipsets = 3; + * @param index The index of the value to return. + * @return The bytes of the ipsets at the given index. + */ + com.google.protobuf.ByteString + getIpsetsBytes(int index); + + /** + * string target = 4; + * @return The target. + */ + java.lang.String getTarget(); + /** + * string target = 4; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + * string protocol = 5; + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * string protocol = 5; + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString + getProtocolBytes(); + + /** + * string source_ports = 6; + * @return The sourcePorts. + */ + java.lang.String getSourcePorts(); + /** + * string source_ports = 6; + * @return The bytes for sourcePorts. + */ + com.google.protobuf.ByteString + getSourcePortsBytes(); + + /** + * string destination_ports = 7; + * @return The destinationPorts. + */ + java.lang.String getDestinationPorts(); + /** + * string destination_ports = 7; + * @return The bytes for destinationPorts. + */ + com.google.protobuf.ByteString + getDestinationPortsBytes(); + + /** + * string tcp_flags = 8; + * @return The tcpFlags. + */ + java.lang.String getTcpFlags(); + /** + * string tcp_flags = 8; + * @return The bytes for tcpFlags. + */ + com.google.protobuf.ByteString + getTcpFlagsBytes(); + + /** + * string device = 9; + * @return The device. + */ + java.lang.String getDevice(); + /** + * string device = 9; + * @return The bytes for device. + */ + com.google.protobuf.ByteString + getDeviceBytes(); + } + /** + * Protobuf type {@code pb.Chain} + */ + public static final class Chain extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.Chain) + ChainOrBuilder { + private static final long serialVersionUID = 0L; + // Use Chain.newBuilder() to construct. + private Chain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Chain() { + name_ = ""; + direction_ = 0; + ipsets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + target_ = ""; + protocol_ = ""; + sourcePorts_ = ""; + destinationPorts_ = ""; + tcpFlags_ = ""; + device_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Chain(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Chain( + 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(); + + direction_ = rawValue; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ipsets_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ipsets_.add(s); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + sourcePorts_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + destinationPorts_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + tcpFlags_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ipsets_ = ipsets_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Chain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Chain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Chain.class, pb.Chaosdaemon.Chain.Builder.class); + } + + /** + * Protobuf enum {@code pb.Chain.Direction} + */ + public enum Direction + implements com.google.protobuf.ProtocolMessageEnum { + /** + * INPUT = 0; + */ + INPUT(0), + /** + * OUTPUT = 1; + */ + OUTPUT(1), + UNRECOGNIZED(-1), + ; + + /** + * INPUT = 0; + */ + public static final int INPUT_VALUE = 0; + /** + * OUTPUT = 1; + */ + public static final int OUTPUT_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Direction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Direction forNumber(int value) { + switch (value) { + case 0: return INPUT; + case 1: return OUTPUT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Direction> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Direction findValueByNumber(int number) { + return Direction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 pb.Chaosdaemon.Chain.getDescriptor().getEnumTypes().get(0); + } + + private static final Direction[] VALUES = values(); + + public static Direction 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 Direction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pb.Chain.Direction) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + 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; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + 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 DIRECTION_FIELD_NUMBER = 2; + private int direction_; + /** + * .pb.Chain.Direction direction = 2; + * @return The enum numeric value on the wire for direction. + */ + @java.lang.Override public int getDirectionValue() { + return direction_; + } + /** + * .pb.Chain.Direction direction = 2; + * @return The direction. + */ + @java.lang.Override public pb.Chaosdaemon.Chain.Direction getDirection() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.Chain.Direction result = pb.Chaosdaemon.Chain.Direction.valueOf(direction_); + return result == null ? pb.Chaosdaemon.Chain.Direction.UNRECOGNIZED : result; + } + + public static final int IPSETS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList ipsets_; + /** + * repeated string ipsets = 3; + * @return A list containing the ipsets. + */ + public com.google.protobuf.ProtocolStringList + getIpsetsList() { + return ipsets_; + } + /** + * repeated string ipsets = 3; + * @return The count of ipsets. + */ + public int getIpsetsCount() { + return ipsets_.size(); + } + /** + * repeated string ipsets = 3; + * @param index The index of the element to return. + * @return The ipsets at the given index. + */ + public java.lang.String getIpsets(int index) { + return ipsets_.get(index); + } + /** + * repeated string ipsets = 3; + * @param index The index of the value to return. + * @return The bytes of the ipsets at the given index. + */ + public com.google.protobuf.ByteString + getIpsetsBytes(int index) { + return ipsets_.getByteString(index); + } + + public static final int TARGET_FIELD_NUMBER = 4; + private volatile java.lang.Object target_; + /** + * string target = 4; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + /** + * string target = 4; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + private volatile java.lang.Object protocol_; + /** + * string protocol = 5; + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + * string protocol = 5; + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PORTS_FIELD_NUMBER = 6; + private volatile java.lang.Object sourcePorts_; + /** + * string source_ports = 6; + * @return The sourcePorts. + */ + @java.lang.Override + public java.lang.String getSourcePorts() { + java.lang.Object ref = sourcePorts_; + 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(); + sourcePorts_ = s; + return s; + } + } + /** + * string source_ports = 6; + * @return The bytes for sourcePorts. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourcePortsBytes() { + java.lang.Object ref = sourcePorts_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourcePorts_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_PORTS_FIELD_NUMBER = 7; + private volatile java.lang.Object destinationPorts_; + /** + * string destination_ports = 7; + * @return The destinationPorts. + */ + @java.lang.Override + public java.lang.String getDestinationPorts() { + java.lang.Object ref = destinationPorts_; + 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(); + destinationPorts_ = s; + return s; + } + } + /** + * string destination_ports = 7; + * @return The bytes for destinationPorts. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationPortsBytes() { + java.lang.Object ref = destinationPorts_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationPorts_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TCP_FLAGS_FIELD_NUMBER = 8; + private volatile java.lang.Object tcpFlags_; + /** + * string tcp_flags = 8; + * @return The tcpFlags. + */ + @java.lang.Override + public java.lang.String getTcpFlags() { + java.lang.Object ref = tcpFlags_; + 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(); + tcpFlags_ = s; + return s; + } + } + /** + * string tcp_flags = 8; + * @return The bytes for tcpFlags. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTcpFlagsBytes() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tcpFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_FIELD_NUMBER = 9; + private volatile java.lang.Object device_; + /** + * string device = 9; + * @return The device. + */ + @java.lang.Override + public java.lang.String getDevice() { + java.lang.Object ref = device_; + 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(); + device_ = s; + return s; + } + } + /** + * string device = 9; + * @return The bytes for device. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceBytes() { + java.lang.Object ref = device_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + device_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (direction_ != pb.Chaosdaemon.Chain.Direction.INPUT.getNumber()) { + output.writeEnum(2, direction_); + } + for (int i = 0; i < ipsets_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ipsets_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePorts_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourcePorts_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPorts_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, destinationPorts_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tcpFlags_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tcpFlags_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, device_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (direction_ != pb.Chaosdaemon.Chain.Direction.INPUT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, direction_); + } + { + int dataSize = 0; + for (int i = 0; i < ipsets_.size(); i++) { + dataSize += computeStringSizeNoTag(ipsets_.getRaw(i)); + } + size += dataSize; + size += 1 * getIpsetsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePorts_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourcePorts_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPorts_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, destinationPorts_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tcpFlags_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, tcpFlags_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, device_); + } + 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 pb.Chaosdaemon.Chain)) { + return super.equals(obj); + } + pb.Chaosdaemon.Chain other = (pb.Chaosdaemon.Chain) obj; + + if (!getName() + .equals(other.getName())) return false; + if (direction_ != other.direction_) return false; + if (!getIpsetsList() + .equals(other.getIpsetsList())) return false; + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getProtocol() + .equals(other.getProtocol())) return false; + if (!getSourcePorts() + .equals(other.getSourcePorts())) return false; + if (!getDestinationPorts() + .equals(other.getDestinationPorts())) return false; + if (!getTcpFlags() + .equals(other.getTcpFlags())) return false; + if (!getDevice() + .equals(other.getDevice())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + direction_; + if (getIpsetsCount() > 0) { + hash = (37 * hash) + IPSETS_FIELD_NUMBER; + hash = (53 * hash) + getIpsetsList().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + SOURCE_PORTS_FIELD_NUMBER; + hash = (53 * hash) + getSourcePorts().hashCode(); + hash = (37 * hash) + DESTINATION_PORTS_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPorts().hashCode(); + hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getTcpFlags().hashCode(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.Chain parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Chain parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Chain parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Chain parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Chain parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Chain parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Chain parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Chain 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 pb.Chaosdaemon.Chain parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Chain 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 pb.Chaosdaemon.Chain parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Chain 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(pb.Chaosdaemon.Chain 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; + } + /** + * Protobuf type {@code pb.Chain} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.Chain) + pb.Chaosdaemon.ChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Chain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Chain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Chain.class, pb.Chaosdaemon.Chain.Builder.class); + } + + // Construct using pb.Chaosdaemon.Chain.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_ = ""; + + direction_ = 0; + + ipsets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + target_ = ""; + + protocol_ = ""; + + sourcePorts_ = ""; + + destinationPorts_ = ""; + + tcpFlags_ = ""; + + device_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_Chain_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.Chain getDefaultInstanceForType() { + return pb.Chaosdaemon.Chain.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.Chain build() { + pb.Chaosdaemon.Chain result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.Chain buildPartial() { + pb.Chaosdaemon.Chain result = new pb.Chaosdaemon.Chain(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.direction_ = direction_; + if (((bitField0_ & 0x00000001) != 0)) { + ipsets_ = ipsets_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ipsets_ = ipsets_; + result.target_ = target_; + result.protocol_ = protocol_; + result.sourcePorts_ = sourcePorts_; + result.destinationPorts_ = destinationPorts_; + result.tcpFlags_ = tcpFlags_; + result.device_ = device_; + 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 pb.Chaosdaemon.Chain) { + return mergeFrom((pb.Chaosdaemon.Chain)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.Chain other) { + if (other == pb.Chaosdaemon.Chain.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.direction_ != 0) { + setDirectionValue(other.getDirectionValue()); + } + if (!other.ipsets_.isEmpty()) { + if (ipsets_.isEmpty()) { + ipsets_ = other.ipsets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIpsetsIsMutable(); + ipsets_.addAll(other.ipsets_); + } + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (!other.getSourcePorts().isEmpty()) { + sourcePorts_ = other.sourcePorts_; + onChanged(); + } + if (!other.getDestinationPorts().isEmpty()) { + destinationPorts_ = other.destinationPorts_; + onChanged(); + } + if (!other.getTcpFlags().isEmpty()) { + tcpFlags_ = other.tcpFlags_; + onChanged(); + } + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + 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 { + pb.Chaosdaemon.Chain parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.Chain) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + 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; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int direction_ = 0; + /** + * .pb.Chain.Direction direction = 2; + * @return The enum numeric value on the wire for direction. + */ + @java.lang.Override public int getDirectionValue() { + return direction_; + } + /** + * .pb.Chain.Direction direction = 2; + * @param value The enum numeric value on the wire for direction to set. + * @return This builder for chaining. + */ + public Builder setDirectionValue(int value) { + + direction_ = value; + onChanged(); + return this; + } + /** + * .pb.Chain.Direction direction = 2; + * @return The direction. + */ + @java.lang.Override + public pb.Chaosdaemon.Chain.Direction getDirection() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.Chain.Direction result = pb.Chaosdaemon.Chain.Direction.valueOf(direction_); + return result == null ? pb.Chaosdaemon.Chain.Direction.UNRECOGNIZED : result; + } + /** + * .pb.Chain.Direction direction = 2; + * @param value The direction to set. + * @return This builder for chaining. + */ + public Builder setDirection(pb.Chaosdaemon.Chain.Direction value) { + if (value == null) { + throw new NullPointerException(); + } + + direction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pb.Chain.Direction direction = 2; + * @return This builder for chaining. + */ + public Builder clearDirection() { + + direction_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList ipsets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureIpsetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ipsets_ = new com.google.protobuf.LazyStringArrayList(ipsets_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string ipsets = 3; + * @return A list containing the ipsets. + */ + public com.google.protobuf.ProtocolStringList + getIpsetsList() { + return ipsets_.getUnmodifiableView(); + } + /** + * repeated string ipsets = 3; + * @return The count of ipsets. + */ + public int getIpsetsCount() { + return ipsets_.size(); + } + /** + * repeated string ipsets = 3; + * @param index The index of the element to return. + * @return The ipsets at the given index. + */ + public java.lang.String getIpsets(int index) { + return ipsets_.get(index); + } + /** + * repeated string ipsets = 3; + * @param index The index of the value to return. + * @return The bytes of the ipsets at the given index. + */ + public com.google.protobuf.ByteString + getIpsetsBytes(int index) { + return ipsets_.getByteString(index); + } + /** + * repeated string ipsets = 3; + * @param index The index to set the value at. + * @param value The ipsets to set. + * @return This builder for chaining. + */ + public Builder setIpsets( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpsetsIsMutable(); + ipsets_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string ipsets = 3; + * @param value The ipsets to add. + * @return This builder for chaining. + */ + public Builder addIpsets( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpsetsIsMutable(); + ipsets_.add(value); + onChanged(); + return this; + } + /** + * repeated string ipsets = 3; + * @param values The ipsets to add. + * @return This builder for chaining. + */ + public Builder addAllIpsets( + java.lang.Iterable values) { + ensureIpsetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ipsets_); + onChanged(); + return this; + } + /** + * repeated string ipsets = 3; + * @return This builder for chaining. + */ + public Builder clearIpsets() { + ipsets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string ipsets = 3; + * @param value The bytes of the ipsets to add. + * @return This builder for chaining. + */ + public Builder addIpsetsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIpsetsIsMutable(); + ipsets_.add(value); + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * string target = 4; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string target = 4; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string target = 4; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * string target = 4; + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * string target = 4; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object protocol_ = ""; + /** + * string protocol = 5; + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string protocol = 5; + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string protocol = 5; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + * string protocol = 5; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + * string protocol = 5; + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourcePorts_ = ""; + /** + * string source_ports = 6; + * @return The sourcePorts. + */ + public java.lang.String getSourcePorts() { + java.lang.Object ref = sourcePorts_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourcePorts_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string source_ports = 6; + * @return The bytes for sourcePorts. + */ + public com.google.protobuf.ByteString + getSourcePortsBytes() { + java.lang.Object ref = sourcePorts_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourcePorts_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string source_ports = 6; + * @param value The sourcePorts to set. + * @return This builder for chaining. + */ + public Builder setSourcePorts( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourcePorts_ = value; + onChanged(); + return this; + } + /** + * string source_ports = 6; + * @return This builder for chaining. + */ + public Builder clearSourcePorts() { + + sourcePorts_ = getDefaultInstance().getSourcePorts(); + onChanged(); + return this; + } + /** + * string source_ports = 6; + * @param value The bytes for sourcePorts to set. + * @return This builder for chaining. + */ + public Builder setSourcePortsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourcePorts_ = value; + onChanged(); + return this; + } + + private java.lang.Object destinationPorts_ = ""; + /** + * string destination_ports = 7; + * @return The destinationPorts. + */ + public java.lang.String getDestinationPorts() { + java.lang.Object ref = destinationPorts_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationPorts_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string destination_ports = 7; + * @return The bytes for destinationPorts. + */ + public com.google.protobuf.ByteString + getDestinationPortsBytes() { + java.lang.Object ref = destinationPorts_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationPorts_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string destination_ports = 7; + * @param value The destinationPorts to set. + * @return This builder for chaining. + */ + public Builder setDestinationPorts( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationPorts_ = value; + onChanged(); + return this; + } + /** + * string destination_ports = 7; + * @return This builder for chaining. + */ + public Builder clearDestinationPorts() { + + destinationPorts_ = getDefaultInstance().getDestinationPorts(); + onChanged(); + return this; + } + /** + * string destination_ports = 7; + * @param value The bytes for destinationPorts to set. + * @return This builder for chaining. + */ + public Builder setDestinationPortsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationPorts_ = value; + onChanged(); + return this; + } + + private java.lang.Object tcpFlags_ = ""; + /** + * string tcp_flags = 8; + * @return The tcpFlags. + */ + public java.lang.String getTcpFlags() { + java.lang.Object ref = tcpFlags_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcpFlags_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string tcp_flags = 8; + * @return The bytes for tcpFlags. + */ + public com.google.protobuf.ByteString + getTcpFlagsBytes() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tcpFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string tcp_flags = 8; + * @param value The tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tcpFlags_ = value; + onChanged(); + return this; + } + /** + * string tcp_flags = 8; + * @return This builder for chaining. + */ + public Builder clearTcpFlags() { + + tcpFlags_ = getDefaultInstance().getTcpFlags(); + onChanged(); + return this; + } + /** + * string tcp_flags = 8; + * @param value The bytes for tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tcpFlags_ = value; + onChanged(); + return this; + } + + private java.lang.Object device_ = ""; + /** + * string device = 9; + * @return The device. + */ + public java.lang.String getDevice() { + java.lang.Object ref = device_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + device_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string device = 9; + * @return The bytes for device. + */ + public com.google.protobuf.ByteString + getDeviceBytes() { + java.lang.Object ref = device_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + device_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string device = 9; + * @param value The device to set. + * @return This builder for chaining. + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + * string device = 9; + * @return This builder for chaining. + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + * string device = 9; + * @param value The bytes for device to set. + * @return This builder for chaining. + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = 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:pb.Chain) + } + + // @@protoc_insertion_point(class_scope:pb.Chain) + private static final pb.Chaosdaemon.Chain DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.Chain(); + } + + public static pb.Chaosdaemon.Chain getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Chain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Chain(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 pb.Chaosdaemon.Chain getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TimeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.TimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string container_id = 1; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * int64 sec = 2; + * @return The sec. + */ + long getSec(); + + /** + * int64 nsec = 3; + * @return The nsec. + */ + long getNsec(); + + /** + * uint64 clk_ids_mask = 4; + * @return The clkIdsMask. + */ + long getClkIdsMask(); + + /** + * string uid = 5; + * @return The uid. + */ + java.lang.String getUid(); + /** + * string uid = 5; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); + + /** + * string pod_container_name = 6; + * @return The podContainerName. + */ + java.lang.String getPodContainerName(); + /** + * string pod_container_name = 6; + * @return The bytes for podContainerName. + */ + com.google.protobuf.ByteString + getPodContainerNameBytes(); + } + /** + * Protobuf type {@code pb.TimeRequest} + */ + public static final class TimeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.TimeRequest) + TimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeRequest.newBuilder() to construct. + private TimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TimeRequest() { + containerId_ = ""; + uid_ = ""; + podContainerName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + containerId_ = s; + break; + } + case 16: { + + sec_ = input.readInt64(); + break; + } + case 24: { + + nsec_ = input.readInt64(); + break; + } + case 32: { + + clkIdsMask_ = input.readUInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + podContainerName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_TimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TimeRequest.class, pb.Chaosdaemon.TimeRequest.Builder.class); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object containerId_; + /** + * string container_id = 1; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEC_FIELD_NUMBER = 2; + private long sec_; + /** + * int64 sec = 2; + * @return The sec. + */ + @java.lang.Override + public long getSec() { + return sec_; + } + + public static final int NSEC_FIELD_NUMBER = 3; + private long nsec_; + /** + * int64 nsec = 3; + * @return The nsec. + */ + @java.lang.Override + public long getNsec() { + return nsec_; + } + + public static final int CLK_IDS_MASK_FIELD_NUMBER = 4; + private long clkIdsMask_; + /** + * uint64 clk_ids_mask = 4; + * @return The clkIdsMask. + */ + @java.lang.Override + public long getClkIdsMask() { + return clkIdsMask_; + } + + public static final int UID_FIELD_NUMBER = 5; + private volatile java.lang.Object uid_; + /** + * string uid = 5; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + /** + * string uid = 5; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_CONTAINER_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object podContainerName_; + /** + * string pod_container_name = 6; + * @return The podContainerName. + */ + @java.lang.Override + public java.lang.String getPodContainerName() { + java.lang.Object ref = podContainerName_; + 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(); + podContainerName_ = s; + return s; + } + } + /** + * string pod_container_name = 6; + * @return The bytes for podContainerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPodContainerNameBytes() { + java.lang.Object ref = podContainerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + podContainerName_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerId_); + } + if (sec_ != 0L) { + output.writeInt64(2, sec_); + } + if (nsec_ != 0L) { + output.writeInt64(3, nsec_); + } + if (clkIdsMask_ != 0L) { + output.writeUInt64(4, clkIdsMask_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podContainerName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, podContainerName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerId_); + } + if (sec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, sec_); + } + if (nsec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, nsec_); + } + if (clkIdsMask_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, clkIdsMask_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podContainerName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, podContainerName_); + } + 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 pb.Chaosdaemon.TimeRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.TimeRequest other = (pb.Chaosdaemon.TimeRequest) obj; + + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (getSec() + != other.getSec()) return false; + if (getNsec() + != other.getNsec()) return false; + if (getClkIdsMask() + != other.getClkIdsMask()) return false; + if (!getUid() + .equals(other.getUid())) return false; + if (!getPodContainerName() + .equals(other.getPodContainerName())) 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) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + SEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSec()); + hash = (37 * hash) + NSEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNsec()); + hash = (37 * hash) + CLK_IDS_MASK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClkIdsMask()); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + POD_CONTAINER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPodContainerName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.TimeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TimeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TimeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TimeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TimeRequest 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 pb.Chaosdaemon.TimeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TimeRequest 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 pb.Chaosdaemon.TimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TimeRequest 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(pb.Chaosdaemon.TimeRequest 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; + } + /** + * Protobuf type {@code pb.TimeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.TimeRequest) + pb.Chaosdaemon.TimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TimeRequest.class, pb.Chaosdaemon.TimeRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.TimeRequest.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(); + containerId_ = ""; + + sec_ = 0L; + + nsec_ = 0L; + + clkIdsMask_ = 0L; + + uid_ = ""; + + podContainerName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_TimeRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.TimeRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.TimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.TimeRequest build() { + pb.Chaosdaemon.TimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.TimeRequest buildPartial() { + pb.Chaosdaemon.TimeRequest result = new pb.Chaosdaemon.TimeRequest(this); + result.containerId_ = containerId_; + result.sec_ = sec_; + result.nsec_ = nsec_; + result.clkIdsMask_ = clkIdsMask_; + result.uid_ = uid_; + result.podContainerName_ = podContainerName_; + 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 pb.Chaosdaemon.TimeRequest) { + return mergeFrom((pb.Chaosdaemon.TimeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.TimeRequest other) { + if (other == pb.Chaosdaemon.TimeRequest.getDefaultInstance()) return this; + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.getSec() != 0L) { + setSec(other.getSec()); + } + if (other.getNsec() != 0L) { + setNsec(other.getNsec()); + } + if (other.getClkIdsMask() != 0L) { + setClkIdsMask(other.getClkIdsMask()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (!other.getPodContainerName().isEmpty()) { + podContainerName_ = other.podContainerName_; + 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 { + pb.Chaosdaemon.TimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.TimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 1; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 1; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 1; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 1; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private long sec_ ; + /** + * int64 sec = 2; + * @return The sec. + */ + @java.lang.Override + public long getSec() { + return sec_; + } + /** + * int64 sec = 2; + * @param value The sec to set. + * @return This builder for chaining. + */ + public Builder setSec(long value) { + + sec_ = value; + onChanged(); + return this; + } + /** + * int64 sec = 2; + * @return This builder for chaining. + */ + public Builder clearSec() { + + sec_ = 0L; + onChanged(); + return this; + } + + private long nsec_ ; + /** + * int64 nsec = 3; + * @return The nsec. + */ + @java.lang.Override + public long getNsec() { + return nsec_; + } + /** + * int64 nsec = 3; + * @param value The nsec to set. + * @return This builder for chaining. + */ + public Builder setNsec(long value) { + + nsec_ = value; + onChanged(); + return this; + } + /** + * int64 nsec = 3; + * @return This builder for chaining. + */ + public Builder clearNsec() { + + nsec_ = 0L; + onChanged(); + return this; + } + + private long clkIdsMask_ ; + /** + * uint64 clk_ids_mask = 4; + * @return The clkIdsMask. + */ + @java.lang.Override + public long getClkIdsMask() { + return clkIdsMask_; + } + /** + * uint64 clk_ids_mask = 4; + * @param value The clkIdsMask to set. + * @return This builder for chaining. + */ + public Builder setClkIdsMask(long value) { + + clkIdsMask_ = value; + onChanged(); + return this; + } + /** + * uint64 clk_ids_mask = 4; + * @return This builder for chaining. + */ + public Builder clearClkIdsMask() { + + clkIdsMask_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * string uid = 5; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uid = 5; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uid = 5; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * string uid = 5; + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * string uid = 5; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private java.lang.Object podContainerName_ = ""; + /** + * string pod_container_name = 6; + * @return The podContainerName. + */ + public java.lang.String getPodContainerName() { + java.lang.Object ref = podContainerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podContainerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pod_container_name = 6; + * @return The bytes for podContainerName. + */ + public com.google.protobuf.ByteString + getPodContainerNameBytes() { + java.lang.Object ref = podContainerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + podContainerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pod_container_name = 6; + * @param value The podContainerName to set. + * @return This builder for chaining. + */ + public Builder setPodContainerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + podContainerName_ = value; + onChanged(); + return this; + } + /** + * string pod_container_name = 6; + * @return This builder for chaining. + */ + public Builder clearPodContainerName() { + + podContainerName_ = getDefaultInstance().getPodContainerName(); + onChanged(); + return this; + } + /** + * string pod_container_name = 6; + * @param value The bytes for podContainerName to set. + * @return This builder for chaining. + */ + public Builder setPodContainerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + podContainerName_ = 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:pb.TimeRequest) + } + + // @@protoc_insertion_point(class_scope:pb.TimeRequest) + private static final pb.Chaosdaemon.TimeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.TimeRequest(); + } + + public static pb.Chaosdaemon.TimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimeRequest(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 pb.Chaosdaemon.TimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ContainerActionOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ContainerAction) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.ContainerAction.Action action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * .pb.ContainerAction.Action action = 1; + * @return The action. + */ + pb.Chaosdaemon.ContainerAction.Action getAction(); + } + /** + * Protobuf type {@code pb.ContainerAction} + */ + public static final class ContainerAction extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ContainerAction) + ContainerActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerAction.newBuilder() to construct. + private ContainerAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ContainerAction() { + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ContainerAction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContainerAction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + action_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ContainerAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ContainerAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ContainerAction.class, pb.Chaosdaemon.ContainerAction.Builder.class); + } + + /** + * Protobuf enum {@code pb.ContainerAction.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * KILL = 0; + */ + KILL(0), + /** + * GETPID = 1; + */ + GETPID(1), + UNRECOGNIZED(-1), + ; + + /** + * KILL = 0; + */ + public static final int KILL_VALUE = 0; + /** + * GETPID = 1; + */ + public static final int GETPID_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Action valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Action forNumber(int value) { + switch (value) { + case 0: return KILL; + case 1: return GETPID; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Action> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 pb.Chaosdaemon.ContainerAction.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pb.ContainerAction.Action) + } + + public static final int ACTION_FIELD_NUMBER = 1; + private int action_; + /** + * .pb.ContainerAction.Action action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override public int getActionValue() { + return action_; + } + /** + * .pb.ContainerAction.Action action = 1; + * @return The action. + */ + @java.lang.Override public pb.Chaosdaemon.ContainerAction.Action getAction() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.ContainerAction.Action result = pb.Chaosdaemon.ContainerAction.Action.valueOf(action_); + return result == null ? pb.Chaosdaemon.ContainerAction.Action.UNRECOGNIZED : result; + } + + 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 (action_ != pb.Chaosdaemon.ContainerAction.Action.KILL.getNumber()) { + output.writeEnum(1, action_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (action_ != pb.Chaosdaemon.ContainerAction.Action.KILL.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, action_); + } + 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 pb.Chaosdaemon.ContainerAction)) { + return super.equals(obj); + } + pb.Chaosdaemon.ContainerAction other = (pb.Chaosdaemon.ContainerAction) obj; + + if (action_ != other.action_) 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) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ContainerAction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerAction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ContainerAction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ContainerAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerAction 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 pb.Chaosdaemon.ContainerAction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerAction 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 pb.Chaosdaemon.ContainerAction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ContainerAction 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(pb.Chaosdaemon.ContainerAction 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; + } + /** + * Protobuf type {@code pb.ContainerAction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ContainerAction) + pb.Chaosdaemon.ContainerActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ContainerAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ContainerAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ContainerAction.class, pb.Chaosdaemon.ContainerAction.Builder.class); + } + + // Construct using pb.Chaosdaemon.ContainerAction.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(); + action_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ContainerAction_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerAction getDefaultInstanceForType() { + return pb.Chaosdaemon.ContainerAction.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerAction build() { + pb.Chaosdaemon.ContainerAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ContainerAction buildPartial() { + pb.Chaosdaemon.ContainerAction result = new pb.Chaosdaemon.ContainerAction(this); + result.action_ = action_; + 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 pb.Chaosdaemon.ContainerAction) { + return mergeFrom((pb.Chaosdaemon.ContainerAction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ContainerAction other) { + if (other == pb.Chaosdaemon.ContainerAction.getDefaultInstance()) return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + 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 { + pb.Chaosdaemon.ContainerAction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ContainerAction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int action_ = 0; + /** + * .pb.ContainerAction.Action action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override public int getActionValue() { + return action_; + } + /** + * .pb.ContainerAction.Action action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + + action_ = value; + onChanged(); + return this; + } + /** + * .pb.ContainerAction.Action action = 1; + * @return The action. + */ + @java.lang.Override + public pb.Chaosdaemon.ContainerAction.Action getAction() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.ContainerAction.Action result = pb.Chaosdaemon.ContainerAction.Action.valueOf(action_); + return result == null ? pb.Chaosdaemon.ContainerAction.Action.UNRECOGNIZED : result; + } + /** + * .pb.ContainerAction.Action action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(pb.Chaosdaemon.ContainerAction.Action value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pb.ContainerAction.Action action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = 0; + 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:pb.ContainerAction) + } + + // @@protoc_insertion_point(class_scope:pb.ContainerAction) + private static final pb.Chaosdaemon.ContainerAction DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ContainerAction(); + } + + public static pb.Chaosdaemon.ContainerAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerAction(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 pb.Chaosdaemon.ContainerAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExecStressRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ExecStressRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return The scope. + */ + pb.Chaosdaemon.ExecStressRequest.Scope getScope(); + + /** + * string target = 2; + * @return The target. + */ + java.lang.String getTarget(); + /** + * string target = 2; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + * string cpuStressors = 3; + * @return The cpuStressors. + */ + java.lang.String getCpuStressors(); + /** + * string cpuStressors = 3; + * @return The bytes for cpuStressors. + */ + com.google.protobuf.ByteString + getCpuStressorsBytes(); + + /** + * bool enterNS = 4; + * @return The enterNS. + */ + boolean getEnterNS(); + + /** + * string memoryStressors = 5; + * @return The memoryStressors. + */ + java.lang.String getMemoryStressors(); + /** + * string memoryStressors = 5; + * @return The bytes for memoryStressors. + */ + com.google.protobuf.ByteString + getMemoryStressorsBytes(); + + /** + * int32 oomScoreAdj = 7; + * @return The oomScoreAdj. + */ + int getOomScoreAdj(); + } + /** + * Protobuf type {@code pb.ExecStressRequest} + */ + public static final class ExecStressRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ExecStressRequest) + ExecStressRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecStressRequest.newBuilder() to construct. + private ExecStressRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExecStressRequest() { + scope_ = 0; + target_ = ""; + cpuStressors_ = ""; + memoryStressors_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExecStressRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExecStressRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + scope_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + cpuStressors_ = s; + break; + } + case 32: { + + enterNS_ = input.readBool(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + memoryStressors_ = s; + break; + } + case 56: { + + oomScoreAdj_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ExecStressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ExecStressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ExecStressRequest.class, pb.Chaosdaemon.ExecStressRequest.Builder.class); + } + + /** + * Protobuf enum {@code pb.ExecStressRequest.Scope} + */ + public enum Scope + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CONTAINER = 0; + */ + CONTAINER(0), + /** + * POD = 1; + */ + POD(1), + UNRECOGNIZED(-1), + ; + + /** + * CONTAINER = 0; + */ + public static final int CONTAINER_VALUE = 0; + /** + * POD = 1; + */ + public static final int POD_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scope forNumber(int value) { + switch (value) { + case 0: return CONTAINER; + case 1: return POD; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scope> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 pb.Chaosdaemon.ExecStressRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final Scope[] VALUES = values(); + + public static Scope 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 Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pb.ExecStressRequest.Scope) + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private int scope_; + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return The scope. + */ + @java.lang.Override public pb.Chaosdaemon.ExecStressRequest.Scope getScope() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.ExecStressRequest.Scope result = pb.Chaosdaemon.ExecStressRequest.Scope.valueOf(scope_); + return result == null ? pb.Chaosdaemon.ExecStressRequest.Scope.UNRECOGNIZED : result; + } + + public static final int TARGET_FIELD_NUMBER = 2; + private volatile java.lang.Object target_; + /** + * string target = 2; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + /** + * string target = 2; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPUSTRESSORS_FIELD_NUMBER = 3; + private volatile java.lang.Object cpuStressors_; + /** + * string cpuStressors = 3; + * @return The cpuStressors. + */ + @java.lang.Override + public java.lang.String getCpuStressors() { + java.lang.Object ref = cpuStressors_; + 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(); + cpuStressors_ = s; + return s; + } + } + /** + * string cpuStressors = 3; + * @return The bytes for cpuStressors. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpuStressorsBytes() { + java.lang.Object ref = cpuStressors_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuStressors_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTERNS_FIELD_NUMBER = 4; + private boolean enterNS_; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + public static final int MEMORYSTRESSORS_FIELD_NUMBER = 5; + private volatile java.lang.Object memoryStressors_; + /** + * string memoryStressors = 5; + * @return The memoryStressors. + */ + @java.lang.Override + public java.lang.String getMemoryStressors() { + java.lang.Object ref = memoryStressors_; + 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(); + memoryStressors_ = s; + return s; + } + } + /** + * string memoryStressors = 5; + * @return The bytes for memoryStressors. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoryStressorsBytes() { + java.lang.Object ref = memoryStressors_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryStressors_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OOMSCOREADJ_FIELD_NUMBER = 7; + private int oomScoreAdj_; + /** + * int32 oomScoreAdj = 7; + * @return The oomScoreAdj. + */ + @java.lang.Override + public int getOomScoreAdj() { + return oomScoreAdj_; + } + + 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 (scope_ != pb.Chaosdaemon.ExecStressRequest.Scope.CONTAINER.getNumber()) { + output.writeEnum(1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuStressors_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, cpuStressors_); + } + if (enterNS_ != false) { + output.writeBool(4, enterNS_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryStressors_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, memoryStressors_); + } + if (oomScoreAdj_ != 0) { + output.writeInt32(7, oomScoreAdj_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scope_ != pb.Chaosdaemon.ExecStressRequest.Scope.CONTAINER.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuStressors_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, cpuStressors_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, enterNS_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryStressors_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, memoryStressors_); + } + if (oomScoreAdj_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, oomScoreAdj_); + } + 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 pb.Chaosdaemon.ExecStressRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.ExecStressRequest other = (pb.Chaosdaemon.ExecStressRequest) obj; + + if (scope_ != other.scope_) return false; + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getCpuStressors() + .equals(other.getCpuStressors())) return false; + if (getEnterNS() + != other.getEnterNS()) return false; + if (!getMemoryStressors() + .equals(other.getMemoryStressors())) return false; + if (getOomScoreAdj() + != other.getOomScoreAdj()) 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) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + CPUSTRESSORS_FIELD_NUMBER; + hash = (53 * hash) + getCpuStressors().hashCode(); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (37 * hash) + MEMORYSTRESSORS_FIELD_NUMBER; + hash = (53 * hash) + getMemoryStressors().hashCode(); + hash = (37 * hash) + OOMSCOREADJ_FIELD_NUMBER; + hash = (53 * hash) + getOomScoreAdj(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ExecStressRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ExecStressRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ExecStressRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ExecStressRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ExecStressRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ExecStressRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ExecStressRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ExecStressRequest 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 pb.Chaosdaemon.ExecStressRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ExecStressRequest 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 pb.Chaosdaemon.ExecStressRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ExecStressRequest 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(pb.Chaosdaemon.ExecStressRequest 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; + } + /** + * Protobuf type {@code pb.ExecStressRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ExecStressRequest) + pb.Chaosdaemon.ExecStressRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ExecStressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ExecStressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ExecStressRequest.class, pb.Chaosdaemon.ExecStressRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.ExecStressRequest.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(); + scope_ = 0; + + target_ = ""; + + cpuStressors_ = ""; + + enterNS_ = false; + + memoryStressors_ = ""; + + oomScoreAdj_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ExecStressRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ExecStressRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.ExecStressRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ExecStressRequest build() { + pb.Chaosdaemon.ExecStressRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ExecStressRequest buildPartial() { + pb.Chaosdaemon.ExecStressRequest result = new pb.Chaosdaemon.ExecStressRequest(this); + result.scope_ = scope_; + result.target_ = target_; + result.cpuStressors_ = cpuStressors_; + result.enterNS_ = enterNS_; + result.memoryStressors_ = memoryStressors_; + result.oomScoreAdj_ = oomScoreAdj_; + 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 pb.Chaosdaemon.ExecStressRequest) { + return mergeFrom((pb.Chaosdaemon.ExecStressRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ExecStressRequest other) { + if (other == pb.Chaosdaemon.ExecStressRequest.getDefaultInstance()) return this; + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getCpuStressors().isEmpty()) { + cpuStressors_ = other.cpuStressors_; + onChanged(); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + if (!other.getMemoryStressors().isEmpty()) { + memoryStressors_ = other.memoryStressors_; + onChanged(); + } + if (other.getOomScoreAdj() != 0) { + setOomScoreAdj(other.getOomScoreAdj()); + } + 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 { + pb.Chaosdaemon.ExecStressRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ExecStressRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int scope_ = 0; + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override public int getScopeValue() { + return scope_; + } + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + + scope_ = value; + onChanged(); + return this; + } + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return The scope. + */ + @java.lang.Override + public pb.Chaosdaemon.ExecStressRequest.Scope getScope() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.ExecStressRequest.Scope result = pb.Chaosdaemon.ExecStressRequest.Scope.valueOf(scope_); + return result == null ? pb.Chaosdaemon.ExecStressRequest.Scope.UNRECOGNIZED : result; + } + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(pb.Chaosdaemon.ExecStressRequest.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pb.ExecStressRequest.Scope scope = 1; + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = 0; + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * string target = 2; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string target = 2; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string target = 2; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * string target = 2; + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * string target = 2; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object cpuStressors_ = ""; + /** + * string cpuStressors = 3; + * @return The cpuStressors. + */ + public java.lang.String getCpuStressors() { + java.lang.Object ref = cpuStressors_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuStressors_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cpuStressors = 3; + * @return The bytes for cpuStressors. + */ + public com.google.protobuf.ByteString + getCpuStressorsBytes() { + java.lang.Object ref = cpuStressors_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuStressors_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cpuStressors = 3; + * @param value The cpuStressors to set. + * @return This builder for chaining. + */ + public Builder setCpuStressors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpuStressors_ = value; + onChanged(); + return this; + } + /** + * string cpuStressors = 3; + * @return This builder for chaining. + */ + public Builder clearCpuStressors() { + + cpuStressors_ = getDefaultInstance().getCpuStressors(); + onChanged(); + return this; + } + /** + * string cpuStressors = 3; + * @param value The bytes for cpuStressors to set. + * @return This builder for chaining. + */ + public Builder setCpuStressorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpuStressors_ = value; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 4; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 4; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + onChanged(); + return this; + } + + private java.lang.Object memoryStressors_ = ""; + /** + * string memoryStressors = 5; + * @return The memoryStressors. + */ + public java.lang.String getMemoryStressors() { + java.lang.Object ref = memoryStressors_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryStressors_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string memoryStressors = 5; + * @return The bytes for memoryStressors. + */ + public com.google.protobuf.ByteString + getMemoryStressorsBytes() { + java.lang.Object ref = memoryStressors_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryStressors_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string memoryStressors = 5; + * @param value The memoryStressors to set. + * @return This builder for chaining. + */ + public Builder setMemoryStressors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryStressors_ = value; + onChanged(); + return this; + } + /** + * string memoryStressors = 5; + * @return This builder for chaining. + */ + public Builder clearMemoryStressors() { + + memoryStressors_ = getDefaultInstance().getMemoryStressors(); + onChanged(); + return this; + } + /** + * string memoryStressors = 5; + * @param value The bytes for memoryStressors to set. + * @return This builder for chaining. + */ + public Builder setMemoryStressorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memoryStressors_ = value; + onChanged(); + return this; + } + + private int oomScoreAdj_ ; + /** + * int32 oomScoreAdj = 7; + * @return The oomScoreAdj. + */ + @java.lang.Override + public int getOomScoreAdj() { + return oomScoreAdj_; + } + /** + * int32 oomScoreAdj = 7; + * @param value The oomScoreAdj to set. + * @return This builder for chaining. + */ + public Builder setOomScoreAdj(int value) { + + oomScoreAdj_ = value; + onChanged(); + return this; + } + /** + * int32 oomScoreAdj = 7; + * @return This builder for chaining. + */ + public Builder clearOomScoreAdj() { + + oomScoreAdj_ = 0; + 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:pb.ExecStressRequest) + } + + // @@protoc_insertion_point(class_scope:pb.ExecStressRequest) + private static final pb.Chaosdaemon.ExecStressRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ExecStressRequest(); + } + + public static pb.Chaosdaemon.ExecStressRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecStressRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecStressRequest(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 pb.Chaosdaemon.ExecStressRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExecStressResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ExecStressResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * string cpuInstance = 1; + * @return The cpuInstance. + */ + java.lang.String getCpuInstance(); + /** + * string cpuInstance = 1; + * @return The bytes for cpuInstance. + */ + com.google.protobuf.ByteString + getCpuInstanceBytes(); + + /** + * int64 cpuStartTime = 2; + * @return The cpuStartTime. + */ + long getCpuStartTime(); + + /** + * string memoryInstance = 3; + * @return The memoryInstance. + */ + java.lang.String getMemoryInstance(); + /** + * string memoryInstance = 3; + * @return The bytes for memoryInstance. + */ + com.google.protobuf.ByteString + getMemoryInstanceBytes(); + + /** + * int64 memoryStartTime = 4; + * @return The memoryStartTime. + */ + long getMemoryStartTime(); + + /** + * string cpuInstanceUid = 5; + * @return The cpuInstanceUid. + */ + java.lang.String getCpuInstanceUid(); + /** + * string cpuInstanceUid = 5; + * @return The bytes for cpuInstanceUid. + */ + com.google.protobuf.ByteString + getCpuInstanceUidBytes(); + + /** + * string memoryInstanceUid = 6; + * @return The memoryInstanceUid. + */ + java.lang.String getMemoryInstanceUid(); + /** + * string memoryInstanceUid = 6; + * @return The bytes for memoryInstanceUid. + */ + com.google.protobuf.ByteString + getMemoryInstanceUidBytes(); + } + /** + * Protobuf type {@code pb.ExecStressResponse} + */ + public static final class ExecStressResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ExecStressResponse) + ExecStressResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecStressResponse.newBuilder() to construct. + private ExecStressResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExecStressResponse() { + cpuInstance_ = ""; + memoryInstance_ = ""; + cpuInstanceUid_ = ""; + memoryInstanceUid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExecStressResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExecStressResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + cpuInstance_ = s; + break; + } + case 16: { + + cpuStartTime_ = input.readInt64(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + memoryInstance_ = s; + break; + } + case 32: { + + memoryStartTime_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + cpuInstanceUid_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + memoryInstanceUid_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ExecStressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ExecStressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ExecStressResponse.class, pb.Chaosdaemon.ExecStressResponse.Builder.class); + } + + public static final int CPUINSTANCE_FIELD_NUMBER = 1; + private volatile java.lang.Object cpuInstance_; + /** + * string cpuInstance = 1; + * @return The cpuInstance. + */ + @java.lang.Override + public java.lang.String getCpuInstance() { + java.lang.Object ref = cpuInstance_; + 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(); + cpuInstance_ = s; + return s; + } + } + /** + * string cpuInstance = 1; + * @return The bytes for cpuInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpuInstanceBytes() { + java.lang.Object ref = cpuInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPUSTARTTIME_FIELD_NUMBER = 2; + private long cpuStartTime_; + /** + * int64 cpuStartTime = 2; + * @return The cpuStartTime. + */ + @java.lang.Override + public long getCpuStartTime() { + return cpuStartTime_; + } + + public static final int MEMORYINSTANCE_FIELD_NUMBER = 3; + private volatile java.lang.Object memoryInstance_; + /** + * string memoryInstance = 3; + * @return The memoryInstance. + */ + @java.lang.Override + public java.lang.String getMemoryInstance() { + java.lang.Object ref = memoryInstance_; + 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(); + memoryInstance_ = s; + return s; + } + } + /** + * string memoryInstance = 3; + * @return The bytes for memoryInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoryInstanceBytes() { + java.lang.Object ref = memoryInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORYSTARTTIME_FIELD_NUMBER = 4; + private long memoryStartTime_; + /** + * int64 memoryStartTime = 4; + * @return The memoryStartTime. + */ + @java.lang.Override + public long getMemoryStartTime() { + return memoryStartTime_; + } + + public static final int CPUINSTANCEUID_FIELD_NUMBER = 5; + private volatile java.lang.Object cpuInstanceUid_; + /** + * string cpuInstanceUid = 5; + * @return The cpuInstanceUid. + */ + @java.lang.Override + public java.lang.String getCpuInstanceUid() { + java.lang.Object ref = cpuInstanceUid_; + 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(); + cpuInstanceUid_ = s; + return s; + } + } + /** + * string cpuInstanceUid = 5; + * @return The bytes for cpuInstanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpuInstanceUidBytes() { + java.lang.Object ref = cpuInstanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORYINSTANCEUID_FIELD_NUMBER = 6; + private volatile java.lang.Object memoryInstanceUid_; + /** + * string memoryInstanceUid = 6; + * @return The memoryInstanceUid. + */ + @java.lang.Override + public java.lang.String getMemoryInstanceUid() { + java.lang.Object ref = memoryInstanceUid_; + 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(); + memoryInstanceUid_ = s; + return s; + } + } + /** + * string memoryInstanceUid = 6; + * @return The bytes for memoryInstanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoryInstanceUidBytes() { + java.lang.Object ref = memoryInstanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstanceUid_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpuInstance_); + } + if (cpuStartTime_ != 0L) { + output.writeInt64(2, cpuStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, memoryInstance_); + } + if (memoryStartTime_ != 0L) { + output.writeInt64(4, memoryStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cpuInstanceUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memoryInstanceUid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpuInstance_); + } + if (cpuStartTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, cpuStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, memoryInstance_); + } + if (memoryStartTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, memoryStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cpuInstanceUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memoryInstanceUid_); + } + 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 pb.Chaosdaemon.ExecStressResponse)) { + return super.equals(obj); + } + pb.Chaosdaemon.ExecStressResponse other = (pb.Chaosdaemon.ExecStressResponse) obj; + + if (!getCpuInstance() + .equals(other.getCpuInstance())) return false; + if (getCpuStartTime() + != other.getCpuStartTime()) return false; + if (!getMemoryInstance() + .equals(other.getMemoryInstance())) return false; + if (getMemoryStartTime() + != other.getMemoryStartTime()) return false; + if (!getCpuInstanceUid() + .equals(other.getCpuInstanceUid())) return false; + if (!getMemoryInstanceUid() + .equals(other.getMemoryInstanceUid())) 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) + CPUINSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCpuInstance().hashCode(); + hash = (37 * hash) + CPUSTARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCpuStartTime()); + hash = (37 * hash) + MEMORYINSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getMemoryInstance().hashCode(); + hash = (37 * hash) + MEMORYSTARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemoryStartTime()); + hash = (37 * hash) + CPUINSTANCEUID_FIELD_NUMBER; + hash = (53 * hash) + getCpuInstanceUid().hashCode(); + hash = (37 * hash) + MEMORYINSTANCEUID_FIELD_NUMBER; + hash = (53 * hash) + getMemoryInstanceUid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ExecStressResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ExecStressResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ExecStressResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ExecStressResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ExecStressResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ExecStressResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ExecStressResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ExecStressResponse 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 pb.Chaosdaemon.ExecStressResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ExecStressResponse 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 pb.Chaosdaemon.ExecStressResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ExecStressResponse 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(pb.Chaosdaemon.ExecStressResponse 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; + } + /** + * Protobuf type {@code pb.ExecStressResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ExecStressResponse) + pb.Chaosdaemon.ExecStressResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ExecStressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ExecStressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ExecStressResponse.class, pb.Chaosdaemon.ExecStressResponse.Builder.class); + } + + // Construct using pb.Chaosdaemon.ExecStressResponse.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(); + cpuInstance_ = ""; + + cpuStartTime_ = 0L; + + memoryInstance_ = ""; + + memoryStartTime_ = 0L; + + cpuInstanceUid_ = ""; + + memoryInstanceUid_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ExecStressResponse_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ExecStressResponse getDefaultInstanceForType() { + return pb.Chaosdaemon.ExecStressResponse.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ExecStressResponse build() { + pb.Chaosdaemon.ExecStressResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ExecStressResponse buildPartial() { + pb.Chaosdaemon.ExecStressResponse result = new pb.Chaosdaemon.ExecStressResponse(this); + result.cpuInstance_ = cpuInstance_; + result.cpuStartTime_ = cpuStartTime_; + result.memoryInstance_ = memoryInstance_; + result.memoryStartTime_ = memoryStartTime_; + result.cpuInstanceUid_ = cpuInstanceUid_; + result.memoryInstanceUid_ = memoryInstanceUid_; + 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 pb.Chaosdaemon.ExecStressResponse) { + return mergeFrom((pb.Chaosdaemon.ExecStressResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ExecStressResponse other) { + if (other == pb.Chaosdaemon.ExecStressResponse.getDefaultInstance()) return this; + if (!other.getCpuInstance().isEmpty()) { + cpuInstance_ = other.cpuInstance_; + onChanged(); + } + if (other.getCpuStartTime() != 0L) { + setCpuStartTime(other.getCpuStartTime()); + } + if (!other.getMemoryInstance().isEmpty()) { + memoryInstance_ = other.memoryInstance_; + onChanged(); + } + if (other.getMemoryStartTime() != 0L) { + setMemoryStartTime(other.getMemoryStartTime()); + } + if (!other.getCpuInstanceUid().isEmpty()) { + cpuInstanceUid_ = other.cpuInstanceUid_; + onChanged(); + } + if (!other.getMemoryInstanceUid().isEmpty()) { + memoryInstanceUid_ = other.memoryInstanceUid_; + 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 { + pb.Chaosdaemon.ExecStressResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ExecStressResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cpuInstance_ = ""; + /** + * string cpuInstance = 1; + * @return The cpuInstance. + */ + public java.lang.String getCpuInstance() { + java.lang.Object ref = cpuInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cpuInstance = 1; + * @return The bytes for cpuInstance. + */ + public com.google.protobuf.ByteString + getCpuInstanceBytes() { + java.lang.Object ref = cpuInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cpuInstance = 1; + * @param value The cpuInstance to set. + * @return This builder for chaining. + */ + public Builder setCpuInstance( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpuInstance_ = value; + onChanged(); + return this; + } + /** + * string cpuInstance = 1; + * @return This builder for chaining. + */ + public Builder clearCpuInstance() { + + cpuInstance_ = getDefaultInstance().getCpuInstance(); + onChanged(); + return this; + } + /** + * string cpuInstance = 1; + * @param value The bytes for cpuInstance to set. + * @return This builder for chaining. + */ + public Builder setCpuInstanceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpuInstance_ = value; + onChanged(); + return this; + } + + private long cpuStartTime_ ; + /** + * int64 cpuStartTime = 2; + * @return The cpuStartTime. + */ + @java.lang.Override + public long getCpuStartTime() { + return cpuStartTime_; + } + /** + * int64 cpuStartTime = 2; + * @param value The cpuStartTime to set. + * @return This builder for chaining. + */ + public Builder setCpuStartTime(long value) { + + cpuStartTime_ = value; + onChanged(); + return this; + } + /** + * int64 cpuStartTime = 2; + * @return This builder for chaining. + */ + public Builder clearCpuStartTime() { + + cpuStartTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object memoryInstance_ = ""; + /** + * string memoryInstance = 3; + * @return The memoryInstance. + */ + public java.lang.String getMemoryInstance() { + java.lang.Object ref = memoryInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string memoryInstance = 3; + * @return The bytes for memoryInstance. + */ + public com.google.protobuf.ByteString + getMemoryInstanceBytes() { + java.lang.Object ref = memoryInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string memoryInstance = 3; + * @param value The memoryInstance to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstance( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryInstance_ = value; + onChanged(); + return this; + } + /** + * string memoryInstance = 3; + * @return This builder for chaining. + */ + public Builder clearMemoryInstance() { + + memoryInstance_ = getDefaultInstance().getMemoryInstance(); + onChanged(); + return this; + } + /** + * string memoryInstance = 3; + * @param value The bytes for memoryInstance to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstanceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memoryInstance_ = value; + onChanged(); + return this; + } + + private long memoryStartTime_ ; + /** + * int64 memoryStartTime = 4; + * @return The memoryStartTime. + */ + @java.lang.Override + public long getMemoryStartTime() { + return memoryStartTime_; + } + /** + * int64 memoryStartTime = 4; + * @param value The memoryStartTime to set. + * @return This builder for chaining. + */ + public Builder setMemoryStartTime(long value) { + + memoryStartTime_ = value; + onChanged(); + return this; + } + /** + * int64 memoryStartTime = 4; + * @return This builder for chaining. + */ + public Builder clearMemoryStartTime() { + + memoryStartTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object cpuInstanceUid_ = ""; + /** + * string cpuInstanceUid = 5; + * @return The cpuInstanceUid. + */ + public java.lang.String getCpuInstanceUid() { + java.lang.Object ref = cpuInstanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuInstanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cpuInstanceUid = 5; + * @return The bytes for cpuInstanceUid. + */ + public com.google.protobuf.ByteString + getCpuInstanceUidBytes() { + java.lang.Object ref = cpuInstanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cpuInstanceUid = 5; + * @param value The cpuInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setCpuInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpuInstanceUid_ = value; + onChanged(); + return this; + } + /** + * string cpuInstanceUid = 5; + * @return This builder for chaining. + */ + public Builder clearCpuInstanceUid() { + + cpuInstanceUid_ = getDefaultInstance().getCpuInstanceUid(); + onChanged(); + return this; + } + /** + * string cpuInstanceUid = 5; + * @param value The bytes for cpuInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setCpuInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpuInstanceUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object memoryInstanceUid_ = ""; + /** + * string memoryInstanceUid = 6; + * @return The memoryInstanceUid. + */ + public java.lang.String getMemoryInstanceUid() { + java.lang.Object ref = memoryInstanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryInstanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string memoryInstanceUid = 6; + * @return The bytes for memoryInstanceUid. + */ + public com.google.protobuf.ByteString + getMemoryInstanceUidBytes() { + java.lang.Object ref = memoryInstanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string memoryInstanceUid = 6; + * @param value The memoryInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryInstanceUid_ = value; + onChanged(); + return this; + } + /** + * string memoryInstanceUid = 6; + * @return This builder for chaining. + */ + public Builder clearMemoryInstanceUid() { + + memoryInstanceUid_ = getDefaultInstance().getMemoryInstanceUid(); + onChanged(); + return this; + } + /** + * string memoryInstanceUid = 6; + * @param value The bytes for memoryInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memoryInstanceUid_ = 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:pb.ExecStressResponse) + } + + // @@protoc_insertion_point(class_scope:pb.ExecStressResponse) + private static final pb.Chaosdaemon.ExecStressResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ExecStressResponse(); + } + + public static pb.Chaosdaemon.ExecStressResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecStressResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecStressResponse(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 pb.Chaosdaemon.ExecStressResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CancelStressRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.CancelStressRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string cpuInstance = 1; + * @return The cpuInstance. + */ + java.lang.String getCpuInstance(); + /** + * string cpuInstance = 1; + * @return The bytes for cpuInstance. + */ + com.google.protobuf.ByteString + getCpuInstanceBytes(); + + /** + * int64 cpuStartTime = 2; + * @return The cpuStartTime. + */ + long getCpuStartTime(); + + /** + * string memoryInstance = 3; + * @return The memoryInstance. + */ + java.lang.String getMemoryInstance(); + /** + * string memoryInstance = 3; + * @return The bytes for memoryInstance. + */ + com.google.protobuf.ByteString + getMemoryInstanceBytes(); + + /** + * int64 memoryStartTime = 4; + * @return The memoryStartTime. + */ + long getMemoryStartTime(); + + /** + * string cpuInstanceUid = 5; + * @return The cpuInstanceUid. + */ + java.lang.String getCpuInstanceUid(); + /** + * string cpuInstanceUid = 5; + * @return The bytes for cpuInstanceUid. + */ + com.google.protobuf.ByteString + getCpuInstanceUidBytes(); + + /** + * string memoryInstanceUid = 6; + * @return The memoryInstanceUid. + */ + java.lang.String getMemoryInstanceUid(); + /** + * string memoryInstanceUid = 6; + * @return The bytes for memoryInstanceUid. + */ + com.google.protobuf.ByteString + getMemoryInstanceUidBytes(); + } + /** + * Protobuf type {@code pb.CancelStressRequest} + */ + public static final class CancelStressRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.CancelStressRequest) + CancelStressRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelStressRequest.newBuilder() to construct. + private CancelStressRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CancelStressRequest() { + cpuInstance_ = ""; + memoryInstance_ = ""; + cpuInstanceUid_ = ""; + memoryInstanceUid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CancelStressRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CancelStressRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + cpuInstance_ = s; + break; + } + case 16: { + + cpuStartTime_ = input.readInt64(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + memoryInstance_ = s; + break; + } + case 32: { + + memoryStartTime_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + cpuInstanceUid_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + memoryInstanceUid_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_CancelStressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_CancelStressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.CancelStressRequest.class, pb.Chaosdaemon.CancelStressRequest.Builder.class); + } + + public static final int CPUINSTANCE_FIELD_NUMBER = 1; + private volatile java.lang.Object cpuInstance_; + /** + * string cpuInstance = 1; + * @return The cpuInstance. + */ + @java.lang.Override + public java.lang.String getCpuInstance() { + java.lang.Object ref = cpuInstance_; + 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(); + cpuInstance_ = s; + return s; + } + } + /** + * string cpuInstance = 1; + * @return The bytes for cpuInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpuInstanceBytes() { + java.lang.Object ref = cpuInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPUSTARTTIME_FIELD_NUMBER = 2; + private long cpuStartTime_; + /** + * int64 cpuStartTime = 2; + * @return The cpuStartTime. + */ + @java.lang.Override + public long getCpuStartTime() { + return cpuStartTime_; + } + + public static final int MEMORYINSTANCE_FIELD_NUMBER = 3; + private volatile java.lang.Object memoryInstance_; + /** + * string memoryInstance = 3; + * @return The memoryInstance. + */ + @java.lang.Override + public java.lang.String getMemoryInstance() { + java.lang.Object ref = memoryInstance_; + 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(); + memoryInstance_ = s; + return s; + } + } + /** + * string memoryInstance = 3; + * @return The bytes for memoryInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoryInstanceBytes() { + java.lang.Object ref = memoryInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORYSTARTTIME_FIELD_NUMBER = 4; + private long memoryStartTime_; + /** + * int64 memoryStartTime = 4; + * @return The memoryStartTime. + */ + @java.lang.Override + public long getMemoryStartTime() { + return memoryStartTime_; + } + + public static final int CPUINSTANCEUID_FIELD_NUMBER = 5; + private volatile java.lang.Object cpuInstanceUid_; + /** + * string cpuInstanceUid = 5; + * @return The cpuInstanceUid. + */ + @java.lang.Override + public java.lang.String getCpuInstanceUid() { + java.lang.Object ref = cpuInstanceUid_; + 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(); + cpuInstanceUid_ = s; + return s; + } + } + /** + * string cpuInstanceUid = 5; + * @return The bytes for cpuInstanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCpuInstanceUidBytes() { + java.lang.Object ref = cpuInstanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORYINSTANCEUID_FIELD_NUMBER = 6; + private volatile java.lang.Object memoryInstanceUid_; + /** + * string memoryInstanceUid = 6; + * @return The memoryInstanceUid. + */ + @java.lang.Override + public java.lang.String getMemoryInstanceUid() { + java.lang.Object ref = memoryInstanceUid_; + 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(); + memoryInstanceUid_ = s; + return s; + } + } + /** + * string memoryInstanceUid = 6; + * @return The bytes for memoryInstanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoryInstanceUidBytes() { + java.lang.Object ref = memoryInstanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstanceUid_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpuInstance_); + } + if (cpuStartTime_ != 0L) { + output.writeInt64(2, cpuStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, memoryInstance_); + } + if (memoryStartTime_ != 0L) { + output.writeInt64(4, memoryStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cpuInstanceUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memoryInstanceUid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpuInstance_); + } + if (cpuStartTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, cpuStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, memoryInstance_); + } + if (memoryStartTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, memoryStartTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInstanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cpuInstanceUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryInstanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memoryInstanceUid_); + } + 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 pb.Chaosdaemon.CancelStressRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.CancelStressRequest other = (pb.Chaosdaemon.CancelStressRequest) obj; + + if (!getCpuInstance() + .equals(other.getCpuInstance())) return false; + if (getCpuStartTime() + != other.getCpuStartTime()) return false; + if (!getMemoryInstance() + .equals(other.getMemoryInstance())) return false; + if (getMemoryStartTime() + != other.getMemoryStartTime()) return false; + if (!getCpuInstanceUid() + .equals(other.getCpuInstanceUid())) return false; + if (!getMemoryInstanceUid() + .equals(other.getMemoryInstanceUid())) 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) + CPUINSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCpuInstance().hashCode(); + hash = (37 * hash) + CPUSTARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCpuStartTime()); + hash = (37 * hash) + MEMORYINSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getMemoryInstance().hashCode(); + hash = (37 * hash) + MEMORYSTARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemoryStartTime()); + hash = (37 * hash) + CPUINSTANCEUID_FIELD_NUMBER; + hash = (53 * hash) + getCpuInstanceUid().hashCode(); + hash = (37 * hash) + MEMORYINSTANCEUID_FIELD_NUMBER; + hash = (53 * hash) + getMemoryInstanceUid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.CancelStressRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.CancelStressRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.CancelStressRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.CancelStressRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.CancelStressRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.CancelStressRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.CancelStressRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.CancelStressRequest 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 pb.Chaosdaemon.CancelStressRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.CancelStressRequest 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 pb.Chaosdaemon.CancelStressRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.CancelStressRequest 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(pb.Chaosdaemon.CancelStressRequest 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; + } + /** + * Protobuf type {@code pb.CancelStressRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.CancelStressRequest) + pb.Chaosdaemon.CancelStressRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_CancelStressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_CancelStressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.CancelStressRequest.class, pb.Chaosdaemon.CancelStressRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.CancelStressRequest.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(); + cpuInstance_ = ""; + + cpuStartTime_ = 0L; + + memoryInstance_ = ""; + + memoryStartTime_ = 0L; + + cpuInstanceUid_ = ""; + + memoryInstanceUid_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_CancelStressRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.CancelStressRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.CancelStressRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.CancelStressRequest build() { + pb.Chaosdaemon.CancelStressRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.CancelStressRequest buildPartial() { + pb.Chaosdaemon.CancelStressRequest result = new pb.Chaosdaemon.CancelStressRequest(this); + result.cpuInstance_ = cpuInstance_; + result.cpuStartTime_ = cpuStartTime_; + result.memoryInstance_ = memoryInstance_; + result.memoryStartTime_ = memoryStartTime_; + result.cpuInstanceUid_ = cpuInstanceUid_; + result.memoryInstanceUid_ = memoryInstanceUid_; + 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 pb.Chaosdaemon.CancelStressRequest) { + return mergeFrom((pb.Chaosdaemon.CancelStressRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.CancelStressRequest other) { + if (other == pb.Chaosdaemon.CancelStressRequest.getDefaultInstance()) return this; + if (!other.getCpuInstance().isEmpty()) { + cpuInstance_ = other.cpuInstance_; + onChanged(); + } + if (other.getCpuStartTime() != 0L) { + setCpuStartTime(other.getCpuStartTime()); + } + if (!other.getMemoryInstance().isEmpty()) { + memoryInstance_ = other.memoryInstance_; + onChanged(); + } + if (other.getMemoryStartTime() != 0L) { + setMemoryStartTime(other.getMemoryStartTime()); + } + if (!other.getCpuInstanceUid().isEmpty()) { + cpuInstanceUid_ = other.cpuInstanceUid_; + onChanged(); + } + if (!other.getMemoryInstanceUid().isEmpty()) { + memoryInstanceUid_ = other.memoryInstanceUid_; + 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 { + pb.Chaosdaemon.CancelStressRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.CancelStressRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cpuInstance_ = ""; + /** + * string cpuInstance = 1; + * @return The cpuInstance. + */ + public java.lang.String getCpuInstance() { + java.lang.Object ref = cpuInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cpuInstance = 1; + * @return The bytes for cpuInstance. + */ + public com.google.protobuf.ByteString + getCpuInstanceBytes() { + java.lang.Object ref = cpuInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cpuInstance = 1; + * @param value The cpuInstance to set. + * @return This builder for chaining. + */ + public Builder setCpuInstance( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpuInstance_ = value; + onChanged(); + return this; + } + /** + * string cpuInstance = 1; + * @return This builder for chaining. + */ + public Builder clearCpuInstance() { + + cpuInstance_ = getDefaultInstance().getCpuInstance(); + onChanged(); + return this; + } + /** + * string cpuInstance = 1; + * @param value The bytes for cpuInstance to set. + * @return This builder for chaining. + */ + public Builder setCpuInstanceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpuInstance_ = value; + onChanged(); + return this; + } + + private long cpuStartTime_ ; + /** + * int64 cpuStartTime = 2; + * @return The cpuStartTime. + */ + @java.lang.Override + public long getCpuStartTime() { + return cpuStartTime_; + } + /** + * int64 cpuStartTime = 2; + * @param value The cpuStartTime to set. + * @return This builder for chaining. + */ + public Builder setCpuStartTime(long value) { + + cpuStartTime_ = value; + onChanged(); + return this; + } + /** + * int64 cpuStartTime = 2; + * @return This builder for chaining. + */ + public Builder clearCpuStartTime() { + + cpuStartTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object memoryInstance_ = ""; + /** + * string memoryInstance = 3; + * @return The memoryInstance. + */ + public java.lang.String getMemoryInstance() { + java.lang.Object ref = memoryInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string memoryInstance = 3; + * @return The bytes for memoryInstance. + */ + public com.google.protobuf.ByteString + getMemoryInstanceBytes() { + java.lang.Object ref = memoryInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string memoryInstance = 3; + * @param value The memoryInstance to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstance( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryInstance_ = value; + onChanged(); + return this; + } + /** + * string memoryInstance = 3; + * @return This builder for chaining. + */ + public Builder clearMemoryInstance() { + + memoryInstance_ = getDefaultInstance().getMemoryInstance(); + onChanged(); + return this; + } + /** + * string memoryInstance = 3; + * @param value The bytes for memoryInstance to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstanceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memoryInstance_ = value; + onChanged(); + return this; + } + + private long memoryStartTime_ ; + /** + * int64 memoryStartTime = 4; + * @return The memoryStartTime. + */ + @java.lang.Override + public long getMemoryStartTime() { + return memoryStartTime_; + } + /** + * int64 memoryStartTime = 4; + * @param value The memoryStartTime to set. + * @return This builder for chaining. + */ + public Builder setMemoryStartTime(long value) { + + memoryStartTime_ = value; + onChanged(); + return this; + } + /** + * int64 memoryStartTime = 4; + * @return This builder for chaining. + */ + public Builder clearMemoryStartTime() { + + memoryStartTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object cpuInstanceUid_ = ""; + /** + * string cpuInstanceUid = 5; + * @return The cpuInstanceUid. + */ + public java.lang.String getCpuInstanceUid() { + java.lang.Object ref = cpuInstanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuInstanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cpuInstanceUid = 5; + * @return The bytes for cpuInstanceUid. + */ + public com.google.protobuf.ByteString + getCpuInstanceUidBytes() { + java.lang.Object ref = cpuInstanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cpuInstanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cpuInstanceUid = 5; + * @param value The cpuInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setCpuInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpuInstanceUid_ = value; + onChanged(); + return this; + } + /** + * string cpuInstanceUid = 5; + * @return This builder for chaining. + */ + public Builder clearCpuInstanceUid() { + + cpuInstanceUid_ = getDefaultInstance().getCpuInstanceUid(); + onChanged(); + return this; + } + /** + * string cpuInstanceUid = 5; + * @param value The bytes for cpuInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setCpuInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpuInstanceUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object memoryInstanceUid_ = ""; + /** + * string memoryInstanceUid = 6; + * @return The memoryInstanceUid. + */ + public java.lang.String getMemoryInstanceUid() { + java.lang.Object ref = memoryInstanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryInstanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string memoryInstanceUid = 6; + * @return The bytes for memoryInstanceUid. + */ + public com.google.protobuf.ByteString + getMemoryInstanceUidBytes() { + java.lang.Object ref = memoryInstanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryInstanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string memoryInstanceUid = 6; + * @param value The memoryInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryInstanceUid_ = value; + onChanged(); + return this; + } + /** + * string memoryInstanceUid = 6; + * @return This builder for chaining. + */ + public Builder clearMemoryInstanceUid() { + + memoryInstanceUid_ = getDefaultInstance().getMemoryInstanceUid(); + onChanged(); + return this; + } + /** + * string memoryInstanceUid = 6; + * @param value The bytes for memoryInstanceUid to set. + * @return This builder for chaining. + */ + public Builder setMemoryInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memoryInstanceUid_ = 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:pb.CancelStressRequest) + } + + // @@protoc_insertion_point(class_scope:pb.CancelStressRequest) + private static final pb.Chaosdaemon.CancelStressRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.CancelStressRequest(); + } + + public static pb.Chaosdaemon.CancelStressRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelStressRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelStressRequest(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 pb.Chaosdaemon.CancelStressRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyIOChaosRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ApplyIOChaosRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string actions = 1; + * @return The actions. + */ + java.lang.String getActions(); + /** + * string actions = 1; + * @return The bytes for actions. + */ + com.google.protobuf.ByteString + getActionsBytes(); + + /** + * string volume = 2; + * @return The volume. + */ + java.lang.String getVolume(); + /** + * string volume = 2; + * @return The bytes for volume. + */ + com.google.protobuf.ByteString + getVolumeBytes(); + + /** + * string container_id = 3; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 3; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * int64 instance = 4; + * @return The instance. + */ + long getInstance(); + + /** + * int64 startTime = 5; + * @return The startTime. + */ + long getStartTime(); + + /** + * bool enterNS = 6; + * @return The enterNS. + */ + boolean getEnterNS(); + + /** + * string instance_uid = 7; + * @return The instanceUid. + */ + java.lang.String getInstanceUid(); + /** + * string instance_uid = 7; + * @return The bytes for instanceUid. + */ + com.google.protobuf.ByteString + getInstanceUidBytes(); + } + /** + * Protobuf type {@code pb.ApplyIOChaosRequest} + */ + public static final class ApplyIOChaosRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ApplyIOChaosRequest) + ApplyIOChaosRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyIOChaosRequest.newBuilder() to construct. + private ApplyIOChaosRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyIOChaosRequest() { + actions_ = ""; + volume_ = ""; + containerId_ = ""; + instanceUid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApplyIOChaosRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyIOChaosRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + actions_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + volume_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 32: { + + instance_ = input.readInt64(); + break; + } + case 40: { + + startTime_ = input.readInt64(); + break; + } + case 48: { + + enterNS_ = input.readBool(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + instanceUid_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ApplyIOChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyIOChaosRequest.class, pb.Chaosdaemon.ApplyIOChaosRequest.Builder.class); + } + + public static final int ACTIONS_FIELD_NUMBER = 1; + private volatile java.lang.Object actions_; + /** + * string actions = 1; + * @return The actions. + */ + @java.lang.Override + public java.lang.String getActions() { + java.lang.Object ref = actions_; + 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(); + actions_ = s; + return s; + } + } + /** + * string actions = 1; + * @return The bytes for actions. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getActionsBytes() { + java.lang.Object ref = actions_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOLUME_FIELD_NUMBER = 2; + private volatile java.lang.Object volume_; + /** + * string volume = 2; + * @return The volume. + */ + @java.lang.Override + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + 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(); + volume_ = s; + return s; + } + } + /** + * string volume = 2; + * @return The bytes for volume. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object containerId_; + /** + * string container_id = 3; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 3; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 4; + private long instance_; + /** + * int64 instance = 4; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + + public static final int STARTTIME_FIELD_NUMBER = 5; + private long startTime_; + /** + * int64 startTime = 5; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + + public static final int ENTERNS_FIELD_NUMBER = 6; + private boolean enterNS_; + /** + * bool enterNS = 6; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + public static final int INSTANCE_UID_FIELD_NUMBER = 7; + private volatile java.lang.Object instanceUid_; + /** + * string instance_uid = 7; + * @return The instanceUid. + */ + @java.lang.Override + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + 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(); + instanceUid_ = s; + return s; + } + } + /** + * string instance_uid = 7; + * @return The bytes for instanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actions_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, actions_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, volume_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, containerId_); + } + if (instance_ != 0L) { + output.writeInt64(4, instance_); + } + if (startTime_ != 0L) { + output.writeInt64(5, startTime_); + } + if (enterNS_ != false) { + output.writeBool(6, enterNS_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, instanceUid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actions_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, actions_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, volume_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerId_); + } + if (instance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, instance_); + } + if (startTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, startTime_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, enterNS_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, instanceUid_); + } + 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 pb.Chaosdaemon.ApplyIOChaosRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.ApplyIOChaosRequest other = (pb.Chaosdaemon.ApplyIOChaosRequest) obj; + + if (!getActions() + .equals(other.getActions())) return false; + if (!getVolume() + .equals(other.getVolume())) return false; + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (getInstance() + != other.getInstance()) return false; + if (getStartTime() + != other.getStartTime()) return false; + if (getEnterNS() + != other.getEnterNS()) return false; + if (!getInstanceUid() + .equals(other.getInstanceUid())) 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) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActions().hashCode(); + hash = (37 * hash) + VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getVolume().hashCode(); + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInstance()); + hash = (37 * hash) + STARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTime()); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (37 * hash) + INSTANCE_UID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceUid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest 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 pb.Chaosdaemon.ApplyIOChaosRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest 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 pb.Chaosdaemon.ApplyIOChaosRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyIOChaosRequest 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(pb.Chaosdaemon.ApplyIOChaosRequest 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; + } + /** + * Protobuf type {@code pb.ApplyIOChaosRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ApplyIOChaosRequest) + pb.Chaosdaemon.ApplyIOChaosRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyIOChaosRequest.class, pb.Chaosdaemon.ApplyIOChaosRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.ApplyIOChaosRequest.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(); + actions_ = ""; + + volume_ = ""; + + containerId_ = ""; + + instance_ = 0L; + + startTime_ = 0L; + + enterNS_ = false; + + instanceUid_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyIOChaosRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.ApplyIOChaosRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyIOChaosRequest build() { + pb.Chaosdaemon.ApplyIOChaosRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyIOChaosRequest buildPartial() { + pb.Chaosdaemon.ApplyIOChaosRequest result = new pb.Chaosdaemon.ApplyIOChaosRequest(this); + result.actions_ = actions_; + result.volume_ = volume_; + result.containerId_ = containerId_; + result.instance_ = instance_; + result.startTime_ = startTime_; + result.enterNS_ = enterNS_; + result.instanceUid_ = instanceUid_; + 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 pb.Chaosdaemon.ApplyIOChaosRequest) { + return mergeFrom((pb.Chaosdaemon.ApplyIOChaosRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ApplyIOChaosRequest other) { + if (other == pb.Chaosdaemon.ApplyIOChaosRequest.getDefaultInstance()) return this; + if (!other.getActions().isEmpty()) { + actions_ = other.actions_; + onChanged(); + } + if (!other.getVolume().isEmpty()) { + volume_ = other.volume_; + onChanged(); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.getInstance() != 0L) { + setInstance(other.getInstance()); + } + if (other.getStartTime() != 0L) { + setStartTime(other.getStartTime()); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + if (!other.getInstanceUid().isEmpty()) { + instanceUid_ = other.instanceUid_; + 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 { + pb.Chaosdaemon.ApplyIOChaosRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ApplyIOChaosRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object actions_ = ""; + /** + * string actions = 1; + * @return The actions. + */ + public java.lang.String getActions() { + java.lang.Object ref = actions_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actions_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string actions = 1; + * @return The bytes for actions. + */ + public com.google.protobuf.ByteString + getActionsBytes() { + java.lang.Object ref = actions_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string actions = 1; + * @param value The actions to set. + * @return This builder for chaining. + */ + public Builder setActions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + actions_ = value; + onChanged(); + return this; + } + /** + * string actions = 1; + * @return This builder for chaining. + */ + public Builder clearActions() { + + actions_ = getDefaultInstance().getActions(); + onChanged(); + return this; + } + /** + * string actions = 1; + * @param value The bytes for actions to set. + * @return This builder for chaining. + */ + public Builder setActionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + actions_ = value; + onChanged(); + return this; + } + + private java.lang.Object volume_ = ""; + /** + * string volume = 2; + * @return The volume. + */ + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string volume = 2; + * @return The bytes for volume. + */ + public com.google.protobuf.ByteString + getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string volume = 2; + * @param value The volume to set. + * @return This builder for chaining. + */ + public Builder setVolume( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + volume_ = value; + onChanged(); + return this; + } + /** + * string volume = 2; + * @return This builder for chaining. + */ + public Builder clearVolume() { + + volume_ = getDefaultInstance().getVolume(); + onChanged(); + return this; + } + /** + * string volume = 2; + * @param value The bytes for volume to set. + * @return This builder for chaining. + */ + public Builder setVolumeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + volume_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 3; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 3; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 3; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 3; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 3; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private long instance_ ; + /** + * int64 instance = 4; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + /** + * int64 instance = 4; + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(long value) { + + instance_ = value; + onChanged(); + return this; + } + /** + * int64 instance = 4; + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = 0L; + onChanged(); + return this; + } + + private long startTime_ ; + /** + * int64 startTime = 5; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + /** + * int64 startTime = 5; + * @param value The startTime to set. + * @return This builder for chaining. + */ + public Builder setStartTime(long value) { + + startTime_ = value; + onChanged(); + return this; + } + /** + * int64 startTime = 5; + * @return This builder for chaining. + */ + public Builder clearStartTime() { + + startTime_ = 0L; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 6; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 6; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 6; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + onChanged(); + return this; + } + + private java.lang.Object instanceUid_ = ""; + /** + * string instance_uid = 7; + * @return The instanceUid. + */ + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string instance_uid = 7; + * @return The bytes for instanceUid. + */ + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string instance_uid = 7; + * @param value The instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceUid_ = value; + onChanged(); + return this; + } + /** + * string instance_uid = 7; + * @return This builder for chaining. + */ + public Builder clearInstanceUid() { + + instanceUid_ = getDefaultInstance().getInstanceUid(); + onChanged(); + return this; + } + /** + * string instance_uid = 7; + * @param value The bytes for instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceUid_ = 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:pb.ApplyIOChaosRequest) + } + + // @@protoc_insertion_point(class_scope:pb.ApplyIOChaosRequest) + private static final pb.Chaosdaemon.ApplyIOChaosRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ApplyIOChaosRequest(); + } + + public static pb.Chaosdaemon.ApplyIOChaosRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyIOChaosRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyIOChaosRequest(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 pb.Chaosdaemon.ApplyIOChaosRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyIOChaosResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ApplyIOChaosResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 instance = 1; + * @return The instance. + */ + long getInstance(); + + /** + * int64 startTime = 2; + * @return The startTime. + */ + long getStartTime(); + + /** + * string instance_uid = 3; + * @return The instanceUid. + */ + java.lang.String getInstanceUid(); + /** + * string instance_uid = 3; + * @return The bytes for instanceUid. + */ + com.google.protobuf.ByteString + getInstanceUidBytes(); + } + /** + * Protobuf type {@code pb.ApplyIOChaosResponse} + */ + public static final class ApplyIOChaosResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ApplyIOChaosResponse) + ApplyIOChaosResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyIOChaosResponse.newBuilder() to construct. + private ApplyIOChaosResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyIOChaosResponse() { + instanceUid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApplyIOChaosResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyIOChaosResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + instance_ = input.readInt64(); + break; + } + case 16: { + + startTime_ = input.readInt64(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + instanceUid_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ApplyIOChaosResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyIOChaosResponse.class, pb.Chaosdaemon.ApplyIOChaosResponse.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private long instance_; + /** + * int64 instance = 1; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + + public static final int STARTTIME_FIELD_NUMBER = 2; + private long startTime_; + /** + * int64 startTime = 2; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + + public static final int INSTANCE_UID_FIELD_NUMBER = 3; + private volatile java.lang.Object instanceUid_; + /** + * string instance_uid = 3; + * @return The instanceUid. + */ + @java.lang.Override + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + 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(); + instanceUid_ = s; + return s; + } + } + /** + * string instance_uid = 3; + * @return The bytes for instanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = 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 (instance_ != 0L) { + output.writeInt64(1, instance_); + } + if (startTime_ != 0L) { + output.writeInt64(2, startTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceUid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, instance_); + } + if (startTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, startTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceUid_); + } + 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 pb.Chaosdaemon.ApplyIOChaosResponse)) { + return super.equals(obj); + } + pb.Chaosdaemon.ApplyIOChaosResponse other = (pb.Chaosdaemon.ApplyIOChaosResponse) obj; + + if (getInstance() + != other.getInstance()) return false; + if (getStartTime() + != other.getStartTime()) return false; + if (!getInstanceUid() + .equals(other.getInstanceUid())) 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) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInstance()); + hash = (37 * hash) + STARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTime()); + hash = (37 * hash) + INSTANCE_UID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceUid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse 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 pb.Chaosdaemon.ApplyIOChaosResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse 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 pb.Chaosdaemon.ApplyIOChaosResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyIOChaosResponse 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(pb.Chaosdaemon.ApplyIOChaosResponse 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; + } + /** + * Protobuf type {@code pb.ApplyIOChaosResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ApplyIOChaosResponse) + pb.Chaosdaemon.ApplyIOChaosResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyIOChaosResponse.class, pb.Chaosdaemon.ApplyIOChaosResponse.Builder.class); + } + + // Construct using pb.Chaosdaemon.ApplyIOChaosResponse.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(); + instance_ = 0L; + + startTime_ = 0L; + + instanceUid_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ApplyIOChaosResponse_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyIOChaosResponse getDefaultInstanceForType() { + return pb.Chaosdaemon.ApplyIOChaosResponse.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyIOChaosResponse build() { + pb.Chaosdaemon.ApplyIOChaosResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyIOChaosResponse buildPartial() { + pb.Chaosdaemon.ApplyIOChaosResponse result = new pb.Chaosdaemon.ApplyIOChaosResponse(this); + result.instance_ = instance_; + result.startTime_ = startTime_; + result.instanceUid_ = instanceUid_; + 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 pb.Chaosdaemon.ApplyIOChaosResponse) { + return mergeFrom((pb.Chaosdaemon.ApplyIOChaosResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ApplyIOChaosResponse other) { + if (other == pb.Chaosdaemon.ApplyIOChaosResponse.getDefaultInstance()) return this; + if (other.getInstance() != 0L) { + setInstance(other.getInstance()); + } + if (other.getStartTime() != 0L) { + setStartTime(other.getStartTime()); + } + if (!other.getInstanceUid().isEmpty()) { + instanceUid_ = other.instanceUid_; + 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 { + pb.Chaosdaemon.ApplyIOChaosResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ApplyIOChaosResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long instance_ ; + /** + * int64 instance = 1; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + /** + * int64 instance = 1; + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(long value) { + + instance_ = value; + onChanged(); + return this; + } + /** + * int64 instance = 1; + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = 0L; + onChanged(); + return this; + } + + private long startTime_ ; + /** + * int64 startTime = 2; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + /** + * int64 startTime = 2; + * @param value The startTime to set. + * @return This builder for chaining. + */ + public Builder setStartTime(long value) { + + startTime_ = value; + onChanged(); + return this; + } + /** + * int64 startTime = 2; + * @return This builder for chaining. + */ + public Builder clearStartTime() { + + startTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object instanceUid_ = ""; + /** + * string instance_uid = 3; + * @return The instanceUid. + */ + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string instance_uid = 3; + * @return The bytes for instanceUid. + */ + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string instance_uid = 3; + * @param value The instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceUid_ = value; + onChanged(); + return this; + } + /** + * string instance_uid = 3; + * @return This builder for chaining. + */ + public Builder clearInstanceUid() { + + instanceUid_ = getDefaultInstance().getInstanceUid(); + onChanged(); + return this; + } + /** + * string instance_uid = 3; + * @param value The bytes for instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceUid_ = 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:pb.ApplyIOChaosResponse) + } + + // @@protoc_insertion_point(class_scope:pb.ApplyIOChaosResponse) + private static final pb.Chaosdaemon.ApplyIOChaosResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ApplyIOChaosResponse(); + } + + public static pb.Chaosdaemon.ApplyIOChaosResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyIOChaosResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyIOChaosResponse(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 pb.Chaosdaemon.ApplyIOChaosResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyHttpChaosRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ApplyHttpChaosRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string rules = 1; + * @return The rules. + */ + java.lang.String getRules(); + /** + * string rules = 1; + * @return The bytes for rules. + */ + com.google.protobuf.ByteString + getRulesBytes(); + + /** + * repeated uint32 proxy_ports = 2; + * @return A list containing the proxyPorts. + */ + java.util.List getProxyPortsList(); + /** + * repeated uint32 proxy_ports = 2; + * @return The count of proxyPorts. + */ + int getProxyPortsCount(); + /** + * repeated uint32 proxy_ports = 2; + * @param index The index of the element to return. + * @return The proxyPorts at the given index. + */ + int getProxyPorts(int index); + + /** + * string container_id = 3; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 3; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * int64 instance = 4; + * @return The instance. + */ + long getInstance(); + + /** + * int64 startTime = 5; + * @return The startTime. + */ + long getStartTime(); + + /** + * bool enterNS = 6; + * @return The enterNS. + */ + boolean getEnterNS(); + + /** + * string instance_uid = 7; + * @return The instanceUid. + */ + java.lang.String getInstanceUid(); + /** + * string instance_uid = 7; + * @return The bytes for instanceUid. + */ + com.google.protobuf.ByteString + getInstanceUidBytes(); + + /** + * string tls = 8; + * @return The tls. + */ + java.lang.String getTls(); + /** + * string tls = 8; + * @return The bytes for tls. + */ + com.google.protobuf.ByteString + getTlsBytes(); + } + /** + * Protobuf type {@code pb.ApplyHttpChaosRequest} + */ + public static final class ApplyHttpChaosRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ApplyHttpChaosRequest) + ApplyHttpChaosRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyHttpChaosRequest.newBuilder() to construct. + private ApplyHttpChaosRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyHttpChaosRequest() { + rules_ = ""; + proxyPorts_ = emptyIntList(); + containerId_ = ""; + instanceUid_ = ""; + tls_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApplyHttpChaosRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyHttpChaosRequest( + 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(); + + rules_ = s; + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + proxyPorts_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + proxyPorts_.addInt(input.readUInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + proxyPorts_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + proxyPorts_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 32: { + + instance_ = input.readInt64(); + break; + } + case 40: { + + startTime_ = input.readInt64(); + break; + } + case 48: { + + enterNS_ = input.readBool(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + instanceUid_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + tls_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + proxyPorts_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyHttpChaosRequest.class, pb.Chaosdaemon.ApplyHttpChaosRequest.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + private volatile java.lang.Object rules_; + /** + * string rules = 1; + * @return The rules. + */ + @java.lang.Override + public java.lang.String getRules() { + java.lang.Object ref = rules_; + 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(); + rules_ = s; + return s; + } + } + /** + * string rules = 1; + * @return The bytes for rules. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRulesBytes() { + java.lang.Object ref = rules_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rules_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROXY_PORTS_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.IntList proxyPorts_; + /** + * repeated uint32 proxy_ports = 2; + * @return A list containing the proxyPorts. + */ + @java.lang.Override + public java.util.List + getProxyPortsList() { + return proxyPorts_; + } + /** + * repeated uint32 proxy_ports = 2; + * @return The count of proxyPorts. + */ + public int getProxyPortsCount() { + return proxyPorts_.size(); + } + /** + * repeated uint32 proxy_ports = 2; + * @param index The index of the element to return. + * @return The proxyPorts at the given index. + */ + public int getProxyPorts(int index) { + return proxyPorts_.getInt(index); + } + private int proxyPortsMemoizedSerializedSize = -1; + + public static final int CONTAINER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object containerId_; + /** + * string container_id = 3; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 3; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 4; + private long instance_; + /** + * int64 instance = 4; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + + public static final int STARTTIME_FIELD_NUMBER = 5; + private long startTime_; + /** + * int64 startTime = 5; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + + public static final int ENTERNS_FIELD_NUMBER = 6; + private boolean enterNS_; + /** + * bool enterNS = 6; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + public static final int INSTANCE_UID_FIELD_NUMBER = 7; + private volatile java.lang.Object instanceUid_; + /** + * string instance_uid = 7; + * @return The instanceUid. + */ + @java.lang.Override + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + 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(); + instanceUid_ = s; + return s; + } + } + /** + * string instance_uid = 7; + * @return The bytes for instanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TLS_FIELD_NUMBER = 8; + private volatile java.lang.Object tls_; + /** + * string tls = 8; + * @return The tls. + */ + @java.lang.Override + public java.lang.String getTls() { + java.lang.Object ref = tls_; + 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(); + tls_ = s; + return s; + } + } + /** + * string tls = 8; + * @return The bytes for tls. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTlsBytes() { + java.lang.Object ref = tls_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tls_ = 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rules_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rules_); + } + if (getProxyPortsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(proxyPortsMemoizedSerializedSize); + } + for (int i = 0; i < proxyPorts_.size(); i++) { + output.writeUInt32NoTag(proxyPorts_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, containerId_); + } + if (instance_ != 0L) { + output.writeInt64(4, instance_); + } + if (startTime_ != 0L) { + output.writeInt64(5, startTime_); + } + if (enterNS_ != false) { + output.writeBool(6, enterNS_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, instanceUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tls_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tls_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rules_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rules_); + } + { + int dataSize = 0; + for (int i = 0; i < proxyPorts_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(proxyPorts_.getInt(i)); + } + size += dataSize; + if (!getProxyPortsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + proxyPortsMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerId_); + } + if (instance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, instance_); + } + if (startTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, startTime_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, enterNS_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, instanceUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tls_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, tls_); + } + 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 pb.Chaosdaemon.ApplyHttpChaosRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.ApplyHttpChaosRequest other = (pb.Chaosdaemon.ApplyHttpChaosRequest) obj; + + if (!getRules() + .equals(other.getRules())) return false; + if (!getProxyPortsList() + .equals(other.getProxyPortsList())) return false; + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (getInstance() + != other.getInstance()) return false; + if (getStartTime() + != other.getStartTime()) return false; + if (getEnterNS() + != other.getEnterNS()) return false; + if (!getInstanceUid() + .equals(other.getInstanceUid())) return false; + if (!getTls() + .equals(other.getTls())) 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) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRules().hashCode(); + if (getProxyPortsCount() > 0) { + hash = (37 * hash) + PROXY_PORTS_FIELD_NUMBER; + hash = (53 * hash) + getProxyPortsList().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInstance()); + hash = (37 * hash) + STARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTime()); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (37 * hash) + INSTANCE_UID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceUid().hashCode(); + hash = (37 * hash) + TLS_FIELD_NUMBER; + hash = (53 * hash) + getTls().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest 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 pb.Chaosdaemon.ApplyHttpChaosRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest 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 pb.Chaosdaemon.ApplyHttpChaosRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyHttpChaosRequest 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(pb.Chaosdaemon.ApplyHttpChaosRequest 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; + } + /** + * Protobuf type {@code pb.ApplyHttpChaosRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ApplyHttpChaosRequest) + pb.Chaosdaemon.ApplyHttpChaosRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyHttpChaosRequest.class, pb.Chaosdaemon.ApplyHttpChaosRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.ApplyHttpChaosRequest.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(); + rules_ = ""; + + proxyPorts_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + containerId_ = ""; + + instance_ = 0L; + + startTime_ = 0L; + + enterNS_ = false; + + instanceUid_ = ""; + + tls_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyHttpChaosRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.ApplyHttpChaosRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyHttpChaosRequest build() { + pb.Chaosdaemon.ApplyHttpChaosRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyHttpChaosRequest buildPartial() { + pb.Chaosdaemon.ApplyHttpChaosRequest result = new pb.Chaosdaemon.ApplyHttpChaosRequest(this); + int from_bitField0_ = bitField0_; + result.rules_ = rules_; + if (((bitField0_ & 0x00000001) != 0)) { + proxyPorts_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.proxyPorts_ = proxyPorts_; + result.containerId_ = containerId_; + result.instance_ = instance_; + result.startTime_ = startTime_; + result.enterNS_ = enterNS_; + result.instanceUid_ = instanceUid_; + result.tls_ = tls_; + 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 pb.Chaosdaemon.ApplyHttpChaosRequest) { + return mergeFrom((pb.Chaosdaemon.ApplyHttpChaosRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ApplyHttpChaosRequest other) { + if (other == pb.Chaosdaemon.ApplyHttpChaosRequest.getDefaultInstance()) return this; + if (!other.getRules().isEmpty()) { + rules_ = other.rules_; + onChanged(); + } + if (!other.proxyPorts_.isEmpty()) { + if (proxyPorts_.isEmpty()) { + proxyPorts_ = other.proxyPorts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProxyPortsIsMutable(); + proxyPorts_.addAll(other.proxyPorts_); + } + onChanged(); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.getInstance() != 0L) { + setInstance(other.getInstance()); + } + if (other.getStartTime() != 0L) { + setStartTime(other.getStartTime()); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + if (!other.getInstanceUid().isEmpty()) { + instanceUid_ = other.instanceUid_; + onChanged(); + } + if (!other.getTls().isEmpty()) { + tls_ = other.tls_; + 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 { + pb.Chaosdaemon.ApplyHttpChaosRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ApplyHttpChaosRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object rules_ = ""; + /** + * string rules = 1; + * @return The rules. + */ + public java.lang.String getRules() { + java.lang.Object ref = rules_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rules_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string rules = 1; + * @return The bytes for rules. + */ + public com.google.protobuf.ByteString + getRulesBytes() { + java.lang.Object ref = rules_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rules_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string rules = 1; + * @param value The rules to set. + * @return This builder for chaining. + */ + public Builder setRules( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rules_ = value; + onChanged(); + return this; + } + /** + * string rules = 1; + * @return This builder for chaining. + */ + public Builder clearRules() { + + rules_ = getDefaultInstance().getRules(); + onChanged(); + return this; + } + /** + * string rules = 1; + * @param value The bytes for rules to set. + * @return This builder for chaining. + */ + public Builder setRulesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rules_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList proxyPorts_ = emptyIntList(); + private void ensureProxyPortsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + proxyPorts_ = mutableCopy(proxyPorts_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated uint32 proxy_ports = 2; + * @return A list containing the proxyPorts. + */ + public java.util.List + getProxyPortsList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(proxyPorts_) : proxyPorts_; + } + /** + * repeated uint32 proxy_ports = 2; + * @return The count of proxyPorts. + */ + public int getProxyPortsCount() { + return proxyPorts_.size(); + } + /** + * repeated uint32 proxy_ports = 2; + * @param index The index of the element to return. + * @return The proxyPorts at the given index. + */ + public int getProxyPorts(int index) { + return proxyPorts_.getInt(index); + } + /** + * repeated uint32 proxy_ports = 2; + * @param index The index to set the value at. + * @param value The proxyPorts to set. + * @return This builder for chaining. + */ + public Builder setProxyPorts( + int index, int value) { + ensureProxyPortsIsMutable(); + proxyPorts_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 proxy_ports = 2; + * @param value The proxyPorts to add. + * @return This builder for chaining. + */ + public Builder addProxyPorts(int value) { + ensureProxyPortsIsMutable(); + proxyPorts_.addInt(value); + onChanged(); + return this; + } + /** + * repeated uint32 proxy_ports = 2; + * @param values The proxyPorts to add. + * @return This builder for chaining. + */ + public Builder addAllProxyPorts( + java.lang.Iterable values) { + ensureProxyPortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, proxyPorts_); + onChanged(); + return this; + } + /** + * repeated uint32 proxy_ports = 2; + * @return This builder for chaining. + */ + public Builder clearProxyPorts() { + proxyPorts_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 3; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 3; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 3; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 3; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 3; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private long instance_ ; + /** + * int64 instance = 4; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + /** + * int64 instance = 4; + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(long value) { + + instance_ = value; + onChanged(); + return this; + } + /** + * int64 instance = 4; + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = 0L; + onChanged(); + return this; + } + + private long startTime_ ; + /** + * int64 startTime = 5; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + /** + * int64 startTime = 5; + * @param value The startTime to set. + * @return This builder for chaining. + */ + public Builder setStartTime(long value) { + + startTime_ = value; + onChanged(); + return this; + } + /** + * int64 startTime = 5; + * @return This builder for chaining. + */ + public Builder clearStartTime() { + + startTime_ = 0L; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 6; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 6; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 6; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + onChanged(); + return this; + } + + private java.lang.Object instanceUid_ = ""; + /** + * string instance_uid = 7; + * @return The instanceUid. + */ + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string instance_uid = 7; + * @return The bytes for instanceUid. + */ + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string instance_uid = 7; + * @param value The instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceUid_ = value; + onChanged(); + return this; + } + /** + * string instance_uid = 7; + * @return This builder for chaining. + */ + public Builder clearInstanceUid() { + + instanceUid_ = getDefaultInstance().getInstanceUid(); + onChanged(); + return this; + } + /** + * string instance_uid = 7; + * @param value The bytes for instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object tls_ = ""; + /** + * string tls = 8; + * @return The tls. + */ + public java.lang.String getTls() { + java.lang.Object ref = tls_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tls_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string tls = 8; + * @return The bytes for tls. + */ + public com.google.protobuf.ByteString + getTlsBytes() { + java.lang.Object ref = tls_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tls_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string tls = 8; + * @param value The tls to set. + * @return This builder for chaining. + */ + public Builder setTls( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tls_ = value; + onChanged(); + return this; + } + /** + * string tls = 8; + * @return This builder for chaining. + */ + public Builder clearTls() { + + tls_ = getDefaultInstance().getTls(); + onChanged(); + return this; + } + /** + * string tls = 8; + * @param value The bytes for tls to set. + * @return This builder for chaining. + */ + public Builder setTlsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tls_ = 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:pb.ApplyHttpChaosRequest) + } + + // @@protoc_insertion_point(class_scope:pb.ApplyHttpChaosRequest) + private static final pb.Chaosdaemon.ApplyHttpChaosRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ApplyHttpChaosRequest(); + } + + public static pb.Chaosdaemon.ApplyHttpChaosRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyHttpChaosRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyHttpChaosRequest(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 pb.Chaosdaemon.ApplyHttpChaosRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyHttpChaosResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ApplyHttpChaosResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 instance = 1; + * @return The instance. + */ + long getInstance(); + + /** + * int64 startTime = 2; + * @return The startTime. + */ + long getStartTime(); + + /** + * int32 statusCode = 3; + * @return The statusCode. + */ + int getStatusCode(); + + /** + * string error = 4; + * @return The error. + */ + java.lang.String getError(); + /** + * string error = 4; + * @return The bytes for error. + */ + com.google.protobuf.ByteString + getErrorBytes(); + + /** + * string instance_uid = 5; + * @return The instanceUid. + */ + java.lang.String getInstanceUid(); + /** + * string instance_uid = 5; + * @return The bytes for instanceUid. + */ + com.google.protobuf.ByteString + getInstanceUidBytes(); + } + /** + * Protobuf type {@code pb.ApplyHttpChaosResponse} + */ + public static final class ApplyHttpChaosResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ApplyHttpChaosResponse) + ApplyHttpChaosResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyHttpChaosResponse.newBuilder() to construct. + private ApplyHttpChaosResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyHttpChaosResponse() { + error_ = ""; + instanceUid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApplyHttpChaosResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyHttpChaosResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + instance_ = input.readInt64(); + break; + } + case 16: { + + startTime_ = input.readInt64(); + break; + } + case 24: { + + statusCode_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + error_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + instanceUid_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyHttpChaosResponse.class, pb.Chaosdaemon.ApplyHttpChaosResponse.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private long instance_; + /** + * int64 instance = 1; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + + public static final int STARTTIME_FIELD_NUMBER = 2; + private long startTime_; + /** + * int64 startTime = 2; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + + public static final int STATUSCODE_FIELD_NUMBER = 3; + private int statusCode_; + /** + * int32 statusCode = 3; + * @return The statusCode. + */ + @java.lang.Override + public int getStatusCode() { + return statusCode_; + } + + public static final int ERROR_FIELD_NUMBER = 4; + private volatile java.lang.Object error_; + /** + * string error = 4; + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = error_; + 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(); + error_ = s; + return s; + } + } + /** + * string error = 4; + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_UID_FIELD_NUMBER = 5; + private volatile java.lang.Object instanceUid_; + /** + * string instance_uid = 5; + * @return The instanceUid. + */ + @java.lang.Override + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + 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(); + instanceUid_ = s; + return s; + } + } + /** + * string instance_uid = 5; + * @return The bytes for instanceUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = 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 (instance_ != 0L) { + output.writeInt64(1, instance_); + } + if (startTime_ != 0L) { + output.writeInt64(2, startTime_); + } + if (statusCode_ != 0) { + output.writeInt32(3, statusCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, error_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, instanceUid_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, instance_); + } + if (startTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, startTime_); + } + if (statusCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, statusCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, error_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, instanceUid_); + } + 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 pb.Chaosdaemon.ApplyHttpChaosResponse)) { + return super.equals(obj); + } + pb.Chaosdaemon.ApplyHttpChaosResponse other = (pb.Chaosdaemon.ApplyHttpChaosResponse) obj; + + if (getInstance() + != other.getInstance()) return false; + if (getStartTime() + != other.getStartTime()) return false; + if (getStatusCode() + != other.getStatusCode()) return false; + if (!getError() + .equals(other.getError())) return false; + if (!getInstanceUid() + .equals(other.getInstanceUid())) 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) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInstance()); + hash = (37 * hash) + STARTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTime()); + hash = (37 * hash) + STATUSCODE_FIELD_NUMBER; + hash = (53 * hash) + getStatusCode(); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (37 * hash) + INSTANCE_UID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceUid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse 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 pb.Chaosdaemon.ApplyHttpChaosResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse 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 pb.Chaosdaemon.ApplyHttpChaosResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyHttpChaosResponse 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(pb.Chaosdaemon.ApplyHttpChaosResponse 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; + } + /** + * Protobuf type {@code pb.ApplyHttpChaosResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ApplyHttpChaosResponse) + pb.Chaosdaemon.ApplyHttpChaosResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyHttpChaosResponse.class, pb.Chaosdaemon.ApplyHttpChaosResponse.Builder.class); + } + + // Construct using pb.Chaosdaemon.ApplyHttpChaosResponse.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(); + instance_ = 0L; + + startTime_ = 0L; + + statusCode_ = 0; + + error_ = ""; + + instanceUid_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ApplyHttpChaosResponse_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyHttpChaosResponse getDefaultInstanceForType() { + return pb.Chaosdaemon.ApplyHttpChaosResponse.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyHttpChaosResponse build() { + pb.Chaosdaemon.ApplyHttpChaosResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyHttpChaosResponse buildPartial() { + pb.Chaosdaemon.ApplyHttpChaosResponse result = new pb.Chaosdaemon.ApplyHttpChaosResponse(this); + result.instance_ = instance_; + result.startTime_ = startTime_; + result.statusCode_ = statusCode_; + result.error_ = error_; + result.instanceUid_ = instanceUid_; + 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 pb.Chaosdaemon.ApplyHttpChaosResponse) { + return mergeFrom((pb.Chaosdaemon.ApplyHttpChaosResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ApplyHttpChaosResponse other) { + if (other == pb.Chaosdaemon.ApplyHttpChaosResponse.getDefaultInstance()) return this; + if (other.getInstance() != 0L) { + setInstance(other.getInstance()); + } + if (other.getStartTime() != 0L) { + setStartTime(other.getStartTime()); + } + if (other.getStatusCode() != 0) { + setStatusCode(other.getStatusCode()); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + onChanged(); + } + if (!other.getInstanceUid().isEmpty()) { + instanceUid_ = other.instanceUid_; + 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 { + pb.Chaosdaemon.ApplyHttpChaosResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ApplyHttpChaosResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long instance_ ; + /** + * int64 instance = 1; + * @return The instance. + */ + @java.lang.Override + public long getInstance() { + return instance_; + } + /** + * int64 instance = 1; + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(long value) { + + instance_ = value; + onChanged(); + return this; + } + /** + * int64 instance = 1; + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = 0L; + onChanged(); + return this; + } + + private long startTime_ ; + /** + * int64 startTime = 2; + * @return The startTime. + */ + @java.lang.Override + public long getStartTime() { + return startTime_; + } + /** + * int64 startTime = 2; + * @param value The startTime to set. + * @return This builder for chaining. + */ + public Builder setStartTime(long value) { + + startTime_ = value; + onChanged(); + return this; + } + /** + * int64 startTime = 2; + * @return This builder for chaining. + */ + public Builder clearStartTime() { + + startTime_ = 0L; + onChanged(); + return this; + } + + private int statusCode_ ; + /** + * int32 statusCode = 3; + * @return The statusCode. + */ + @java.lang.Override + public int getStatusCode() { + return statusCode_; + } + /** + * int32 statusCode = 3; + * @param value The statusCode to set. + * @return This builder for chaining. + */ + public Builder setStatusCode(int value) { + + statusCode_ = value; + onChanged(); + return this; + } + /** + * int32 statusCode = 3; + * @return This builder for chaining. + */ + public Builder clearStatusCode() { + + statusCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + * string error = 4; + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string error = 4; + * @return The bytes for error. + */ + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string error = 4; + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + error_ = value; + onChanged(); + return this; + } + /** + * string error = 4; + * @return This builder for chaining. + */ + public Builder clearError() { + + error_ = getDefaultInstance().getError(); + onChanged(); + return this; + } + /** + * string error = 4; + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + error_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceUid_ = ""; + /** + * string instance_uid = 5; + * @return The instanceUid. + */ + public java.lang.String getInstanceUid() { + java.lang.Object ref = instanceUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string instance_uid = 5; + * @return The bytes for instanceUid. + */ + public com.google.protobuf.ByteString + getInstanceUidBytes() { + java.lang.Object ref = instanceUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instanceUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string instance_uid = 5; + * @param value The instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceUid_ = value; + onChanged(); + return this; + } + /** + * string instance_uid = 5; + * @return This builder for chaining. + */ + public Builder clearInstanceUid() { + + instanceUid_ = getDefaultInstance().getInstanceUid(); + onChanged(); + return this; + } + /** + * string instance_uid = 5; + * @param value The bytes for instanceUid to set. + * @return This builder for chaining. + */ + public Builder setInstanceUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceUid_ = 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:pb.ApplyHttpChaosResponse) + } + + // @@protoc_insertion_point(class_scope:pb.ApplyHttpChaosResponse) + private static final pb.Chaosdaemon.ApplyHttpChaosResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ApplyHttpChaosResponse(); + } + + public static pb.Chaosdaemon.ApplyHttpChaosResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyHttpChaosResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyHttpChaosResponse(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 pb.Chaosdaemon.ApplyHttpChaosResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TcsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.TcsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .pb.Tc tcs = 1; + */ + java.util.List + getTcsList(); + /** + * repeated .pb.Tc tcs = 1; + */ + pb.Chaosdaemon.Tc getTcs(int index); + /** + * repeated .pb.Tc tcs = 1; + */ + int getTcsCount(); + /** + * repeated .pb.Tc tcs = 1; + */ + java.util.List + getTcsOrBuilderList(); + /** + * repeated .pb.Tc tcs = 1; + */ + pb.Chaosdaemon.TcOrBuilder getTcsOrBuilder( + int index); + + /** + * string container_id = 2; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * bool enterNS = 4; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.TcsRequest} + */ + public static final class TcsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.TcsRequest) + TcsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TcsRequest.newBuilder() to construct. + private TcsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TcsRequest() { + tcs_ = java.util.Collections.emptyList(); + containerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TcsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TcsRequest( + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tcs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tcs_.add( + input.readMessage(pb.Chaosdaemon.Tc.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 32: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tcs_ = java.util.Collections.unmodifiableList(tcs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TcsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcsRequest.class, pb.Chaosdaemon.TcsRequest.Builder.class); + } + + public static final int TCS_FIELD_NUMBER = 1; + private java.util.List tcs_; + /** + * repeated .pb.Tc tcs = 1; + */ + @java.lang.Override + public java.util.List getTcsList() { + return tcs_; + } + /** + * repeated .pb.Tc tcs = 1; + */ + @java.lang.Override + public java.util.List + getTcsOrBuilderList() { + return tcs_; + } + /** + * repeated .pb.Tc tcs = 1; + */ + @java.lang.Override + public int getTcsCount() { + return tcs_.size(); + } + /** + * repeated .pb.Tc tcs = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.Tc getTcs(int index) { + return tcs_.get(index); + } + /** + * repeated .pb.Tc tcs = 1; + */ + @java.lang.Override + public pb.Chaosdaemon.TcOrBuilder getTcsOrBuilder( + int index) { + return tcs_.get(index); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object containerId_; + /** + * string container_id = 2; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTERNS_FIELD_NUMBER = 4; + private boolean enterNS_; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 < tcs_.size(); i++) { + output.writeMessage(1, tcs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerId_); + } + if (enterNS_ != false) { + output.writeBool(4, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tcs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tcs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerId_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, enterNS_); + } + 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 pb.Chaosdaemon.TcsRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.TcsRequest other = (pb.Chaosdaemon.TcsRequest) obj; + + if (!getTcsList() + .equals(other.getTcsList())) return false; + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (getEnterNS() + != other.getEnterNS()) 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 (getTcsCount() > 0) { + hash = (37 * hash) + TCS_FIELD_NUMBER; + hash = (53 * hash) + getTcsList().hashCode(); + } + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.TcsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.TcsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.TcsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcsRequest 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 pb.Chaosdaemon.TcsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcsRequest 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 pb.Chaosdaemon.TcsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.TcsRequest 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(pb.Chaosdaemon.TcsRequest 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; + } + /** + * Protobuf type {@code pb.TcsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.TcsRequest) + pb.Chaosdaemon.TcsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_TcsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_TcsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.TcsRequest.class, pb.Chaosdaemon.TcsRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.TcsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTcsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tcsBuilder_ == null) { + tcs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tcsBuilder_.clear(); + } + containerId_ = ""; + + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_TcsRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.TcsRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.TcsRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.TcsRequest build() { + pb.Chaosdaemon.TcsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.TcsRequest buildPartial() { + pb.Chaosdaemon.TcsRequest result = new pb.Chaosdaemon.TcsRequest(this); + int from_bitField0_ = bitField0_; + if (tcsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tcs_ = java.util.Collections.unmodifiableList(tcs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tcs_ = tcs_; + } else { + result.tcs_ = tcsBuilder_.build(); + } + result.containerId_ = containerId_; + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.TcsRequest) { + return mergeFrom((pb.Chaosdaemon.TcsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.TcsRequest other) { + if (other == pb.Chaosdaemon.TcsRequest.getDefaultInstance()) return this; + if (tcsBuilder_ == null) { + if (!other.tcs_.isEmpty()) { + if (tcs_.isEmpty()) { + tcs_ = other.tcs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTcsIsMutable(); + tcs_.addAll(other.tcs_); + } + onChanged(); + } + } else { + if (!other.tcs_.isEmpty()) { + if (tcsBuilder_.isEmpty()) { + tcsBuilder_.dispose(); + tcsBuilder_ = null; + tcs_ = other.tcs_; + bitField0_ = (bitField0_ & ~0x00000001); + tcsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTcsFieldBuilder() : null; + } else { + tcsBuilder_.addAllMessages(other.tcs_); + } + } + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.TcsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.TcsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List tcs_ = + java.util.Collections.emptyList(); + private void ensureTcsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tcs_ = new java.util.ArrayList(tcs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.Tc, pb.Chaosdaemon.Tc.Builder, pb.Chaosdaemon.TcOrBuilder> tcsBuilder_; + + /** + * repeated .pb.Tc tcs = 1; + */ + public java.util.List getTcsList() { + if (tcsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tcs_); + } else { + return tcsBuilder_.getMessageList(); + } + } + /** + * repeated .pb.Tc tcs = 1; + */ + public int getTcsCount() { + if (tcsBuilder_ == null) { + return tcs_.size(); + } else { + return tcsBuilder_.getCount(); + } + } + /** + * repeated .pb.Tc tcs = 1; + */ + public pb.Chaosdaemon.Tc getTcs(int index) { + if (tcsBuilder_ == null) { + return tcs_.get(index); + } else { + return tcsBuilder_.getMessage(index); + } + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder setTcs( + int index, pb.Chaosdaemon.Tc value) { + if (tcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTcsIsMutable(); + tcs_.set(index, value); + onChanged(); + } else { + tcsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder setTcs( + int index, pb.Chaosdaemon.Tc.Builder builderForValue) { + if (tcsBuilder_ == null) { + ensureTcsIsMutable(); + tcs_.set(index, builderForValue.build()); + onChanged(); + } else { + tcsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder addTcs(pb.Chaosdaemon.Tc value) { + if (tcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTcsIsMutable(); + tcs_.add(value); + onChanged(); + } else { + tcsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder addTcs( + int index, pb.Chaosdaemon.Tc value) { + if (tcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTcsIsMutable(); + tcs_.add(index, value); + onChanged(); + } else { + tcsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder addTcs( + pb.Chaosdaemon.Tc.Builder builderForValue) { + if (tcsBuilder_ == null) { + ensureTcsIsMutable(); + tcs_.add(builderForValue.build()); + onChanged(); + } else { + tcsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder addTcs( + int index, pb.Chaosdaemon.Tc.Builder builderForValue) { + if (tcsBuilder_ == null) { + ensureTcsIsMutable(); + tcs_.add(index, builderForValue.build()); + onChanged(); + } else { + tcsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder addAllTcs( + java.lang.Iterable values) { + if (tcsBuilder_ == null) { + ensureTcsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tcs_); + onChanged(); + } else { + tcsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder clearTcs() { + if (tcsBuilder_ == null) { + tcs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tcsBuilder_.clear(); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public Builder removeTcs(int index) { + if (tcsBuilder_ == null) { + ensureTcsIsMutable(); + tcs_.remove(index); + onChanged(); + } else { + tcsBuilder_.remove(index); + } + return this; + } + /** + * repeated .pb.Tc tcs = 1; + */ + public pb.Chaosdaemon.Tc.Builder getTcsBuilder( + int index) { + return getTcsFieldBuilder().getBuilder(index); + } + /** + * repeated .pb.Tc tcs = 1; + */ + public pb.Chaosdaemon.TcOrBuilder getTcsOrBuilder( + int index) { + if (tcsBuilder_ == null) { + return tcs_.get(index); } else { + return tcsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .pb.Tc tcs = 1; + */ + public java.util.List + getTcsOrBuilderList() { + if (tcsBuilder_ != null) { + return tcsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tcs_); + } + } + /** + * repeated .pb.Tc tcs = 1; + */ + public pb.Chaosdaemon.Tc.Builder addTcsBuilder() { + return getTcsFieldBuilder().addBuilder( + pb.Chaosdaemon.Tc.getDefaultInstance()); + } + /** + * repeated .pb.Tc tcs = 1; + */ + public pb.Chaosdaemon.Tc.Builder addTcsBuilder( + int index) { + return getTcsFieldBuilder().addBuilder( + index, pb.Chaosdaemon.Tc.getDefaultInstance()); + } + /** + * repeated .pb.Tc tcs = 1; + */ + public java.util.List + getTcsBuilderList() { + return getTcsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.Tc, pb.Chaosdaemon.Tc.Builder, pb.Chaosdaemon.TcOrBuilder> + getTcsFieldBuilder() { + if (tcsBuilder_ == null) { + tcsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pb.Chaosdaemon.Tc, pb.Chaosdaemon.Tc.Builder, pb.Chaosdaemon.TcOrBuilder>( + tcs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + tcs_ = null; + } + return tcsBuilder_; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 2; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 2; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 2; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 2; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 2; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 4; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 4; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.TcsRequest) + } + + // @@protoc_insertion_point(class_scope:pb.TcsRequest) + private static final pb.Chaosdaemon.TcsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.TcsRequest(); + } + + public static pb.Chaosdaemon.TcsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TcsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TcsRequest(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 pb.Chaosdaemon.TcsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TcOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.Tc) + com.google.protobuf.MessageOrBuilder { + + /** + * .pb.Tc.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * .pb.Tc.Type type = 1; + * @return The type. + */ + pb.Chaosdaemon.Tc.Type getType(); + + /** + * .pb.Netem netem = 2; + * @return Whether the netem field is set. + */ + boolean hasNetem(); + /** + * .pb.Netem netem = 2; + * @return The netem. + */ + pb.Chaosdaemon.Netem getNetem(); + /** + * .pb.Netem netem = 2; + */ + pb.Chaosdaemon.NetemOrBuilder getNetemOrBuilder(); + + /** + * .pb.Tbf tbf = 3; + * @return Whether the tbf field is set. + */ + boolean hasTbf(); + /** + * .pb.Tbf tbf = 3; + * @return The tbf. + */ + pb.Chaosdaemon.Tbf getTbf(); + /** + * .pb.Tbf tbf = 3; + */ + pb.Chaosdaemon.TbfOrBuilder getTbfOrBuilder(); + + /** + * string ipset = 4; + * @return The ipset. + */ + java.lang.String getIpset(); + /** + * string ipset = 4; + * @return The bytes for ipset. + */ + com.google.protobuf.ByteString + getIpsetBytes(); + + /** + * string protocol = 5; + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * string protocol = 5; + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString + getProtocolBytes(); + + /** + * string source_port = 6; + * @return The sourcePort. + */ + java.lang.String getSourcePort(); + /** + * string source_port = 6; + * @return The bytes for sourcePort. + */ + com.google.protobuf.ByteString + getSourcePortBytes(); + + /** + * string egress_port = 7; + * @return The egressPort. + */ + java.lang.String getEgressPort(); + /** + * string egress_port = 7; + * @return The bytes for egressPort. + */ + com.google.protobuf.ByteString + getEgressPortBytes(); + + /** + * string device = 9; + * @return The device. + */ + java.lang.String getDevice(); + /** + * string device = 9; + * @return The bytes for device. + */ + com.google.protobuf.ByteString + getDeviceBytes(); + } + /** + * Protobuf type {@code pb.Tc} + */ + public static final class Tc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.Tc) + TcOrBuilder { + private static final long serialVersionUID = 0L; + // Use Tc.newBuilder() to construct. + private Tc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Tc() { + type_ = 0; + ipset_ = ""; + protocol_ = ""; + sourcePort_ = ""; + egressPort_ = ""; + device_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Tc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Tc( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + type_ = rawValue; + break; + } + case 18: { + pb.Chaosdaemon.Netem.Builder subBuilder = null; + if (netem_ != null) { + subBuilder = netem_.toBuilder(); + } + netem_ = input.readMessage(pb.Chaosdaemon.Netem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(netem_); + netem_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + pb.Chaosdaemon.Tbf.Builder subBuilder = null; + if (tbf_ != null) { + subBuilder = tbf_.toBuilder(); + } + tbf_ = input.readMessage(pb.Chaosdaemon.Tbf.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tbf_); + tbf_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + ipset_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + sourcePort_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + egressPort_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_Tc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Tc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Tc.class, pb.Chaosdaemon.Tc.Builder.class); + } + + /** + * Protobuf enum {@code pb.Tc.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NETEM = 0; + */ + NETEM(0), + /** + * BANDWIDTH = 1; + */ + BANDWIDTH(1), + UNRECOGNIZED(-1), + ; + + /** + * NETEM = 0; + */ + public static final int NETEM_VALUE = 0; + /** + * BANDWIDTH = 1; + */ + public static final int BANDWIDTH_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return NETEM; + case 1: return BANDWIDTH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 pb.Chaosdaemon.Tc.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pb.Tc.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * .pb.Tc.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + * .pb.Tc.Type type = 1; + * @return The type. + */ + @java.lang.Override public pb.Chaosdaemon.Tc.Type getType() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.Tc.Type result = pb.Chaosdaemon.Tc.Type.valueOf(type_); + return result == null ? pb.Chaosdaemon.Tc.Type.UNRECOGNIZED : result; + } + + public static final int NETEM_FIELD_NUMBER = 2; + private pb.Chaosdaemon.Netem netem_; + /** + * .pb.Netem netem = 2; + * @return Whether the netem field is set. + */ + @java.lang.Override + public boolean hasNetem() { + return netem_ != null; + } + /** + * .pb.Netem netem = 2; + * @return The netem. + */ + @java.lang.Override + public pb.Chaosdaemon.Netem getNetem() { + return netem_ == null ? pb.Chaosdaemon.Netem.getDefaultInstance() : netem_; + } + /** + * .pb.Netem netem = 2; + */ + @java.lang.Override + public pb.Chaosdaemon.NetemOrBuilder getNetemOrBuilder() { + return getNetem(); + } + + public static final int TBF_FIELD_NUMBER = 3; + private pb.Chaosdaemon.Tbf tbf_; + /** + * .pb.Tbf tbf = 3; + * @return Whether the tbf field is set. + */ + @java.lang.Override + public boolean hasTbf() { + return tbf_ != null; + } + /** + * .pb.Tbf tbf = 3; + * @return The tbf. + */ + @java.lang.Override + public pb.Chaosdaemon.Tbf getTbf() { + return tbf_ == null ? pb.Chaosdaemon.Tbf.getDefaultInstance() : tbf_; + } + /** + * .pb.Tbf tbf = 3; + */ + @java.lang.Override + public pb.Chaosdaemon.TbfOrBuilder getTbfOrBuilder() { + return getTbf(); + } + + public static final int IPSET_FIELD_NUMBER = 4; + private volatile java.lang.Object ipset_; + /** + * string ipset = 4; + * @return The ipset. + */ + @java.lang.Override + public java.lang.String getIpset() { + java.lang.Object ref = ipset_; + 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(); + ipset_ = s; + return s; + } + } + /** + * string ipset = 4; + * @return The bytes for ipset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIpsetBytes() { + java.lang.Object ref = ipset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ipset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + private volatile java.lang.Object protocol_; + /** + * string protocol = 5; + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + * string protocol = 5; + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PORT_FIELD_NUMBER = 6; + private volatile java.lang.Object sourcePort_; + /** + * string source_port = 6; + * @return The sourcePort. + */ + @java.lang.Override + public java.lang.String getSourcePort() { + java.lang.Object ref = sourcePort_; + 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(); + sourcePort_ = s; + return s; + } + } + /** + * string source_port = 6; + * @return The bytes for sourcePort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourcePortBytes() { + java.lang.Object ref = sourcePort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourcePort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EGRESS_PORT_FIELD_NUMBER = 7; + private volatile java.lang.Object egressPort_; + /** + * string egress_port = 7; + * @return The egressPort. + */ + @java.lang.Override + public java.lang.String getEgressPort() { + java.lang.Object ref = egressPort_; + 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(); + egressPort_ = s; + return s; + } + } + /** + * string egress_port = 7; + * @return The bytes for egressPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEgressPortBytes() { + java.lang.Object ref = egressPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + egressPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_FIELD_NUMBER = 9; + private volatile java.lang.Object device_; + /** + * string device = 9; + * @return The device. + */ + @java.lang.Override + public java.lang.String getDevice() { + java.lang.Object ref = device_; + 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(); + device_ = s; + return s; + } + } + /** + * string device = 9; + * @return The bytes for device. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceBytes() { + java.lang.Object ref = device_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + device_ = 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 (type_ != pb.Chaosdaemon.Tc.Type.NETEM.getNumber()) { + output.writeEnum(1, type_); + } + if (netem_ != null) { + output.writeMessage(2, getNetem()); + } + if (tbf_ != null) { + output.writeMessage(3, getTbf()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ipset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourcePort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(egressPort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, egressPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, device_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != pb.Chaosdaemon.Tc.Type.NETEM.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (netem_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNetem()); + } + if (tbf_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTbf()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ipset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourcePort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(egressPort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, egressPort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, device_); + } + 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 pb.Chaosdaemon.Tc)) { + return super.equals(obj); + } + pb.Chaosdaemon.Tc other = (pb.Chaosdaemon.Tc) obj; + + if (type_ != other.type_) return false; + if (hasNetem() != other.hasNetem()) return false; + if (hasNetem()) { + if (!getNetem() + .equals(other.getNetem())) return false; + } + if (hasTbf() != other.hasTbf()) return false; + if (hasTbf()) { + if (!getTbf() + .equals(other.getTbf())) return false; + } + if (!getIpset() + .equals(other.getIpset())) return false; + if (!getProtocol() + .equals(other.getProtocol())) return false; + if (!getSourcePort() + .equals(other.getSourcePort())) return false; + if (!getEgressPort() + .equals(other.getEgressPort())) return false; + if (!getDevice() + .equals(other.getDevice())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasNetem()) { + hash = (37 * hash) + NETEM_FIELD_NUMBER; + hash = (53 * hash) + getNetem().hashCode(); + } + if (hasTbf()) { + hash = (37 * hash) + TBF_FIELD_NUMBER; + hash = (53 * hash) + getTbf().hashCode(); + } + hash = (37 * hash) + IPSET_FIELD_NUMBER; + hash = (53 * hash) + getIpset().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSourcePort().hashCode(); + hash = (37 * hash) + EGRESS_PORT_FIELD_NUMBER; + hash = (53 * hash) + getEgressPort().hashCode(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.Tc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Tc parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Tc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Tc parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Tc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.Tc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.Tc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Tc 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 pb.Chaosdaemon.Tc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Tc 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 pb.Chaosdaemon.Tc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.Tc 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(pb.Chaosdaemon.Tc 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; + } + /** + * Protobuf type {@code pb.Tc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.Tc) + pb.Chaosdaemon.TcOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_Tc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_Tc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.Tc.class, pb.Chaosdaemon.Tc.Builder.class); + } + + // Construct using pb.Chaosdaemon.Tc.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(); + type_ = 0; + + if (netemBuilder_ == null) { + netem_ = null; + } else { + netem_ = null; + netemBuilder_ = null; + } + if (tbfBuilder_ == null) { + tbf_ = null; + } else { + tbf_ = null; + tbfBuilder_ = null; + } + ipset_ = ""; + + protocol_ = ""; + + sourcePort_ = ""; + + egressPort_ = ""; + + device_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_Tc_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.Tc getDefaultInstanceForType() { + return pb.Chaosdaemon.Tc.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.Tc build() { + pb.Chaosdaemon.Tc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.Tc buildPartial() { + pb.Chaosdaemon.Tc result = new pb.Chaosdaemon.Tc(this); + result.type_ = type_; + if (netemBuilder_ == null) { + result.netem_ = netem_; + } else { + result.netem_ = netemBuilder_.build(); + } + if (tbfBuilder_ == null) { + result.tbf_ = tbf_; + } else { + result.tbf_ = tbfBuilder_.build(); + } + result.ipset_ = ipset_; + result.protocol_ = protocol_; + result.sourcePort_ = sourcePort_; + result.egressPort_ = egressPort_; + result.device_ = device_; + 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 pb.Chaosdaemon.Tc) { + return mergeFrom((pb.Chaosdaemon.Tc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.Tc other) { + if (other == pb.Chaosdaemon.Tc.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasNetem()) { + mergeNetem(other.getNetem()); + } + if (other.hasTbf()) { + mergeTbf(other.getTbf()); + } + if (!other.getIpset().isEmpty()) { + ipset_ = other.ipset_; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (!other.getSourcePort().isEmpty()) { + sourcePort_ = other.sourcePort_; + onChanged(); + } + if (!other.getEgressPort().isEmpty()) { + egressPort_ = other.egressPort_; + onChanged(); + } + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + 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 { + pb.Chaosdaemon.Tc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.Tc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * .pb.Tc.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + * .pb.Tc.Type type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * .pb.Tc.Type type = 1; + * @return The type. + */ + @java.lang.Override + public pb.Chaosdaemon.Tc.Type getType() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.Tc.Type result = pb.Chaosdaemon.Tc.Type.valueOf(type_); + return result == null ? pb.Chaosdaemon.Tc.Type.UNRECOGNIZED : result; + } + /** + * .pb.Tc.Type type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(pb.Chaosdaemon.Tc.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pb.Tc.Type type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private pb.Chaosdaemon.Netem netem_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Netem, pb.Chaosdaemon.Netem.Builder, pb.Chaosdaemon.NetemOrBuilder> netemBuilder_; + /** + * .pb.Netem netem = 2; + * @return Whether the netem field is set. + */ + public boolean hasNetem() { + return netemBuilder_ != null || netem_ != null; + } + /** + * .pb.Netem netem = 2; + * @return The netem. + */ + public pb.Chaosdaemon.Netem getNetem() { + if (netemBuilder_ == null) { + return netem_ == null ? pb.Chaosdaemon.Netem.getDefaultInstance() : netem_; + } else { + return netemBuilder_.getMessage(); + } + } + /** + * .pb.Netem netem = 2; + */ + public Builder setNetem(pb.Chaosdaemon.Netem value) { + if (netemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + netem_ = value; + onChanged(); + } else { + netemBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.Netem netem = 2; + */ + public Builder setNetem( + pb.Chaosdaemon.Netem.Builder builderForValue) { + if (netemBuilder_ == null) { + netem_ = builderForValue.build(); + onChanged(); + } else { + netemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.Netem netem = 2; + */ + public Builder mergeNetem(pb.Chaosdaemon.Netem value) { + if (netemBuilder_ == null) { + if (netem_ != null) { + netem_ = + pb.Chaosdaemon.Netem.newBuilder(netem_).mergeFrom(value).buildPartial(); + } else { + netem_ = value; + } + onChanged(); + } else { + netemBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.Netem netem = 2; + */ + public Builder clearNetem() { + if (netemBuilder_ == null) { + netem_ = null; + onChanged(); + } else { + netem_ = null; + netemBuilder_ = null; + } + + return this; + } + /** + * .pb.Netem netem = 2; + */ + public pb.Chaosdaemon.Netem.Builder getNetemBuilder() { + + onChanged(); + return getNetemFieldBuilder().getBuilder(); + } + /** + * .pb.Netem netem = 2; + */ + public pb.Chaosdaemon.NetemOrBuilder getNetemOrBuilder() { + if (netemBuilder_ != null) { + return netemBuilder_.getMessageOrBuilder(); + } else { + return netem_ == null ? + pb.Chaosdaemon.Netem.getDefaultInstance() : netem_; + } + } + /** + * .pb.Netem netem = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Netem, pb.Chaosdaemon.Netem.Builder, pb.Chaosdaemon.NetemOrBuilder> + getNetemFieldBuilder() { + if (netemBuilder_ == null) { + netemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Netem, pb.Chaosdaemon.Netem.Builder, pb.Chaosdaemon.NetemOrBuilder>( + getNetem(), + getParentForChildren(), + isClean()); + netem_ = null; + } + return netemBuilder_; + } + + private pb.Chaosdaemon.Tbf tbf_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Tbf, pb.Chaosdaemon.Tbf.Builder, pb.Chaosdaemon.TbfOrBuilder> tbfBuilder_; + /** + * .pb.Tbf tbf = 3; + * @return Whether the tbf field is set. + */ + public boolean hasTbf() { + return tbfBuilder_ != null || tbf_ != null; + } + /** + * .pb.Tbf tbf = 3; + * @return The tbf. + */ + public pb.Chaosdaemon.Tbf getTbf() { + if (tbfBuilder_ == null) { + return tbf_ == null ? pb.Chaosdaemon.Tbf.getDefaultInstance() : tbf_; + } else { + return tbfBuilder_.getMessage(); + } + } + /** + * .pb.Tbf tbf = 3; + */ + public Builder setTbf(pb.Chaosdaemon.Tbf value) { + if (tbfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tbf_ = value; + onChanged(); + } else { + tbfBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.Tbf tbf = 3; + */ + public Builder setTbf( + pb.Chaosdaemon.Tbf.Builder builderForValue) { + if (tbfBuilder_ == null) { + tbf_ = builderForValue.build(); + onChanged(); + } else { + tbfBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.Tbf tbf = 3; + */ + public Builder mergeTbf(pb.Chaosdaemon.Tbf value) { + if (tbfBuilder_ == null) { + if (tbf_ != null) { + tbf_ = + pb.Chaosdaemon.Tbf.newBuilder(tbf_).mergeFrom(value).buildPartial(); + } else { + tbf_ = value; + } + onChanged(); + } else { + tbfBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.Tbf tbf = 3; + */ + public Builder clearTbf() { + if (tbfBuilder_ == null) { + tbf_ = null; + onChanged(); + } else { + tbf_ = null; + tbfBuilder_ = null; + } + + return this; + } + /** + * .pb.Tbf tbf = 3; + */ + public pb.Chaosdaemon.Tbf.Builder getTbfBuilder() { + + onChanged(); + return getTbfFieldBuilder().getBuilder(); + } + /** + * .pb.Tbf tbf = 3; + */ + public pb.Chaosdaemon.TbfOrBuilder getTbfOrBuilder() { + if (tbfBuilder_ != null) { + return tbfBuilder_.getMessageOrBuilder(); + } else { + return tbf_ == null ? + pb.Chaosdaemon.Tbf.getDefaultInstance() : tbf_; + } + } + /** + * .pb.Tbf tbf = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Tbf, pb.Chaosdaemon.Tbf.Builder, pb.Chaosdaemon.TbfOrBuilder> + getTbfFieldBuilder() { + if (tbfBuilder_ == null) { + tbfBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.Tbf, pb.Chaosdaemon.Tbf.Builder, pb.Chaosdaemon.TbfOrBuilder>( + getTbf(), + getParentForChildren(), + isClean()); + tbf_ = null; + } + return tbfBuilder_; + } + + private java.lang.Object ipset_ = ""; + /** + * string ipset = 4; + * @return The ipset. + */ + public java.lang.String getIpset() { + java.lang.Object ref = ipset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string ipset = 4; + * @return The bytes for ipset. + */ + public com.google.protobuf.ByteString + getIpsetBytes() { + java.lang.Object ref = ipset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ipset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string ipset = 4; + * @param value The ipset to set. + * @return This builder for chaining. + */ + public Builder setIpset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipset_ = value; + onChanged(); + return this; + } + /** + * string ipset = 4; + * @return This builder for chaining. + */ + public Builder clearIpset() { + + ipset_ = getDefaultInstance().getIpset(); + onChanged(); + return this; + } + /** + * string ipset = 4; + * @param value The bytes for ipset to set. + * @return This builder for chaining. + */ + public Builder setIpsetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipset_ = value; + onChanged(); + return this; + } + + private java.lang.Object protocol_ = ""; + /** + * string protocol = 5; + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string protocol = 5; + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string protocol = 5; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + * string protocol = 5; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + * string protocol = 5; + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourcePort_ = ""; + /** + * string source_port = 6; + * @return The sourcePort. + */ + public java.lang.String getSourcePort() { + java.lang.Object ref = sourcePort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourcePort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string source_port = 6; + * @return The bytes for sourcePort. + */ + public com.google.protobuf.ByteString + getSourcePortBytes() { + java.lang.Object ref = sourcePort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourcePort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string source_port = 6; + * @param value The sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePort( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourcePort_ = value; + onChanged(); + return this; + } + /** + * string source_port = 6; + * @return This builder for chaining. + */ + public Builder clearSourcePort() { + + sourcePort_ = getDefaultInstance().getSourcePort(); + onChanged(); + return this; + } + /** + * string source_port = 6; + * @param value The bytes for sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePortBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourcePort_ = value; + onChanged(); + return this; + } + + private java.lang.Object egressPort_ = ""; + /** + * string egress_port = 7; + * @return The egressPort. + */ + public java.lang.String getEgressPort() { + java.lang.Object ref = egressPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + egressPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string egress_port = 7; + * @return The bytes for egressPort. + */ + public com.google.protobuf.ByteString + getEgressPortBytes() { + java.lang.Object ref = egressPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + egressPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string egress_port = 7; + * @param value The egressPort to set. + * @return This builder for chaining. + */ + public Builder setEgressPort( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + egressPort_ = value; + onChanged(); + return this; + } + /** + * string egress_port = 7; + * @return This builder for chaining. + */ + public Builder clearEgressPort() { + + egressPort_ = getDefaultInstance().getEgressPort(); + onChanged(); + return this; + } + /** + * string egress_port = 7; + * @param value The bytes for egressPort to set. + * @return This builder for chaining. + */ + public Builder setEgressPortBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + egressPort_ = value; + onChanged(); + return this; + } + + private java.lang.Object device_ = ""; + /** + * string device = 9; + * @return The device. + */ + public java.lang.String getDevice() { + java.lang.Object ref = device_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + device_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string device = 9; + * @return The bytes for device. + */ + public com.google.protobuf.ByteString + getDeviceBytes() { + java.lang.Object ref = device_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + device_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string device = 9; + * @param value The device to set. + * @return This builder for chaining. + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + * string device = 9; + * @return This builder for chaining. + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + * string device = 9; + * @param value The bytes for device to set. + * @return This builder for chaining. + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = 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:pb.Tc) + } + + // @@protoc_insertion_point(class_scope:pb.Tc) + private static final pb.Chaosdaemon.Tc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.Tc(); + } + + public static pb.Chaosdaemon.Tc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Tc(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 pb.Chaosdaemon.Tc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SetDNSServerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.SetDNSServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string container_id = 1; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * string dns_server = 2; + * @return The dnsServer. + */ + java.lang.String getDnsServer(); + /** + * string dns_server = 2; + * @return The bytes for dnsServer. + */ + com.google.protobuf.ByteString + getDnsServerBytes(); + + /** + * bool enable = 3; + * @return The enable. + */ + boolean getEnable(); + + /** + * bool enterNS = 4; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.SetDNSServerRequest} + */ + public static final class SetDNSServerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.SetDNSServerRequest) + SetDNSServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetDNSServerRequest.newBuilder() to construct. + private SetDNSServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SetDNSServerRequest() { + containerId_ = ""; + dnsServer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SetDNSServerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SetDNSServerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + containerId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + dnsServer_ = s; + break; + } + case 24: { + + enable_ = input.readBool(); + break; + } + case 32: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_SetDNSServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_SetDNSServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.SetDNSServerRequest.class, pb.Chaosdaemon.SetDNSServerRequest.Builder.class); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object containerId_; + /** + * string container_id = 1; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DNS_SERVER_FIELD_NUMBER = 2; + private volatile java.lang.Object dnsServer_; + /** + * string dns_server = 2; + * @return The dnsServer. + */ + @java.lang.Override + public java.lang.String getDnsServer() { + java.lang.Object ref = dnsServer_; + 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(); + dnsServer_ = s; + return s; + } + } + /** + * string dns_server = 2; + * @return The bytes for dnsServer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDnsServerBytes() { + java.lang.Object ref = dnsServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dnsServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_FIELD_NUMBER = 3; + private boolean enable_; + /** + * bool enable = 3; + * @return The enable. + */ + @java.lang.Override + public boolean getEnable() { + return enable_; + } + + public static final int ENTERNS_FIELD_NUMBER = 4; + private boolean enterNS_; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dnsServer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dnsServer_); + } + if (enable_ != false) { + output.writeBool(3, enable_); + } + if (enterNS_ != false) { + output.writeBool(4, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dnsServer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dnsServer_); + } + if (enable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enable_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, enterNS_); + } + 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 pb.Chaosdaemon.SetDNSServerRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.SetDNSServerRequest other = (pb.Chaosdaemon.SetDNSServerRequest) obj; + + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (!getDnsServer() + .equals(other.getDnsServer())) return false; + if (getEnable() + != other.getEnable()) return false; + if (getEnterNS() + != other.getEnterNS()) 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) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + DNS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getDnsServer().hashCode(); + hash = (37 * hash) + ENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnable()); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.SetDNSServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.SetDNSServerRequest 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 pb.Chaosdaemon.SetDNSServerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.SetDNSServerRequest 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 pb.Chaosdaemon.SetDNSServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.SetDNSServerRequest 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(pb.Chaosdaemon.SetDNSServerRequest 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; + } + /** + * Protobuf type {@code pb.SetDNSServerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.SetDNSServerRequest) + pb.Chaosdaemon.SetDNSServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_SetDNSServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_SetDNSServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.SetDNSServerRequest.class, pb.Chaosdaemon.SetDNSServerRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.SetDNSServerRequest.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(); + containerId_ = ""; + + dnsServer_ = ""; + + enable_ = false; + + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_SetDNSServerRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.SetDNSServerRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.SetDNSServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.SetDNSServerRequest build() { + pb.Chaosdaemon.SetDNSServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.SetDNSServerRequest buildPartial() { + pb.Chaosdaemon.SetDNSServerRequest result = new pb.Chaosdaemon.SetDNSServerRequest(this); + result.containerId_ = containerId_; + result.dnsServer_ = dnsServer_; + result.enable_ = enable_; + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.SetDNSServerRequest) { + return mergeFrom((pb.Chaosdaemon.SetDNSServerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.SetDNSServerRequest other) { + if (other == pb.Chaosdaemon.SetDNSServerRequest.getDefaultInstance()) return this; + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (!other.getDnsServer().isEmpty()) { + dnsServer_ = other.dnsServer_; + onChanged(); + } + if (other.getEnable() != false) { + setEnable(other.getEnable()); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.SetDNSServerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.SetDNSServerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 1; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 1; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 1; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 1; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object dnsServer_ = ""; + /** + * string dns_server = 2; + * @return The dnsServer. + */ + public java.lang.String getDnsServer() { + java.lang.Object ref = dnsServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dnsServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string dns_server = 2; + * @return The bytes for dnsServer. + */ + public com.google.protobuf.ByteString + getDnsServerBytes() { + java.lang.Object ref = dnsServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dnsServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string dns_server = 2; + * @param value The dnsServer to set. + * @return This builder for chaining. + */ + public Builder setDnsServer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dnsServer_ = value; + onChanged(); + return this; + } + /** + * string dns_server = 2; + * @return This builder for chaining. + */ + public Builder clearDnsServer() { + + dnsServer_ = getDefaultInstance().getDnsServer(); + onChanged(); + return this; + } + /** + * string dns_server = 2; + * @param value The bytes for dnsServer to set. + * @return This builder for chaining. + */ + public Builder setDnsServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dnsServer_ = value; + onChanged(); + return this; + } + + private boolean enable_ ; + /** + * bool enable = 3; + * @return The enable. + */ + @java.lang.Override + public boolean getEnable() { + return enable_; + } + /** + * bool enable = 3; + * @param value The enable to set. + * @return This builder for chaining. + */ + public Builder setEnable(boolean value) { + + enable_ = value; + onChanged(); + return this; + } + /** + * bool enable = 3; + * @return This builder for chaining. + */ + public Builder clearEnable() { + + enable_ = false; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 4; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 4; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.SetDNSServerRequest) + } + + // @@protoc_insertion_point(class_scope:pb.SetDNSServerRequest) + private static final pb.Chaosdaemon.SetDNSServerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.SetDNSServerRequest(); + } + + public static pb.Chaosdaemon.SetDNSServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetDNSServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetDNSServerRequest(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 pb.Chaosdaemon.SetDNSServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InstallJVMRulesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.InstallJVMRulesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string container_id = 1; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * string rule = 2; + * @return The rule. + */ + java.lang.String getRule(); + /** + * string rule = 2; + * @return The bytes for rule. + */ + com.google.protobuf.ByteString + getRuleBytes(); + + /** + * int32 port = 3; + * @return The port. + */ + int getPort(); + + /** + * bool enterNS = 4; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.InstallJVMRulesRequest} + */ + public static final class InstallJVMRulesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.InstallJVMRulesRequest) + InstallJVMRulesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstallJVMRulesRequest.newBuilder() to construct. + private InstallJVMRulesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InstallJVMRulesRequest() { + containerId_ = ""; + rule_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InstallJVMRulesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InstallJVMRulesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + containerId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + rule_ = s; + break; + } + case 24: { + + port_ = input.readInt32(); + break; + } + case 32: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_InstallJVMRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_InstallJVMRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.InstallJVMRulesRequest.class, pb.Chaosdaemon.InstallJVMRulesRequest.Builder.class); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object containerId_; + /** + * string container_id = 1; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_FIELD_NUMBER = 2; + private volatile java.lang.Object rule_; + /** + * string rule = 2; + * @return The rule. + */ + @java.lang.Override + public java.lang.String getRule() { + java.lang.Object ref = rule_; + 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(); + rule_ = s; + return s; + } + } + /** + * string rule = 2; + * @return The bytes for rule. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRuleBytes() { + java.lang.Object ref = rule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + private int port_; + /** + * int32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int ENTERNS_FIELD_NUMBER = 4; + private boolean enterNS_; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rule_); + } + if (port_ != 0) { + output.writeInt32(3, port_); + } + if (enterNS_ != false) { + output.writeBool(4, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rule_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, port_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, enterNS_); + } + 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 pb.Chaosdaemon.InstallJVMRulesRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.InstallJVMRulesRequest other = (pb.Chaosdaemon.InstallJVMRulesRequest) obj; + + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (!getRule() + .equals(other.getRule())) return false; + if (getPort() + != other.getPort()) return false; + if (getEnterNS() + != other.getEnterNS()) 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) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + getRule().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest 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 pb.Chaosdaemon.InstallJVMRulesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest 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 pb.Chaosdaemon.InstallJVMRulesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.InstallJVMRulesRequest 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(pb.Chaosdaemon.InstallJVMRulesRequest 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; + } + /** + * Protobuf type {@code pb.InstallJVMRulesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.InstallJVMRulesRequest) + pb.Chaosdaemon.InstallJVMRulesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_InstallJVMRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_InstallJVMRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.InstallJVMRulesRequest.class, pb.Chaosdaemon.InstallJVMRulesRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.InstallJVMRulesRequest.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(); + containerId_ = ""; + + rule_ = ""; + + port_ = 0; + + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_InstallJVMRulesRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.InstallJVMRulesRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.InstallJVMRulesRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.InstallJVMRulesRequest build() { + pb.Chaosdaemon.InstallJVMRulesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.InstallJVMRulesRequest buildPartial() { + pb.Chaosdaemon.InstallJVMRulesRequest result = new pb.Chaosdaemon.InstallJVMRulesRequest(this); + result.containerId_ = containerId_; + result.rule_ = rule_; + result.port_ = port_; + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.InstallJVMRulesRequest) { + return mergeFrom((pb.Chaosdaemon.InstallJVMRulesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.InstallJVMRulesRequest other) { + if (other == pb.Chaosdaemon.InstallJVMRulesRequest.getDefaultInstance()) return this; + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (!other.getRule().isEmpty()) { + rule_ = other.rule_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.InstallJVMRulesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.InstallJVMRulesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 1; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 1; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 1; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 1; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object rule_ = ""; + /** + * string rule = 2; + * @return The rule. + */ + public java.lang.String getRule() { + java.lang.Object ref = rule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string rule = 2; + * @return The bytes for rule. + */ + public com.google.protobuf.ByteString + getRuleBytes() { + java.lang.Object ref = rule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string rule = 2; + * @param value The rule to set. + * @return This builder for chaining. + */ + public Builder setRule( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rule_ = value; + onChanged(); + return this; + } + /** + * string rule = 2; + * @return This builder for chaining. + */ + public Builder clearRule() { + + rule_ = getDefaultInstance().getRule(); + onChanged(); + return this; + } + /** + * string rule = 2; + * @param value The bytes for rule to set. + * @return This builder for chaining. + */ + public Builder setRuleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rule_ = value; + onChanged(); + return this; + } + + private int port_ ; + /** + * int32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * int32 port = 3; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * int32 port = 3; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 4; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 4; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.InstallJVMRulesRequest) + } + + // @@protoc_insertion_point(class_scope:pb.InstallJVMRulesRequest) + private static final pb.Chaosdaemon.InstallJVMRulesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.InstallJVMRulesRequest(); + } + + public static pb.Chaosdaemon.InstallJVMRulesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstallJVMRulesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstallJVMRulesRequest(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 pb.Chaosdaemon.InstallJVMRulesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UninstallJVMRulesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.UninstallJVMRulesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string container_id = 1; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * string rule = 2; + * @return The rule. + */ + java.lang.String getRule(); + /** + * string rule = 2; + * @return The bytes for rule. + */ + com.google.protobuf.ByteString + getRuleBytes(); + + /** + * int32 port = 3; + * @return The port. + */ + int getPort(); + + /** + * bool enterNS = 4; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.UninstallJVMRulesRequest} + */ + public static final class UninstallJVMRulesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.UninstallJVMRulesRequest) + UninstallJVMRulesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UninstallJVMRulesRequest.newBuilder() to construct. + private UninstallJVMRulesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UninstallJVMRulesRequest() { + containerId_ = ""; + rule_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UninstallJVMRulesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UninstallJVMRulesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + containerId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + rule_ = s; + break; + } + case 24: { + + port_ = input.readInt32(); + break; + } + case 32: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_UninstallJVMRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_UninstallJVMRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.UninstallJVMRulesRequest.class, pb.Chaosdaemon.UninstallJVMRulesRequest.Builder.class); + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object containerId_; + /** + * string container_id = 1; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_FIELD_NUMBER = 2; + private volatile java.lang.Object rule_; + /** + * string rule = 2; + * @return The rule. + */ + @java.lang.Override + public java.lang.String getRule() { + java.lang.Object ref = rule_; + 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(); + rule_ = s; + return s; + } + } + /** + * string rule = 2; + * @return The bytes for rule. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRuleBytes() { + java.lang.Object ref = rule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + private int port_; + /** + * int32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int ENTERNS_FIELD_NUMBER = 4; + private boolean enterNS_; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rule_); + } + if (port_ != 0) { + output.writeInt32(3, port_); + } + if (enterNS_ != false) { + output.writeBool(4, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rule_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, port_); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, enterNS_); + } + 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 pb.Chaosdaemon.UninstallJVMRulesRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.UninstallJVMRulesRequest other = (pb.Chaosdaemon.UninstallJVMRulesRequest) obj; + + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (!getRule() + .equals(other.getRule())) return false; + if (getPort() + != other.getPort()) return false; + if (getEnterNS() + != other.getEnterNS()) 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) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + getRule().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest 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 pb.Chaosdaemon.UninstallJVMRulesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest 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 pb.Chaosdaemon.UninstallJVMRulesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.UninstallJVMRulesRequest 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(pb.Chaosdaemon.UninstallJVMRulesRequest 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; + } + /** + * Protobuf type {@code pb.UninstallJVMRulesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.UninstallJVMRulesRequest) + pb.Chaosdaemon.UninstallJVMRulesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_UninstallJVMRulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_UninstallJVMRulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.UninstallJVMRulesRequest.class, pb.Chaosdaemon.UninstallJVMRulesRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.UninstallJVMRulesRequest.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(); + containerId_ = ""; + + rule_ = ""; + + port_ = 0; + + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_UninstallJVMRulesRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.UninstallJVMRulesRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.UninstallJVMRulesRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.UninstallJVMRulesRequest build() { + pb.Chaosdaemon.UninstallJVMRulesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.UninstallJVMRulesRequest buildPartial() { + pb.Chaosdaemon.UninstallJVMRulesRequest result = new pb.Chaosdaemon.UninstallJVMRulesRequest(this); + result.containerId_ = containerId_; + result.rule_ = rule_; + result.port_ = port_; + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.UninstallJVMRulesRequest) { + return mergeFrom((pb.Chaosdaemon.UninstallJVMRulesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.UninstallJVMRulesRequest other) { + if (other == pb.Chaosdaemon.UninstallJVMRulesRequest.getDefaultInstance()) return this; + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (!other.getRule().isEmpty()) { + rule_ = other.rule_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.UninstallJVMRulesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.UninstallJVMRulesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 1; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 1; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 1; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 1; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object rule_ = ""; + /** + * string rule = 2; + * @return The rule. + */ + public java.lang.String getRule() { + java.lang.Object ref = rule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string rule = 2; + * @return The bytes for rule. + */ + public com.google.protobuf.ByteString + getRuleBytes() { + java.lang.Object ref = rule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string rule = 2; + * @param value The rule to set. + * @return This builder for chaining. + */ + public Builder setRule( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rule_ = value; + onChanged(); + return this; + } + /** + * string rule = 2; + * @return This builder for chaining. + */ + public Builder clearRule() { + + rule_ = getDefaultInstance().getRule(); + onChanged(); + return this; + } + /** + * string rule = 2; + * @param value The bytes for rule to set. + * @return This builder for chaining. + */ + public Builder setRuleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rule_ = value; + onChanged(); + return this; + } + + private int port_ ; + /** + * int32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * int32 port = 3; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * int32 port = 3; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 4; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 4; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 4; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.UninstallJVMRulesRequest) + } + + // @@protoc_insertion_point(class_scope:pb.UninstallJVMRulesRequest) + private static final pb.Chaosdaemon.UninstallJVMRulesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.UninstallJVMRulesRequest(); + } + + public static pb.Chaosdaemon.UninstallJVMRulesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UninstallJVMRulesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UninstallJVMRulesRequest(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 pb.Chaosdaemon.UninstallJVMRulesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyBlockChaosRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ApplyBlockChaosRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string container_id = 1; + * @return The containerId. + */ + java.lang.String getContainerId(); + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * string volume_path = 2; + * @return The volumePath. + */ + java.lang.String getVolumePath(); + /** + * string volume_path = 2; + * @return The bytes for volumePath. + */ + com.google.protobuf.ByteString + getVolumePathBytes(); + + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return The action. + */ + pb.Chaosdaemon.ApplyBlockChaosRequest.Action getAction(); + + /** + * .pb.BlockDelaySpec delay = 5; + * @return Whether the delay field is set. + */ + boolean hasDelay(); + /** + * .pb.BlockDelaySpec delay = 5; + * @return The delay. + */ + pb.Chaosdaemon.BlockDelaySpec getDelay(); + /** + * .pb.BlockDelaySpec delay = 5; + */ + pb.Chaosdaemon.BlockDelaySpecOrBuilder getDelayOrBuilder(); + + /** + * bool enterNS = 6; + * @return The enterNS. + */ + boolean getEnterNS(); + } + /** + * Protobuf type {@code pb.ApplyBlockChaosRequest} + */ + public static final class ApplyBlockChaosRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ApplyBlockChaosRequest) + ApplyBlockChaosRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyBlockChaosRequest.newBuilder() to construct. + private ApplyBlockChaosRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyBlockChaosRequest() { + containerId_ = ""; + volumePath_ = ""; + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApplyBlockChaosRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyBlockChaosRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + + containerId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + volumePath_ = s; + break; + } + case 24: { + int rawValue = input.readEnum(); + + action_ = rawValue; + break; + } + case 42: { + pb.Chaosdaemon.BlockDelaySpec.Builder subBuilder = null; + if (delay_ != null) { + subBuilder = delay_.toBuilder(); + } + delay_ = input.readMessage(pb.Chaosdaemon.BlockDelaySpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(delay_); + delay_ = subBuilder.buildPartial(); + } + + break; + } + case 48: { + + enterNS_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyBlockChaosRequest.class, pb.Chaosdaemon.ApplyBlockChaosRequest.Builder.class); + } + + /** + * Protobuf enum {@code pb.ApplyBlockChaosRequest.Action} + */ + public enum Action + implements com.google.protobuf.ProtocolMessageEnum { + /** + * Delay = 0; + */ + Delay(0), + UNRECOGNIZED(-1), + ; + + /** + * Delay = 0; + */ + public static final int Delay_VALUE = 0; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Action valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Action forNumber(int value) { + switch (value) { + case 0: return Delay; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Action> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 pb.Chaosdaemon.ApplyBlockChaosRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pb.ApplyBlockChaosRequest.Action) + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object containerId_; + /** + * string container_id = 1; + * @return The containerId. + */ + @java.lang.Override + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOLUME_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object volumePath_; + /** + * string volume_path = 2; + * @return The volumePath. + */ + @java.lang.Override + public java.lang.String getVolumePath() { + java.lang.Object ref = volumePath_; + 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(); + volumePath_ = s; + return s; + } + } + /** + * string volume_path = 2; + * @return The bytes for volumePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVolumePathBytes() { + java.lang.Object ref = volumePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + volumePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 3; + private int action_; + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override public int getActionValue() { + return action_; + } + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return The action. + */ + @java.lang.Override public pb.Chaosdaemon.ApplyBlockChaosRequest.Action getAction() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.ApplyBlockChaosRequest.Action result = pb.Chaosdaemon.ApplyBlockChaosRequest.Action.valueOf(action_); + return result == null ? pb.Chaosdaemon.ApplyBlockChaosRequest.Action.UNRECOGNIZED : result; + } + + public static final int DELAY_FIELD_NUMBER = 5; + private pb.Chaosdaemon.BlockDelaySpec delay_; + /** + * .pb.BlockDelaySpec delay = 5; + * @return Whether the delay field is set. + */ + @java.lang.Override + public boolean hasDelay() { + return delay_ != null; + } + /** + * .pb.BlockDelaySpec delay = 5; + * @return The delay. + */ + @java.lang.Override + public pb.Chaosdaemon.BlockDelaySpec getDelay() { + return delay_ == null ? pb.Chaosdaemon.BlockDelaySpec.getDefaultInstance() : delay_; + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + @java.lang.Override + public pb.Chaosdaemon.BlockDelaySpecOrBuilder getDelayOrBuilder() { + return getDelay(); + } + + public static final int ENTERNS_FIELD_NUMBER = 6; + private boolean enterNS_; + /** + * bool enterNS = 6; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, volumePath_); + } + if (action_ != pb.Chaosdaemon.ApplyBlockChaosRequest.Action.Delay.getNumber()) { + output.writeEnum(3, action_); + } + if (delay_ != null) { + output.writeMessage(5, getDelay()); + } + if (enterNS_ != false) { + output.writeBool(6, enterNS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, volumePath_); + } + if (action_ != pb.Chaosdaemon.ApplyBlockChaosRequest.Action.Delay.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, action_); + } + if (delay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getDelay()); + } + if (enterNS_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, enterNS_); + } + 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 pb.Chaosdaemon.ApplyBlockChaosRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.ApplyBlockChaosRequest other = (pb.Chaosdaemon.ApplyBlockChaosRequest) obj; + + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (!getVolumePath() + .equals(other.getVolumePath())) return false; + if (action_ != other.action_) return false; + if (hasDelay() != other.hasDelay()) return false; + if (hasDelay()) { + if (!getDelay() + .equals(other.getDelay())) return false; + } + if (getEnterNS() + != other.getEnterNS()) 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) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + VOLUME_PATH_FIELD_NUMBER; + hash = (53 * hash) + getVolumePath().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + if (hasDelay()) { + hash = (37 * hash) + DELAY_FIELD_NUMBER; + hash = (53 * hash) + getDelay().hashCode(); + } + hash = (37 * hash) + ENTERNS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnterNS()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest 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 pb.Chaosdaemon.ApplyBlockChaosRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest 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 pb.Chaosdaemon.ApplyBlockChaosRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyBlockChaosRequest 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(pb.Chaosdaemon.ApplyBlockChaosRequest 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; + } + /** + * Protobuf type {@code pb.ApplyBlockChaosRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ApplyBlockChaosRequest) + pb.Chaosdaemon.ApplyBlockChaosRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyBlockChaosRequest.class, pb.Chaosdaemon.ApplyBlockChaosRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.ApplyBlockChaosRequest.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(); + containerId_ = ""; + + volumePath_ = ""; + + action_ = 0; + + if (delayBuilder_ == null) { + delay_ = null; + } else { + delay_ = null; + delayBuilder_ = null; + } + enterNS_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.ApplyBlockChaosRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosRequest build() { + pb.Chaosdaemon.ApplyBlockChaosRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosRequest buildPartial() { + pb.Chaosdaemon.ApplyBlockChaosRequest result = new pb.Chaosdaemon.ApplyBlockChaosRequest(this); + result.containerId_ = containerId_; + result.volumePath_ = volumePath_; + result.action_ = action_; + if (delayBuilder_ == null) { + result.delay_ = delay_; + } else { + result.delay_ = delayBuilder_.build(); + } + result.enterNS_ = enterNS_; + 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 pb.Chaosdaemon.ApplyBlockChaosRequest) { + return mergeFrom((pb.Chaosdaemon.ApplyBlockChaosRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ApplyBlockChaosRequest other) { + if (other == pb.Chaosdaemon.ApplyBlockChaosRequest.getDefaultInstance()) return this; + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (!other.getVolumePath().isEmpty()) { + volumePath_ = other.volumePath_; + onChanged(); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (other.hasDelay()) { + mergeDelay(other.getDelay()); + } + if (other.getEnterNS() != false) { + setEnterNS(other.getEnterNS()); + } + 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 { + pb.Chaosdaemon.ApplyBlockChaosRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ApplyBlockChaosRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 1; + * @return The containerId. + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 1; + * @return The bytes for containerId. + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 1; + * @param value The containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 1; + * @return This builder for chaining. + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 1; + * @param value The bytes for containerId to set. + * @return This builder for chaining. + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object volumePath_ = ""; + /** + * string volume_path = 2; + * @return The volumePath. + */ + public java.lang.String getVolumePath() { + java.lang.Object ref = volumePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volumePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string volume_path = 2; + * @return The bytes for volumePath. + */ + public com.google.protobuf.ByteString + getVolumePathBytes() { + java.lang.Object ref = volumePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + volumePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string volume_path = 2; + * @param value The volumePath to set. + * @return This builder for chaining. + */ + public Builder setVolumePath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + volumePath_ = value; + onChanged(); + return this; + } + /** + * string volume_path = 2; + * @return This builder for chaining. + */ + public Builder clearVolumePath() { + + volumePath_ = getDefaultInstance().getVolumePath(); + onChanged(); + return this; + } + /** + * string volume_path = 2; + * @param value The bytes for volumePath to set. + * @return This builder for chaining. + */ + public Builder setVolumePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + volumePath_ = value; + onChanged(); + return this; + } + + private int action_ = 0; + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override public int getActionValue() { + return action_; + } + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + + action_ = value; + onChanged(); + return this; + } + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return The action. + */ + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosRequest.Action getAction() { + @SuppressWarnings("deprecation") + pb.Chaosdaemon.ApplyBlockChaosRequest.Action result = pb.Chaosdaemon.ApplyBlockChaosRequest.Action.valueOf(action_); + return result == null ? pb.Chaosdaemon.ApplyBlockChaosRequest.Action.UNRECOGNIZED : result; + } + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(pb.Chaosdaemon.ApplyBlockChaosRequest.Action value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pb.ApplyBlockChaosRequest.Action action = 3; + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = 0; + onChanged(); + return this; + } + + private pb.Chaosdaemon.BlockDelaySpec delay_; + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.BlockDelaySpec, pb.Chaosdaemon.BlockDelaySpec.Builder, pb.Chaosdaemon.BlockDelaySpecOrBuilder> delayBuilder_; + /** + * .pb.BlockDelaySpec delay = 5; + * @return Whether the delay field is set. + */ + public boolean hasDelay() { + return delayBuilder_ != null || delay_ != null; + } + /** + * .pb.BlockDelaySpec delay = 5; + * @return The delay. + */ + public pb.Chaosdaemon.BlockDelaySpec getDelay() { + if (delayBuilder_ == null) { + return delay_ == null ? pb.Chaosdaemon.BlockDelaySpec.getDefaultInstance() : delay_; + } else { + return delayBuilder_.getMessage(); + } + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + public Builder setDelay(pb.Chaosdaemon.BlockDelaySpec value) { + if (delayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + delay_ = value; + onChanged(); + } else { + delayBuilder_.setMessage(value); + } + + return this; + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + public Builder setDelay( + pb.Chaosdaemon.BlockDelaySpec.Builder builderForValue) { + if (delayBuilder_ == null) { + delay_ = builderForValue.build(); + onChanged(); + } else { + delayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + public Builder mergeDelay(pb.Chaosdaemon.BlockDelaySpec value) { + if (delayBuilder_ == null) { + if (delay_ != null) { + delay_ = + pb.Chaosdaemon.BlockDelaySpec.newBuilder(delay_).mergeFrom(value).buildPartial(); + } else { + delay_ = value; + } + onChanged(); + } else { + delayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + public Builder clearDelay() { + if (delayBuilder_ == null) { + delay_ = null; + onChanged(); + } else { + delay_ = null; + delayBuilder_ = null; + } + + return this; + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + public pb.Chaosdaemon.BlockDelaySpec.Builder getDelayBuilder() { + + onChanged(); + return getDelayFieldBuilder().getBuilder(); + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + public pb.Chaosdaemon.BlockDelaySpecOrBuilder getDelayOrBuilder() { + if (delayBuilder_ != null) { + return delayBuilder_.getMessageOrBuilder(); + } else { + return delay_ == null ? + pb.Chaosdaemon.BlockDelaySpec.getDefaultInstance() : delay_; + } + } + /** + * .pb.BlockDelaySpec delay = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.BlockDelaySpec, pb.Chaosdaemon.BlockDelaySpec.Builder, pb.Chaosdaemon.BlockDelaySpecOrBuilder> + getDelayFieldBuilder() { + if (delayBuilder_ == null) { + delayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pb.Chaosdaemon.BlockDelaySpec, pb.Chaosdaemon.BlockDelaySpec.Builder, pb.Chaosdaemon.BlockDelaySpecOrBuilder>( + getDelay(), + getParentForChildren(), + isClean()); + delay_ = null; + } + return delayBuilder_; + } + + private boolean enterNS_ ; + /** + * bool enterNS = 6; + * @return The enterNS. + */ + @java.lang.Override + public boolean getEnterNS() { + return enterNS_; + } + /** + * bool enterNS = 6; + * @param value The enterNS to set. + * @return This builder for chaining. + */ + public Builder setEnterNS(boolean value) { + + enterNS_ = value; + onChanged(); + return this; + } + /** + * bool enterNS = 6; + * @return This builder for chaining. + */ + public Builder clearEnterNS() { + + enterNS_ = false; + 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:pb.ApplyBlockChaosRequest) + } + + // @@protoc_insertion_point(class_scope:pb.ApplyBlockChaosRequest) + private static final pb.Chaosdaemon.ApplyBlockChaosRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ApplyBlockChaosRequest(); + } + + public static pb.Chaosdaemon.ApplyBlockChaosRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyBlockChaosRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyBlockChaosRequest(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 pb.Chaosdaemon.ApplyBlockChaosRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockDelaySpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.BlockDelaySpec) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 delay = 1; + * @return The delay. + */ + long getDelay(); + + /** + * double correlation = 2; + * @return The correlation. + */ + double getCorrelation(); + + /** + * int64 jitter = 3; + * @return The jitter. + */ + long getJitter(); + } + /** + * Protobuf type {@code pb.BlockDelaySpec} + */ + public static final class BlockDelaySpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.BlockDelaySpec) + BlockDelaySpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockDelaySpec.newBuilder() to construct. + private BlockDelaySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockDelaySpec() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BlockDelaySpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BlockDelaySpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + delay_ = input.readInt64(); + break; + } + case 17: { + + correlation_ = input.readDouble(); + break; + } + case 24: { + + jitter_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_BlockDelaySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_BlockDelaySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.BlockDelaySpec.class, pb.Chaosdaemon.BlockDelaySpec.Builder.class); + } + + public static final int DELAY_FIELD_NUMBER = 1; + private long delay_; + /** + * int64 delay = 1; + * @return The delay. + */ + @java.lang.Override + public long getDelay() { + return delay_; + } + + public static final int CORRELATION_FIELD_NUMBER = 2; + private double correlation_; + /** + * double correlation = 2; + * @return The correlation. + */ + @java.lang.Override + public double getCorrelation() { + return correlation_; + } + + public static final int JITTER_FIELD_NUMBER = 3; + private long jitter_; + /** + * int64 jitter = 3; + * @return The jitter. + */ + @java.lang.Override + public long getJitter() { + return jitter_; + } + + 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 (delay_ != 0L) { + output.writeInt64(1, delay_); + } + if (java.lang.Double.doubleToRawLongBits(correlation_) != 0) { + output.writeDouble(2, correlation_); + } + if (jitter_ != 0L) { + output.writeInt64(3, jitter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (delay_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, delay_); + } + if (java.lang.Double.doubleToRawLongBits(correlation_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, correlation_); + } + if (jitter_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, jitter_); + } + 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 pb.Chaosdaemon.BlockDelaySpec)) { + return super.equals(obj); + } + pb.Chaosdaemon.BlockDelaySpec other = (pb.Chaosdaemon.BlockDelaySpec) obj; + + if (getDelay() + != other.getDelay()) return false; + if (java.lang.Double.doubleToLongBits(getCorrelation()) + != java.lang.Double.doubleToLongBits( + other.getCorrelation())) return false; + if (getJitter() + != other.getJitter()) 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) + DELAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDelay()); + hash = (37 * hash) + CORRELATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCorrelation())); + hash = (37 * hash) + JITTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getJitter()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.BlockDelaySpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.BlockDelaySpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.BlockDelaySpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.BlockDelaySpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.BlockDelaySpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.BlockDelaySpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.BlockDelaySpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.BlockDelaySpec 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 pb.Chaosdaemon.BlockDelaySpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.BlockDelaySpec 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 pb.Chaosdaemon.BlockDelaySpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.BlockDelaySpec 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(pb.Chaosdaemon.BlockDelaySpec 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; + } + /** + * Protobuf type {@code pb.BlockDelaySpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.BlockDelaySpec) + pb.Chaosdaemon.BlockDelaySpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_BlockDelaySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_BlockDelaySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.BlockDelaySpec.class, pb.Chaosdaemon.BlockDelaySpec.Builder.class); + } + + // Construct using pb.Chaosdaemon.BlockDelaySpec.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(); + delay_ = 0L; + + correlation_ = 0D; + + jitter_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_BlockDelaySpec_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.BlockDelaySpec getDefaultInstanceForType() { + return pb.Chaosdaemon.BlockDelaySpec.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.BlockDelaySpec build() { + pb.Chaosdaemon.BlockDelaySpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.BlockDelaySpec buildPartial() { + pb.Chaosdaemon.BlockDelaySpec result = new pb.Chaosdaemon.BlockDelaySpec(this); + result.delay_ = delay_; + result.correlation_ = correlation_; + result.jitter_ = jitter_; + 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 pb.Chaosdaemon.BlockDelaySpec) { + return mergeFrom((pb.Chaosdaemon.BlockDelaySpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.BlockDelaySpec other) { + if (other == pb.Chaosdaemon.BlockDelaySpec.getDefaultInstance()) return this; + if (other.getDelay() != 0L) { + setDelay(other.getDelay()); + } + if (other.getCorrelation() != 0D) { + setCorrelation(other.getCorrelation()); + } + if (other.getJitter() != 0L) { + setJitter(other.getJitter()); + } + 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 { + pb.Chaosdaemon.BlockDelaySpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.BlockDelaySpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long delay_ ; + /** + * int64 delay = 1; + * @return The delay. + */ + @java.lang.Override + public long getDelay() { + return delay_; + } + /** + * int64 delay = 1; + * @param value The delay to set. + * @return This builder for chaining. + */ + public Builder setDelay(long value) { + + delay_ = value; + onChanged(); + return this; + } + /** + * int64 delay = 1; + * @return This builder for chaining. + */ + public Builder clearDelay() { + + delay_ = 0L; + onChanged(); + return this; + } + + private double correlation_ ; + /** + * double correlation = 2; + * @return The correlation. + */ + @java.lang.Override + public double getCorrelation() { + return correlation_; + } + /** + * double correlation = 2; + * @param value The correlation to set. + * @return This builder for chaining. + */ + public Builder setCorrelation(double value) { + + correlation_ = value; + onChanged(); + return this; + } + /** + * double correlation = 2; + * @return This builder for chaining. + */ + public Builder clearCorrelation() { + + correlation_ = 0D; + onChanged(); + return this; + } + + private long jitter_ ; + /** + * int64 jitter = 3; + * @return The jitter. + */ + @java.lang.Override + public long getJitter() { + return jitter_; + } + /** + * int64 jitter = 3; + * @param value The jitter to set. + * @return This builder for chaining. + */ + public Builder setJitter(long value) { + + jitter_ = value; + onChanged(); + return this; + } + /** + * int64 jitter = 3; + * @return This builder for chaining. + */ + public Builder clearJitter() { + + jitter_ = 0L; + 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:pb.BlockDelaySpec) + } + + // @@protoc_insertion_point(class_scope:pb.BlockDelaySpec) + private static final pb.Chaosdaemon.BlockDelaySpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.BlockDelaySpec(); + } + + public static pb.Chaosdaemon.BlockDelaySpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BlockDelaySpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BlockDelaySpec(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 pb.Chaosdaemon.BlockDelaySpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockLimitSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.BlockLimitSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 quota = 1; + * @return The quota. + */ + long getQuota(); + + /** + * uint64 period_us = 2; + * @return The periodUs. + */ + long getPeriodUs(); + } + /** + * Protobuf type {@code pb.BlockLimitSpec} + */ + public static final class BlockLimitSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.BlockLimitSpec) + BlockLimitSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockLimitSpec.newBuilder() to construct. + private BlockLimitSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockLimitSpec() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BlockLimitSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BlockLimitSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + quota_ = input.readUInt64(); + break; + } + case 16: { + + periodUs_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_BlockLimitSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_BlockLimitSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.BlockLimitSpec.class, pb.Chaosdaemon.BlockLimitSpec.Builder.class); + } + + public static final int QUOTA_FIELD_NUMBER = 1; + private long quota_; + /** + * uint64 quota = 1; + * @return The quota. + */ + @java.lang.Override + public long getQuota() { + return quota_; + } + + public static final int PERIOD_US_FIELD_NUMBER = 2; + private long periodUs_; + /** + * uint64 period_us = 2; + * @return The periodUs. + */ + @java.lang.Override + public long getPeriodUs() { + return periodUs_; + } + + 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 (quota_ != 0L) { + output.writeUInt64(1, quota_); + } + if (periodUs_ != 0L) { + output.writeUInt64(2, periodUs_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (quota_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, quota_); + } + if (periodUs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, periodUs_); + } + 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 pb.Chaosdaemon.BlockLimitSpec)) { + return super.equals(obj); + } + pb.Chaosdaemon.BlockLimitSpec other = (pb.Chaosdaemon.BlockLimitSpec) obj; + + if (getQuota() + != other.getQuota()) return false; + if (getPeriodUs() + != other.getPeriodUs()) 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) + QUOTA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getQuota()); + hash = (37 * hash) + PERIOD_US_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPeriodUs()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.BlockLimitSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.BlockLimitSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.BlockLimitSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.BlockLimitSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.BlockLimitSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.BlockLimitSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.BlockLimitSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.BlockLimitSpec 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 pb.Chaosdaemon.BlockLimitSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.BlockLimitSpec 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 pb.Chaosdaemon.BlockLimitSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.BlockLimitSpec 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(pb.Chaosdaemon.BlockLimitSpec 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; + } + /** + * Protobuf type {@code pb.BlockLimitSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.BlockLimitSpec) + pb.Chaosdaemon.BlockLimitSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_BlockLimitSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_BlockLimitSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.BlockLimitSpec.class, pb.Chaosdaemon.BlockLimitSpec.Builder.class); + } + + // Construct using pb.Chaosdaemon.BlockLimitSpec.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(); + quota_ = 0L; + + periodUs_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_BlockLimitSpec_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.BlockLimitSpec getDefaultInstanceForType() { + return pb.Chaosdaemon.BlockLimitSpec.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.BlockLimitSpec build() { + pb.Chaosdaemon.BlockLimitSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.BlockLimitSpec buildPartial() { + pb.Chaosdaemon.BlockLimitSpec result = new pb.Chaosdaemon.BlockLimitSpec(this); + result.quota_ = quota_; + result.periodUs_ = periodUs_; + 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 pb.Chaosdaemon.BlockLimitSpec) { + return mergeFrom((pb.Chaosdaemon.BlockLimitSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.BlockLimitSpec other) { + if (other == pb.Chaosdaemon.BlockLimitSpec.getDefaultInstance()) return this; + if (other.getQuota() != 0L) { + setQuota(other.getQuota()); + } + if (other.getPeriodUs() != 0L) { + setPeriodUs(other.getPeriodUs()); + } + 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 { + pb.Chaosdaemon.BlockLimitSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.BlockLimitSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long quota_ ; + /** + * uint64 quota = 1; + * @return The quota. + */ + @java.lang.Override + public long getQuota() { + return quota_; + } + /** + * uint64 quota = 1; + * @param value The quota to set. + * @return This builder for chaining. + */ + public Builder setQuota(long value) { + + quota_ = value; + onChanged(); + return this; + } + /** + * uint64 quota = 1; + * @return This builder for chaining. + */ + public Builder clearQuota() { + + quota_ = 0L; + onChanged(); + return this; + } + + private long periodUs_ ; + /** + * uint64 period_us = 2; + * @return The periodUs. + */ + @java.lang.Override + public long getPeriodUs() { + return periodUs_; + } + /** + * uint64 period_us = 2; + * @param value The periodUs to set. + * @return This builder for chaining. + */ + public Builder setPeriodUs(long value) { + + periodUs_ = value; + onChanged(); + return this; + } + /** + * uint64 period_us = 2; + * @return This builder for chaining. + */ + public Builder clearPeriodUs() { + + periodUs_ = 0L; + 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:pb.BlockLimitSpec) + } + + // @@protoc_insertion_point(class_scope:pb.BlockLimitSpec) + private static final pb.Chaosdaemon.BlockLimitSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.BlockLimitSpec(); + } + + public static pb.Chaosdaemon.BlockLimitSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BlockLimitSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BlockLimitSpec(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 pb.Chaosdaemon.BlockLimitSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ApplyBlockChaosResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.ApplyBlockChaosResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 injection_id = 1; + * @return The injectionId. + */ + int getInjectionId(); + } + /** + * Protobuf type {@code pb.ApplyBlockChaosResponse} + */ + public static final class ApplyBlockChaosResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.ApplyBlockChaosResponse) + ApplyBlockChaosResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyBlockChaosResponse.newBuilder() to construct. + private ApplyBlockChaosResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApplyBlockChaosResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApplyBlockChaosResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplyBlockChaosResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + injectionId_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyBlockChaosResponse.class, pb.Chaosdaemon.ApplyBlockChaosResponse.Builder.class); + } + + public static final int INJECTION_ID_FIELD_NUMBER = 1; + private int injectionId_; + /** + * int32 injection_id = 1; + * @return The injectionId. + */ + @java.lang.Override + public int getInjectionId() { + return injectionId_; + } + + 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 (injectionId_ != 0) { + output.writeInt32(1, injectionId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (injectionId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, injectionId_); + } + 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 pb.Chaosdaemon.ApplyBlockChaosResponse)) { + return super.equals(obj); + } + pb.Chaosdaemon.ApplyBlockChaosResponse other = (pb.Chaosdaemon.ApplyBlockChaosResponse) obj; + + if (getInjectionId() + != other.getInjectionId()) 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) + INJECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getInjectionId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse 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 pb.Chaosdaemon.ApplyBlockChaosResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse 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 pb.Chaosdaemon.ApplyBlockChaosResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.ApplyBlockChaosResponse 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(pb.Chaosdaemon.ApplyBlockChaosResponse 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; + } + /** + * Protobuf type {@code pb.ApplyBlockChaosResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.ApplyBlockChaosResponse) + pb.Chaosdaemon.ApplyBlockChaosResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.ApplyBlockChaosResponse.class, pb.Chaosdaemon.ApplyBlockChaosResponse.Builder.class); + } + + // Construct using pb.Chaosdaemon.ApplyBlockChaosResponse.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(); + injectionId_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_ApplyBlockChaosResponse_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosResponse getDefaultInstanceForType() { + return pb.Chaosdaemon.ApplyBlockChaosResponse.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosResponse build() { + pb.Chaosdaemon.ApplyBlockChaosResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.ApplyBlockChaosResponse buildPartial() { + pb.Chaosdaemon.ApplyBlockChaosResponse result = new pb.Chaosdaemon.ApplyBlockChaosResponse(this); + result.injectionId_ = injectionId_; + 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 pb.Chaosdaemon.ApplyBlockChaosResponse) { + return mergeFrom((pb.Chaosdaemon.ApplyBlockChaosResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.ApplyBlockChaosResponse other) { + if (other == pb.Chaosdaemon.ApplyBlockChaosResponse.getDefaultInstance()) return this; + if (other.getInjectionId() != 0) { + setInjectionId(other.getInjectionId()); + } + 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 { + pb.Chaosdaemon.ApplyBlockChaosResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.ApplyBlockChaosResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int injectionId_ ; + /** + * int32 injection_id = 1; + * @return The injectionId. + */ + @java.lang.Override + public int getInjectionId() { + return injectionId_; + } + /** + * int32 injection_id = 1; + * @param value The injectionId to set. + * @return This builder for chaining. + */ + public Builder setInjectionId(int value) { + + injectionId_ = value; + onChanged(); + return this; + } + /** + * int32 injection_id = 1; + * @return This builder for chaining. + */ + public Builder clearInjectionId() { + + injectionId_ = 0; + 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:pb.ApplyBlockChaosResponse) + } + + // @@protoc_insertion_point(class_scope:pb.ApplyBlockChaosResponse) + private static final pb.Chaosdaemon.ApplyBlockChaosResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.ApplyBlockChaosResponse(); + } + + public static pb.Chaosdaemon.ApplyBlockChaosResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyBlockChaosResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplyBlockChaosResponse(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 pb.Chaosdaemon.ApplyBlockChaosResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RecoverBlockChaosRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pb.RecoverBlockChaosRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 injection_id = 1; + * @return The injectionId. + */ + int getInjectionId(); + } + /** + * Protobuf type {@code pb.RecoverBlockChaosRequest} + */ + public static final class RecoverBlockChaosRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pb.RecoverBlockChaosRequest) + RecoverBlockChaosRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecoverBlockChaosRequest.newBuilder() to construct. + private RecoverBlockChaosRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecoverBlockChaosRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecoverBlockChaosRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecoverBlockChaosRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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: { + + injectionId_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 pb.Chaosdaemon.internal_static_pb_RecoverBlockChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_RecoverBlockChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.RecoverBlockChaosRequest.class, pb.Chaosdaemon.RecoverBlockChaosRequest.Builder.class); + } + + public static final int INJECTION_ID_FIELD_NUMBER = 1; + private int injectionId_; + /** + * int32 injection_id = 1; + * @return The injectionId. + */ + @java.lang.Override + public int getInjectionId() { + return injectionId_; + } + + 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 (injectionId_ != 0) { + output.writeInt32(1, injectionId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (injectionId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, injectionId_); + } + 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 pb.Chaosdaemon.RecoverBlockChaosRequest)) { + return super.equals(obj); + } + pb.Chaosdaemon.RecoverBlockChaosRequest other = (pb.Chaosdaemon.RecoverBlockChaosRequest) obj; + + if (getInjectionId() + != other.getInjectionId()) 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) + INJECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getInjectionId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest 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 pb.Chaosdaemon.RecoverBlockChaosRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest 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 pb.Chaosdaemon.RecoverBlockChaosRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pb.Chaosdaemon.RecoverBlockChaosRequest 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(pb.Chaosdaemon.RecoverBlockChaosRequest 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; + } + /** + * Protobuf type {@code pb.RecoverBlockChaosRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pb.RecoverBlockChaosRequest) + pb.Chaosdaemon.RecoverBlockChaosRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pb.Chaosdaemon.internal_static_pb_RecoverBlockChaosRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pb.Chaosdaemon.internal_static_pb_RecoverBlockChaosRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pb.Chaosdaemon.RecoverBlockChaosRequest.class, pb.Chaosdaemon.RecoverBlockChaosRequest.Builder.class); + } + + // Construct using pb.Chaosdaemon.RecoverBlockChaosRequest.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(); + injectionId_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pb.Chaosdaemon.internal_static_pb_RecoverBlockChaosRequest_descriptor; + } + + @java.lang.Override + public pb.Chaosdaemon.RecoverBlockChaosRequest getDefaultInstanceForType() { + return pb.Chaosdaemon.RecoverBlockChaosRequest.getDefaultInstance(); + } + + @java.lang.Override + public pb.Chaosdaemon.RecoverBlockChaosRequest build() { + pb.Chaosdaemon.RecoverBlockChaosRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pb.Chaosdaemon.RecoverBlockChaosRequest buildPartial() { + pb.Chaosdaemon.RecoverBlockChaosRequest result = new pb.Chaosdaemon.RecoverBlockChaosRequest(this); + result.injectionId_ = injectionId_; + 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 pb.Chaosdaemon.RecoverBlockChaosRequest) { + return mergeFrom((pb.Chaosdaemon.RecoverBlockChaosRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pb.Chaosdaemon.RecoverBlockChaosRequest other) { + if (other == pb.Chaosdaemon.RecoverBlockChaosRequest.getDefaultInstance()) return this; + if (other.getInjectionId() != 0) { + setInjectionId(other.getInjectionId()); + } + 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 { + pb.Chaosdaemon.RecoverBlockChaosRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pb.Chaosdaemon.RecoverBlockChaosRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int injectionId_ ; + /** + * int32 injection_id = 1; + * @return The injectionId. + */ + @java.lang.Override + public int getInjectionId() { + return injectionId_; + } + /** + * int32 injection_id = 1; + * @param value The injectionId to set. + * @return This builder for chaining. + */ + public Builder setInjectionId(int value) { + + injectionId_ = value; + onChanged(); + return this; + } + /** + * int32 injection_id = 1; + * @return This builder for chaining. + */ + public Builder clearInjectionId() { + + injectionId_ = 0; + 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:pb.RecoverBlockChaosRequest) + } + + // @@protoc_insertion_point(class_scope:pb.RecoverBlockChaosRequest) + private static final pb.Chaosdaemon.RecoverBlockChaosRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pb.Chaosdaemon.RecoverBlockChaosRequest(); + } + + public static pb.Chaosdaemon.RecoverBlockChaosRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecoverBlockChaosRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecoverBlockChaosRequest(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 pb.Chaosdaemon.RecoverBlockChaosRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_TcHandle_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_TcHandle_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ContainerRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ContainerRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ContainerResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ContainerResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_NetemRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_NetemRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_Netem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_Netem_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_TbfRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_TbfRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_Tbf_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_Tbf_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_QdiscRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_QdiscRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_Qdisc_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_Qdisc_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_EmatchFilterRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_EmatchFilterRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_EmatchFilter_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_EmatchFilter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_TcFilterRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_TcFilterRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_TcFilter_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_TcFilter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_IPSetsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_IPSetsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_IPSet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_IPSet_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_CidrAndPort_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_CidrAndPort_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_IptablesChainsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_IptablesChainsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_Chain_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_Chain_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_TimeRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_TimeRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ContainerAction_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ContainerAction_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ExecStressRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ExecStressRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ExecStressResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ExecStressResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_CancelStressRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_CancelStressRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ApplyIOChaosRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ApplyIOChaosRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ApplyIOChaosResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ApplyIOChaosResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ApplyHttpChaosRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ApplyHttpChaosRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ApplyHttpChaosResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ApplyHttpChaosResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_TcsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_TcsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_Tc_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_Tc_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_SetDNSServerRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_SetDNSServerRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_InstallJVMRulesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_InstallJVMRulesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_UninstallJVMRulesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_UninstallJVMRulesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ApplyBlockChaosRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ApplyBlockChaosRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_BlockDelaySpec_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_BlockDelaySpec_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_BlockLimitSpec_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_BlockLimitSpec_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_ApplyBlockChaosResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_ApplyBlockChaosResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pb_RecoverBlockChaosRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pb_RecoverBlockChaosRequest_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\021chaosdaemon.proto\022\002pb\032\033google/protobuf" + + "/empty.proto\"(\n\010TcHandle\022\r\n\005major\030\001 \001(\r\022" + + "\r\n\005minor\030\002 \001(\r\"M\n\020ContainerRequest\022#\n\006ac" + + "tion\030\001 \001(\0132\023.pb.ContainerAction\022\024\n\014conta" + + "iner_id\030\002 \001(\t\" \n\021ContainerResponse\022\013\n\003pi" + + "d\030\001 \001(\r\"z\n\014NetemRequest\022\030\n\005netem\030\001 \001(\0132\t" + + ".pb.Netem\022\024\n\014container_id\030\002 \001(\t\022\034\n\006handl" + + "e\030\003 \001(\0132\014.pb.TcHandle\022\034\n\006parent\030\004 \001(\0132\014." + + "pb.TcHandle\"\253\002\n\005Netem\022\014\n\004time\030\001 \001(\r\022\016\n\006j" + + "itter\030\002 \001(\r\022\022\n\ndelay_corr\030\003 \001(\002\022\r\n\005limit" + + "\030\004 \001(\r\022\014\n\004loss\030\005 \001(\002\022\021\n\tloss_corr\030\006 \001(\002\022" + + "\013\n\003gap\030\007 \001(\r\022\021\n\tduplicate\030\010 \001(\002\022\026\n\016dupli" + + "cate_corr\030\t \001(\002\022\017\n\007reorder\030\n \001(\002\022\024\n\014reor" + + "der_corr\030\013 \001(\002\022\017\n\007corrupt\030\014 \001(\002\022\024\n\014corru" + + "pt_corr\030\r \001(\002\022\034\n\006parent\030\016 \001(\0132\014.pb.TcHan" + + "dle\022\034\n\006handle\030\017 \001(\0132\014.pb.TcHandle\"8\n\nTbf" + + "Request\022\024\n\003tbf\030\001 \001(\0132\007.pb.Tbf\022\024\n\014contain" + + "er_id\030\002 \001(\t\"X\n\003Tbf\022\014\n\004rate\030\001 \001(\004\022\r\n\005limi" + + "t\030\002 \001(\r\022\016\n\006buffer\030\003 \001(\r\022\021\n\tpeak_rate\030\004 \001" + + "(\004\022\021\n\tmin_burst\030\005 \001(\r\">\n\014QdiscRequest\022\030\n" + + "\005qdisc\030\001 \001(\0132\t.pb.Qdisc\022\024\n\014container_id\030" + + "\002 \001(\t\"_\n\005Qdisc\022\034\n\006parent\030\001 \001(\0132\014.pb.TcHa" + + "ndle\022\034\n\006handle\030\002 \001(\0132\014.pb.TcHandle\022\014\n\004ty" + + "pe\030\003 \001(\t\022\014\n\004args\030\004 \003(\t\"M\n\023EmatchFilterRe" + + "quest\022 \n\006filter\030\001 \001(\0132\020.pb.EmatchFilter\022" + + "\024\n\014container_id\030\002 \001(\t\"Z\n\014EmatchFilter\022\r\n" + + "\005match\030\001 \001(\t\022\034\n\006parent\030\002 \001(\0132\014.pb.TcHand" + + "le\022\035\n\007classid\030\003 \001(\0132\014.pb.TcHandle\"E\n\017TcF" + + "ilterRequest\022\034\n\006filter\030\001 \001(\0132\014.pb.TcFilt" + + "er\022\024\n\014container_id\030\002 \001(\t\"(\n\010TcFilter\022\034\n\006" + + "parent\030\001 \001(\0132\014.pb.TcHandle\"Q\n\rIPSetsRequ" + + "est\022\031\n\006ipsets\030\001 \003(\0132\t.pb.IPSet\022\024\n\014contai" + + "ner_id\030\002 \001(\t\022\017\n\007enterNS\030\003 \001(\010\"n\n\005IPSet\022\014" + + "\n\004name\030\001 \001(\t\022\r\n\005cidrs\030\002 \003(\t\022\'\n\016cidr_and_" + + "ports\030\003 \003(\0132\017.pb.CidrAndPort\022\021\n\tset_name" + + "s\030\004 \003(\t\022\014\n\004type\030\005 \001(\t\")\n\013CidrAndPort\022\014\n\004" + + "cidr\030\001 \001(\t\022\014\n\004port\030\002 \001(\r\"Y\n\025IptablesChai" + + "nsRequest\022\031\n\006chains\030\001 \003(\0132\t.pb.Chain\022\024\n\014" + + "container_id\030\002 \001(\t\022\017\n\007enterNS\030\003 \001(\010\"\347\001\n\005" + + "Chain\022\014\n\004name\030\001 \001(\t\022&\n\tdirection\030\002 \001(\0162\023" + + ".pb.Chain.Direction\022\016\n\006ipsets\030\003 \003(\t\022\016\n\006t" + + "arget\030\004 \001(\t\022\020\n\010protocol\030\005 \001(\t\022\024\n\014source_" + + "ports\030\006 \001(\t\022\031\n\021destination_ports\030\007 \001(\t\022\021" + + "\n\ttcp_flags\030\010 \001(\t\022\016\n\006device\030\t \001(\t\"\"\n\tDir" + + "ection\022\t\n\005INPUT\020\000\022\n\n\006OUTPUT\020\001\"}\n\013TimeReq" + + "uest\022\024\n\014container_id\030\001 \001(\t\022\013\n\003sec\030\002 \001(\003\022" + + "\014\n\004nsec\030\003 \001(\003\022\024\n\014clk_ids_mask\030\004 \001(\004\022\013\n\003u" + + "id\030\005 \001(\t\022\032\n\022pod_container_name\030\006 \001(\t\"]\n\017" + + "ContainerAction\022*\n\006action\030\001 \001(\0162\032.pb.Con" + + "tainerAction.Action\"\036\n\006Action\022\010\n\004KILL\020\000\022" + + "\n\n\006GETPID\020\001\"\305\001\n\021ExecStressRequest\022*\n\005sco" + + "pe\030\001 \001(\0162\033.pb.ExecStressRequest.Scope\022\016\n" + + "\006target\030\002 \001(\t\022\024\n\014cpuStressors\030\003 \001(\t\022\017\n\007e" + + "nterNS\030\004 \001(\010\022\027\n\017memoryStressors\030\005 \001(\t\022\023\n" + + "\013oomScoreAdj\030\007 \001(\005\"\037\n\005Scope\022\r\n\tCONTAINER" + + "\020\000\022\007\n\003POD\020\001\"\243\001\n\022ExecStressResponse\022\023\n\013cp" + + "uInstance\030\001 \001(\t\022\024\n\014cpuStartTime\030\002 \001(\003\022\026\n" + + "\016memoryInstance\030\003 \001(\t\022\027\n\017memoryStartTime" + + "\030\004 \001(\003\022\026\n\016cpuInstanceUid\030\005 \001(\t\022\031\n\021memory" + + "InstanceUid\030\006 \001(\t\"\244\001\n\023CancelStressReques" + + "t\022\023\n\013cpuInstance\030\001 \001(\t\022\024\n\014cpuStartTime\030\002" + + " \001(\003\022\026\n\016memoryInstance\030\003 \001(\t\022\027\n\017memorySt" + + "artTime\030\004 \001(\003\022\026\n\016cpuInstanceUid\030\005 \001(\t\022\031\n" + + "\021memoryInstanceUid\030\006 \001(\t\"\230\001\n\023ApplyIOChao" + + "sRequest\022\017\n\007actions\030\001 \001(\t\022\016\n\006volume\030\002 \001(" + + "\t\022\024\n\014container_id\030\003 \001(\t\022\020\n\010instance\030\004 \001(" + + "\003\022\021\n\tstartTime\030\005 \001(\003\022\017\n\007enterNS\030\006 \001(\010\022\024\n" + + "\014instance_uid\030\007 \001(\t\"Q\n\024ApplyIOChaosRespo" + + "nse\022\020\n\010instance\030\001 \001(\003\022\021\n\tstartTime\030\002 \001(\003" + + "\022\024\n\014instance_uid\030\003 \001(\t\"\252\001\n\025ApplyHttpChao" + + "sRequest\022\r\n\005rules\030\001 \001(\t\022\023\n\013proxy_ports\030\002" + + " \003(\r\022\024\n\014container_id\030\003 \001(\t\022\020\n\010instance\030\004" + + " \001(\003\022\021\n\tstartTime\030\005 \001(\003\022\017\n\007enterNS\030\006 \001(\010" + + "\022\024\n\014instance_uid\030\007 \001(\t\022\013\n\003tls\030\010 \001(\t\"v\n\026A" + + "pplyHttpChaosResponse\022\020\n\010instance\030\001 \001(\003\022" + + "\021\n\tstartTime\030\002 \001(\003\022\022\n\nstatusCode\030\003 \001(\005\022\r" + + "\n\005error\030\004 \001(\t\022\024\n\014instance_uid\030\005 \001(\t\"H\n\nT" + + "csRequest\022\023\n\003tcs\030\001 \003(\0132\006.pb.Tc\022\024\n\014contai" + + "ner_id\030\002 \001(\t\022\017\n\007enterNS\030\004 \001(\010\"\314\001\n\002Tc\022\031\n\004" + + "type\030\001 \001(\0162\013.pb.Tc.Type\022\030\n\005netem\030\002 \001(\0132\t" + + ".pb.Netem\022\024\n\003tbf\030\003 \001(\0132\007.pb.Tbf\022\r\n\005ipset" + + "\030\004 \001(\t\022\020\n\010protocol\030\005 \001(\t\022\023\n\013source_port\030" + + "\006 \001(\t\022\023\n\013egress_port\030\007 \001(\t\022\016\n\006device\030\t \001" + + "(\t\" \n\004Type\022\t\n\005NETEM\020\000\022\r\n\tBANDWIDTH\020\001\"`\n\023" + + "SetDNSServerRequest\022\024\n\014container_id\030\001 \001(" + + "\t\022\022\n\ndns_server\030\002 \001(\t\022\016\n\006enable\030\003 \001(\010\022\017\n" + + "\007enterNS\030\004 \001(\010\"[\n\026InstallJVMRulesRequest" + + "\022\024\n\014container_id\030\001 \001(\t\022\014\n\004rule\030\002 \001(\t\022\014\n\004" + + "port\030\003 \001(\005\022\017\n\007enterNS\030\004 \001(\010\"]\n\030Uninstall" + + "JVMRulesRequest\022\024\n\014container_id\030\001 \001(\t\022\014\n" + + "\004rule\030\002 \001(\t\022\014\n\004port\030\003 \001(\005\022\017\n\007enterNS\030\004 \001" + + "(\010\"\277\001\n\026ApplyBlockChaosRequest\022\024\n\014contain" + + "er_id\030\001 \001(\t\022\023\n\013volume_path\030\002 \001(\t\0221\n\006acti" + + "on\030\003 \001(\0162!.pb.ApplyBlockChaosRequest.Act" + + "ion\022!\n\005delay\030\005 \001(\0132\022.pb.BlockDelaySpec\022\017" + + "\n\007enterNS\030\006 \001(\010\"\023\n\006Action\022\t\n\005Delay\020\000\"D\n\016" + + "BlockDelaySpec\022\r\n\005delay\030\001 \001(\003\022\023\n\013correla" + + "tion\030\002 \001(\001\022\016\n\006jitter\030\003 \001(\003\"2\n\016BlockLimit" + + "Spec\022\r\n\005quota\030\001 \001(\004\022\021\n\tperiod_us\030\002 \001(\004\"/" + + "\n\027ApplyBlockChaosResponse\022\024\n\014injection_i" + + "d\030\001 \001(\005\"0\n\030RecoverBlockChaosRequest\022\024\n\014i" + + "njection_id\030\001 \001(\0052\322\010\n\013ChaosDaemon\0222\n\006Set" + + "Tcs\022\016.pb.TcsRequest\032\026.google.protobuf.Em" + + "pty\"\000\022:\n\013FlushIPSets\022\021.pb.IPSetsRequest\032" + + "\026.google.protobuf.Empty\"\000\022H\n\021SetIptables" + + "Chains\022\031.pb.IptablesChainsRequest\032\026.goog" + + "le.protobuf.Empty\"\000\022:\n\rSetTimeOffset\022\017.p" + + "b.TimeRequest\032\026.google.protobuf.Empty\"\000\022" + + ">\n\021RecoverTimeOffset\022\017.pb.TimeRequest\032\026." + + "google.protobuf.Empty\"\000\022?\n\rContainerKill" + + "\022\024.pb.ContainerRequest\032\026.google.protobuf" + + ".Empty\"\000\022@\n\017ContainerGetPid\022\024.pb.Contain" + + "erRequest\032\025.pb.ContainerResponse\"\000\022@\n\rEx" + + "ecStressors\022\025.pb.ExecStressRequest\032\026.pb." + + "ExecStressResponse\"\000\022D\n\017CancelStressors\022" + + "\027.pb.CancelStressRequest\032\026.google.protob" + + "uf.Empty\"\000\022C\n\014ApplyIOChaos\022\027.pb.ApplyIOC" + + "haosRequest\032\030.pb.ApplyIOChaosResponse\"\000\022" + + "I\n\016ApplyHttpChaos\022\031.pb.ApplyHttpChaosReq" + + "uest\032\032.pb.ApplyHttpChaosResponse\"\000\022L\n\017Ap" + + "plyBlockChaos\022\032.pb.ApplyBlockChaosReques" + + "t\032\033.pb.ApplyBlockChaosResponse\"\000\022K\n\021Reco" + + "verBlockChaos\022\034.pb.RecoverBlockChaosRequ" + + "est\032\026.google.protobuf.Empty\"\000\022A\n\014SetDNSS" + + "erver\022\027.pb.SetDNSServerRequest\032\026.google." + + "protobuf.Empty\"\000\022G\n\017InstallJVMRules\022\032.pb" + + ".InstallJVMRulesRequest\032\026.google.protobu" + + "f.Empty\"\000\022K\n\021UninstallJVMRules\022\034.pb.Unin" + + "stallJVMRulesRequest\032\026.google.protobuf.E" + + "mpty\"\000b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.EmptyProto.getDescriptor(), + }); + internal_static_pb_TcHandle_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pb_TcHandle_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_TcHandle_descriptor, + new java.lang.String[] { "Major", "Minor", }); + internal_static_pb_ContainerRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pb_ContainerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ContainerRequest_descriptor, + new java.lang.String[] { "Action", "ContainerId", }); + internal_static_pb_ContainerResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pb_ContainerResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ContainerResponse_descriptor, + new java.lang.String[] { "Pid", }); + internal_static_pb_NetemRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pb_NetemRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_NetemRequest_descriptor, + new java.lang.String[] { "Netem", "ContainerId", "Handle", "Parent", }); + internal_static_pb_Netem_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_pb_Netem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_Netem_descriptor, + new java.lang.String[] { "Time", "Jitter", "DelayCorr", "Limit", "Loss", "LossCorr", "Gap", "Duplicate", "DuplicateCorr", "Reorder", "ReorderCorr", "Corrupt", "CorruptCorr", "Parent", "Handle", }); + internal_static_pb_TbfRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_pb_TbfRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_TbfRequest_descriptor, + new java.lang.String[] { "Tbf", "ContainerId", }); + internal_static_pb_Tbf_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_pb_Tbf_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_Tbf_descriptor, + new java.lang.String[] { "Rate", "Limit", "Buffer", "PeakRate", "MinBurst", }); + internal_static_pb_QdiscRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_pb_QdiscRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_QdiscRequest_descriptor, + new java.lang.String[] { "Qdisc", "ContainerId", }); + internal_static_pb_Qdisc_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_pb_Qdisc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_Qdisc_descriptor, + new java.lang.String[] { "Parent", "Handle", "Type", "Args", }); + internal_static_pb_EmatchFilterRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_pb_EmatchFilterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_EmatchFilterRequest_descriptor, + new java.lang.String[] { "Filter", "ContainerId", }); + internal_static_pb_EmatchFilter_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_pb_EmatchFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_EmatchFilter_descriptor, + new java.lang.String[] { "Match", "Parent", "Classid", }); + internal_static_pb_TcFilterRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_pb_TcFilterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_TcFilterRequest_descriptor, + new java.lang.String[] { "Filter", "ContainerId", }); + internal_static_pb_TcFilter_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_pb_TcFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_TcFilter_descriptor, + new java.lang.String[] { "Parent", }); + internal_static_pb_IPSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_pb_IPSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_IPSetsRequest_descriptor, + new java.lang.String[] { "Ipsets", "ContainerId", "EnterNS", }); + internal_static_pb_IPSet_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_pb_IPSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_IPSet_descriptor, + new java.lang.String[] { "Name", "Cidrs", "CidrAndPorts", "SetNames", "Type", }); + internal_static_pb_CidrAndPort_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_pb_CidrAndPort_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_CidrAndPort_descriptor, + new java.lang.String[] { "Cidr", "Port", }); + internal_static_pb_IptablesChainsRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_pb_IptablesChainsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_IptablesChainsRequest_descriptor, + new java.lang.String[] { "Chains", "ContainerId", "EnterNS", }); + internal_static_pb_Chain_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_pb_Chain_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_Chain_descriptor, + new java.lang.String[] { "Name", "Direction", "Ipsets", "Target", "Protocol", "SourcePorts", "DestinationPorts", "TcpFlags", "Device", }); + internal_static_pb_TimeRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_pb_TimeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_TimeRequest_descriptor, + new java.lang.String[] { "ContainerId", "Sec", "Nsec", "ClkIdsMask", "Uid", "PodContainerName", }); + internal_static_pb_ContainerAction_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_pb_ContainerAction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ContainerAction_descriptor, + new java.lang.String[] { "Action", }); + internal_static_pb_ExecStressRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_pb_ExecStressRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ExecStressRequest_descriptor, + new java.lang.String[] { "Scope", "Target", "CpuStressors", "EnterNS", "MemoryStressors", "OomScoreAdj", }); + internal_static_pb_ExecStressResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_pb_ExecStressResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ExecStressResponse_descriptor, + new java.lang.String[] { "CpuInstance", "CpuStartTime", "MemoryInstance", "MemoryStartTime", "CpuInstanceUid", "MemoryInstanceUid", }); + internal_static_pb_CancelStressRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_pb_CancelStressRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_CancelStressRequest_descriptor, + new java.lang.String[] { "CpuInstance", "CpuStartTime", "MemoryInstance", "MemoryStartTime", "CpuInstanceUid", "MemoryInstanceUid", }); + internal_static_pb_ApplyIOChaosRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_pb_ApplyIOChaosRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ApplyIOChaosRequest_descriptor, + new java.lang.String[] { "Actions", "Volume", "ContainerId", "Instance", "StartTime", "EnterNS", "InstanceUid", }); + internal_static_pb_ApplyIOChaosResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_pb_ApplyIOChaosResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ApplyIOChaosResponse_descriptor, + new java.lang.String[] { "Instance", "StartTime", "InstanceUid", }); + internal_static_pb_ApplyHttpChaosRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_pb_ApplyHttpChaosRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ApplyHttpChaosRequest_descriptor, + new java.lang.String[] { "Rules", "ProxyPorts", "ContainerId", "Instance", "StartTime", "EnterNS", "InstanceUid", "Tls", }); + internal_static_pb_ApplyHttpChaosResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_pb_ApplyHttpChaosResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ApplyHttpChaosResponse_descriptor, + new java.lang.String[] { "Instance", "StartTime", "StatusCode", "Error", "InstanceUid", }); + internal_static_pb_TcsRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_pb_TcsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_TcsRequest_descriptor, + new java.lang.String[] { "Tcs", "ContainerId", "EnterNS", }); + internal_static_pb_Tc_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_pb_Tc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_Tc_descriptor, + new java.lang.String[] { "Type", "Netem", "Tbf", "Ipset", "Protocol", "SourcePort", "EgressPort", "Device", }); + internal_static_pb_SetDNSServerRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_pb_SetDNSServerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_SetDNSServerRequest_descriptor, + new java.lang.String[] { "ContainerId", "DnsServer", "Enable", "EnterNS", }); + internal_static_pb_InstallJVMRulesRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_pb_InstallJVMRulesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_InstallJVMRulesRequest_descriptor, + new java.lang.String[] { "ContainerId", "Rule", "Port", "EnterNS", }); + internal_static_pb_UninstallJVMRulesRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_pb_UninstallJVMRulesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_UninstallJVMRulesRequest_descriptor, + new java.lang.String[] { "ContainerId", "Rule", "Port", "EnterNS", }); + internal_static_pb_ApplyBlockChaosRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_pb_ApplyBlockChaosRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ApplyBlockChaosRequest_descriptor, + new java.lang.String[] { "ContainerId", "VolumePath", "Action", "Delay", "EnterNS", }); + internal_static_pb_BlockDelaySpec_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_pb_BlockDelaySpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_BlockDelaySpec_descriptor, + new java.lang.String[] { "Delay", "Correlation", "Jitter", }); + internal_static_pb_BlockLimitSpec_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_pb_BlockLimitSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_BlockLimitSpec_descriptor, + new java.lang.String[] { "Quota", "PeriodUs", }); + internal_static_pb_ApplyBlockChaosResponse_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_pb_ApplyBlockChaosResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_ApplyBlockChaosResponse_descriptor, + new java.lang.String[] { "InjectionId", }); + internal_static_pb_RecoverBlockChaosRequest_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_pb_RecoverBlockChaosRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pb_RecoverBlockChaosRequest_descriptor, + new java.lang.String[] { "InjectionId", }); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ChaosAfterAspect.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ChaosAfterAspect.java new file mode 100644 index 000000000..96a96a9d1 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ChaosAfterAspect.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect; + +import com.xiaomi.youpin.docean.aop.ProceedingJoinPoint; +import com.xiaomi.youpin.docean.aop.anno.After; +import com.xiaomi.youpin.docean.aop.anno.Aspect; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.aspect.anno.ChaosAfter; +import run.mone.chaos.operator.bo.CreateChaosTaskBo; +import run.mone.chaos.operator.common.Config; +import run.mone.chaos.operator.service.RedisCacheService; + +import javax.annotation.Resource; + +@Aspect +@Slf4j +public class ChaosAfterAspect { + + @Resource + private RedisCacheService cache; + @After(anno = ChaosAfter.class) + public Object after(ProceedingJoinPoint joinPoint) { + // TODO: 执行完成后解锁 + log.info("after!"); + //chaosReentrantUnLock(args); + return joinPoint.getRes(); + } + + private void chaosReentrantUnLock(Object[] args) { + String isReentrantLock = Config.ins().get("enableChaosReentrantLock", "false"); + if (isReentrantLock.equals("true")) { + for (Object arg : args) { + if (arg instanceof CreateChaosTaskBo pipelineBO) { + Integer pipelineId = pipelineBO.getPipelineId(); + Long duration = pipelineBO.getDuration(); + Integer projectId = pipelineBO.getProjectId(); + StringBuilder sb = new StringBuilder(); + String key = sb.append(projectId).append("-").append(pipelineId).toString(); + log.info("begin unlock key:{}",key); + if (cache.unlock(key)) { + throw new IllegalArgumentException("该实验已结束或未进行过实验!"); + } + } + } + } + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ChaosReportAspect.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ChaosReportAspect.java new file mode 100644 index 000000000..4860e0300 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ChaosReportAspect.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect; + +import com.google.gson.Gson; +import com.xiaomi.youpin.docean.aop.ProceedingJoinPoint; +import com.xiaomi.youpin.docean.aop.anno.After; +import com.xiaomi.youpin.docean.aop.anno.Aspect; +import lombok.extern.slf4j.Slf4j; +import org.bson.types.ObjectId; +import run.mone.chaos.operator.aspect.anno.GenerateReport; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.domain.ChaosTaskReport; +import run.mone.chaos.operator.dao.impl.ChaosTaskReportDao; +import run.mone.chaos.operator.service.ChaosTaskService; +import run.mone.chaos.operator.vo.ChaosTaskDetailVO; + +import javax.annotation.Resource; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 14:54 + */ +@Aspect +@Slf4j +public class ChaosReportAspect { + + @Resource + private ChaosTaskService taskService; + + @Resource + private ChaosTaskReportDao chaosTaskReportDao; + + private static final Gson gson = new Gson(); + + @After(anno = GenerateReport.class) + public String generateReport(ProceedingJoinPoint joinPoint) { + String id = (String) joinPoint.getRes(); + if (!ObjectId.isValid(id)) { + return id; + } + ChaosTask chaosTaskById = taskService.getChaosTaskById(id); + if (chaosTaskById == null) { + log.error("chaosTask not found,id:{}", id); + return "chaosTask not found"; + } + + if (chaosTaskById.getStatus() != StatusEnum.recovered.type() && chaosTaskById.getStatus() != StatusEnum.fail.type()) { + log.info("chaosTask status is not recovered or fail,status:{}", chaosTaskById.getStatus()); + return chaosTaskById.getId().toString(); + } + log.info("chaosTask begin generate report:{}", id); + ChaosTaskReport report = ChaosTaskReport.of(chaosTaskById); + ChaosTaskDetailVO chaosTaskDetail = taskService.getChaosTaskDetail(id); + report.setSnapshot(gson.toJson(chaosTaskDetail)); + return chaosTaskReportDao.createReport(report); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/MetricRecordAspect.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/MetricRecordAspect.java new file mode 100644 index 000000000..7dd28b77d --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/MetricRecordAspect.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect; + +import com.xiaomi.youpin.docean.aop.ProceedingJoinPoint; +import com.xiaomi.youpin.docean.aop.anno.Aspect; +import com.xiaomi.youpin.docean.aop.anno.Before; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.aspect.anno.MetricRecord; + +@Aspect +@Slf4j +public class MetricRecordAspect { + //TODO:完善 + @Before(anno = MetricRecord.class) + public Object before(ProceedingJoinPoint joinPoint) { + return null; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ParamValidateAspect.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ParamValidateAspect.java new file mode 100644 index 000000000..8da48f861 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/ParamValidateAspect.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect; + + +import com.xiaomi.youpin.docean.aop.ProceedingJoinPoint; +import com.xiaomi.youpin.docean.aop.anno.After; +import com.xiaomi.youpin.docean.aop.anno.Aspect; +import com.xiaomi.youpin.docean.aop.anno.Before; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.aspect.anno.ParamValidate; +import run.mone.chaos.operator.bo.BaseBO; +import run.mone.chaos.operator.bo.CreateChaosTaskBo; +import run.mone.chaos.operator.common.Config; +import run.mone.chaos.operator.service.RedisCacheService; + +import javax.annotation.Resource; +import java.util.Optional; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-25 14:20 + */ +@Aspect +@Slf4j +public class ParamValidateAspect { + + @Resource + private RedisCacheService cache; + + public static final String STOP_KEY = "isStopAll"; + + @Before(anno = ParamValidate.class) + public Object before(ProceedingJoinPoint joinPoint) { + if (Config.ins().get(STOP_KEY, "false").equals("true")) { + throw new IllegalArgumentException("全局暂停实验中,请联系:" + Config.ins().get("admin", "") + "开启实验"); + } + Object[] args = joinPoint.getArgs(); + for (Object arg : args) { + if (arg instanceof BaseBO baseBO) { + Optional validate = baseBO.paramValidate(); + if (validate.isPresent()) { + throw new IllegalArgumentException(validate.get()); + } + } + } + return Optional.empty(); + } + + + /* private void chaosReentrantLock(Object[] args) { + String isReentrantLock = Config.ins().get("enableChaosReentrantLock", "false"); + if (isReentrantLock.equals("true")) { + for (Object arg : args) { + if (arg instanceof CreateChaosTaskBo pipelineBO) { + Integer pipelineId = pipelineBO.getPipelineId(); + Long duration = pipelineBO.getDuration(); + Integer projectId = pipelineBO.getProjectId(); + StringBuilder sb = new StringBuilder(); + String key = sb.append(projectId).append("-").append(pipelineId).toString(); + log.info("begin lock key:{}",key); + if (cache.lock(key,duration)) { + throw new IllegalArgumentException("当前项目流水线内实例有重复的混沌实验!"); + } + } + } + } + }*/ + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/ChaosAfter.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/ChaosAfter.java new file mode 100644 index 000000000..09c626162 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/ChaosAfter.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect.anno; + +import java.lang.annotation.*; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/15 10:35 + */ + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ChaosAfter { + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/GenerateReport.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/GenerateReport.java new file mode 100644 index 000000000..1a6edd2dd --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/GenerateReport.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect.anno; + +import java.lang.annotation.*; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 15:01 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface GenerateReport { + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/MetricRecord.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/MetricRecord.java new file mode 100644 index 000000000..8c84cfc3f --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/MetricRecord.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect.anno; + +import java.lang.annotation.*; + +/** + * @author zhangxiaowei6 + * @Date 2024/1/25 11:16 + */ + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface MetricRecord { + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/ParamValidate.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/ParamValidate.java new file mode 100644 index 000000000..32fc7bf9b --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/aspect/anno/ParamValidate.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.aspect.anno; + +import java.lang.annotation.*; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-25 15:46 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ParamValidate { + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/BaseBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/BaseBO.java new file mode 100644 index 000000000..be5e6316e --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/BaseBO.java @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import run.mone.chaos.operator.dto.page.PageData; + +import java.io.Serializable; +import java.util.Optional; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/15 11:17 + */ +public abstract class BaseBO implements Serializable { + private Integer page; + private Integer pageSize; + + public PageData buildPageData() { + return buildPageData(100); + } + + public PageData buildPageData(int maxPageSize) { + PageData pageData = new PageData<>(); + if (page == null) { + page = 1; + } + if (pageSize == null) { + pageSize = 100; + } + if (page <= 0) { + pageData.setPage(1); + } else { + pageData.setPage(page); + } + //设置最大页 + if (pageSize <= 0) { + pageData.setPageSize(100); + } else if (pageSize <= maxPageSize) { + pageData.setPageSize(pageSize); + } else { + pageData.setPageSize(maxPageSize); + } + return pageData; + } + + public Optional paramValidate() { + return Optional.empty(); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/ChaosMetricsBo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/ChaosMetricsBo.java new file mode 100644 index 000000000..f0d12ecce --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/ChaosMetricsBo.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/17 10:30 + */ + +@Data +public class ChaosMetricsBo implements Serializable { + + private Integer pipelineId; + + private Integer projectId; + + private String startTime; + + private String endTime; + + private String taskType; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/ChaosTaskBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/ChaosTaskBO.java new file mode 100644 index 000000000..e7d41ced1 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/ChaosTaskBO.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/15 11:31 + */ + +@Data +public class ChaosTaskBO extends PipelineBO implements Serializable { + + private Integer status; + + private Integer taskType; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/CreateChaosTaskBo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/CreateChaosTaskBo.java new file mode 100644 index 000000000..1aae4bed8 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/CreateChaosTaskBo.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import run.mone.chaos.operator.constant.ModeEnum; + +import java.io.Serializable; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * @author caobaoyu + * @description: 用于创建任务 + * @date 2024-04-11 10:59 + */ +@Data +public class CreateChaosTaskBo extends BaseBO implements Serializable { + + private String id; + + private String experimentName; + + private Integer pipelineId; + + private Integer projectId; + + private String projectName; + + private Integer mode; + + private Integer containerNum; + + private List podIpList; + + private Integer executedTimes; + + /** + * 运行时长 + */ + private Long duration; + + private Integer taskType; + + private String containerName; + + private String operateParam; + + private String createUser; + + @Override + public Optional paramValidate() { + if (StringUtils.isBlank(experimentName)) { + return Optional.of("experimentName is required"); + } + if (Objects.isNull(pipelineId)) { + return Optional.of("pipelineId is required"); + } + if (StringUtils.isBlank(projectName)) { + return Optional.of("projectName is required"); + } + // 指定ip的情况下,ip不能为空 + if (null != ModeEnum.fromType(mode) && Objects.equals(ModeEnum.fromType(mode), ModeEnum.APPOINT) && CollectionUtils.isEmpty(podIpList)) { + return Optional.of("podIpList is required"); + } + + // 随机模式下,容器数量如果为空,则默认设置为1 + if (ModeEnum.ANY.equals(ModeEnum.fromType(mode)) && ObjectUtils.isEmpty(containerNum)) { + containerNum = 1; + } + + if (ObjectUtils.isEmpty(taskType)) { + return Optional.of("taskType is required"); + } + if (StringUtils.isBlank(operateParam)) { + return Optional.of("operateParam is required"); + } + if (ObjectUtils.isEmpty(duration)) { + return Optional.of("duration is required"); + } + if (ObjectUtils.isEmpty(containerName)) { + return Optional.of("container is required"); + } + + return super.paramValidate(); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/IOBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/IOBO.java new file mode 100644 index 000000000..00c16be57 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/IOBO.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/13 14:20 + */ +@Data +public class IOBO extends PipelineBO implements Serializable { + private String type; + private String path; + private List methods; + private Integer percent; + private String latency; + private String volume; + private String id; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/JvmBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/JvmBO.java new file mode 100644 index 000000000..859e5bff3 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/JvmBO.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhangping17 + */ +@Data +public class JvmBO extends PipelineBO implements Serializable { + private String id; + + private String clName; + + private String methodName; + + private Integer delay; + + private String response; + + private Integer type; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/NetworkBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/NetworkBO.java new file mode 100644 index 000000000..e7872346c --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/NetworkBO.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhangping17 + */ +@Data +public class NetworkBO extends PipelineBO implements Serializable { + + private String dev; + + private Integer delayTime; + + private Integer lossPercent; + + private Integer corruptionPercent; + + private Integer duplicatesPercent; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/PipelineBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/PipelineBO.java new file mode 100644 index 000000000..19380fa53 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/PipelineBO.java @@ -0,0 +1,71 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import run.mone.chaos.operator.constant.ModeEnum; + +import java.io.Serializable; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * @author zhangping17 + */ +@Data +public class PipelineBO extends BaseBO implements Serializable { + + private String experimentName; + + private Integer pipelineId; + + private Integer projectId; + + private String projectName; + + private Integer mode; + + private List podIpList; + + /** + * 运行时长 + */ + private Long duration; + + @Override + public Optional paramValidate() { + if (StringUtils.isBlank(experimentName)) { + return Optional.of("experimentName is required"); + } + if (Objects.isNull(pipelineId)) { + return Optional.of("pipelineId is required"); + } + + if (null != ModeEnum.fromType(mode) && CollectionUtils.isEmpty(podIpList)) { + return Optional.of("podIpList is required"); + } + + if (ObjectUtils.isEmpty(duration)) { + return Optional.of("duration is required"); + } + + return super.paramValidate(); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/PodBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/PodBO.java new file mode 100644 index 000000000..c7a20b0d6 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/PodBO.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangping17 + */ +@Data +public class PodBO extends PipelineBO implements Serializable { + // killContainer、killPod、FailurePod + private String type; + private String containerName; + private String id; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/StressBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/StressBO.java new file mode 100644 index 000000000..b998b9113 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/StressBO.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhangping17 + */ +@Data +public class StressBO extends PipelineBO implements Serializable { + private String id; + + private Integer cpuNum; + + /** + * load CPU with P percent loading for the CPU stress workers. 0 is effectively a sleep (no load) and 100 is full loading. + */ + private Integer cpuLoad; + + private Integer vmNum; + + /** + * mmap N bytes per vm worker, the default is 256MB. + * One can specify the size as % of total available memory or in units of Bytes, KBytes, MBytes and GBytes using the suffix b, k, m or g. + */ + private Integer vmBytes; + + private String vmUnit; + + /** + * sleep N seconds before unmapping memory, the default is zero seconds. Specifying 0 will do an infinite wait. + */ + private Integer vmHang; + + /** + * 指定产生N个处理sync()函数的磁盘I/O进程,sync()用于将内存上的内容写到硬盘上 + */ + private Integer ioNum; + + /** + * start N workers continually writing, reading and removing temporary files. + * The default mode is to stress test sequential writes and reads. + * With the --aggressive option enabled without any --hdd-opts options the hdd stressor will work through all the --hdd-opt options one by one to cover a range of I/O options. + */ + private Integer hdd; + + /** + * write N bytes for each hdd process, the default is 1 GB. + * One can specify the size as % of free space on the file system or in units of Bytes, KBytes, MBytes and GBytes using the suffix b, k, m or g. + */ + private Integer hddBytes; + + private String hddUnit; + + /** + * stop stress test after T seconds. One can also specify the units of time in seconds, minutes, hours, days or years with the suffix s, m, h, d or y. + * Note: A timeout of 0 will run stress-ng without any timeouts (run forever) + */ + private Integer cpuTimeOut; + + private String cpuTimeOutUnit; + + private Integer vmTimeOut; + + private String vmTimeOutUnit; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/TaskQryParam.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/TaskQryParam.java new file mode 100644 index 000000000..f244947b5 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/TaskQryParam.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-02 16:58 + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class TaskQryParam extends ChaosTaskBO implements Serializable { + + private String creator; + + private String id; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/TimeBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/TimeBO.java new file mode 100644 index 000000000..03c0c06ad --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/TimeBO.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: 模拟时钟偏移实验BO + * @date 2024-01-03 14:59 + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class TimeBO extends PipelineBO implements Serializable { + + private String id; + + private Long timeOffset; + + private Long clkIdsMask; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/CreateBotCronBo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/CreateBotCronBo.java new file mode 100644 index 000000000..e8b253da8 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/CreateBotCronBo.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.chaosBot; + +import lombok.Data; + +/** + * @author zhangxiaowei6 + * @Date 2024/5/21 10:00 + */ + +@Data +public class CreateBotCronBo { + private String application; + private String id; + private Integer serverEnvId; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/M78CreateTaskBo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/M78CreateTaskBo.java new file mode 100644 index 000000000..4204a51bb --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/M78CreateTaskBo.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.chaosBot; + +import lombok.Builder; +import lombok.Data; + +/** + * @author zhangxiaowei6 + * @Date 2024/5/21 10:19 + */ + +@Data +@Builder +public class M78CreateTaskBo { + private String botId; + private String id; + private int taskType; + private String taskDescription; + private String taskName; + private String coreType; + private String timer; + private int scheduledTime; + private String userName; + private M78CreateTaskDetail taskDetail; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/M78CreateTaskDetail.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/M78CreateTaskDetail.java new file mode 100644 index 000000000..06d189ebf --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/M78CreateTaskDetail.java @@ -0,0 +1,27 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.chaosBot; + +import lombok.Data; + +/** + * @author zhangxiaowei6 + * @Date 2024/5/21 16:35 + */ + +@Data +public class M78CreateTaskDetail { +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/MimonitorAlarmBo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/MimonitorAlarmBo.java new file mode 100644 index 000000000..19dafefbe --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/chaosBot/MimonitorAlarmBo.java @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.chaosBot; + +import lombok.Builder; +import lombok.Data; + +/** + * @author zhangxiaowei6 + * @Date 2024/5/24 09:29 + */ + +@Data +@Builder +public class MimonitorAlarmBo { + private String user; + private String projectName; + private Integer projectId; + private Long iamId; + private String alertType; + private String strategyId; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpActionBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpActionBO.java new file mode 100644 index 000000000..03700b7a6 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpActionBO.java @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.http; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-18 10:51 + */ +@Data +public class HttpActionBO implements Serializable { + + private boolean abort; + + private String delay; + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpBO.java new file mode 100644 index 000000000..10aa6263f --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpBO.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.http; + +import lombok.Data; +import run.mone.chaos.operator.bo.PipelineBO; + +import java.io.Serializable; +import java.util.List; +import java.util.Optional; + +/** + * @author caobaoyu + * @description: http chaos + * @date 2023-12-04 14:01 + */ +@Data +public class HttpBO extends PipelineBO implements Serializable { + + private List proxy_ports; + + private List rules; + + private String tls; + + private String id; + + private Boolean isRecover; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpBaseRuleBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpBaseRuleBO.java new file mode 100644 index 000000000..401a91c6e --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpBaseRuleBO.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.http; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-18 10:55 + */ +@Data +public class HttpBaseRuleBO implements Serializable { + + private String target; + + private HttpSelectorBO selector; + + private HttpActionBO actions; + + private String instanceUid; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpSelectorBO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpSelectorBO.java new file mode 100644 index 000000000..d7a59eb06 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/http/HttpSelectorBO.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo.http; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Map; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-18 10:43 + */ +@Data +public class HttpSelectorBO implements Serializable { + + private Integer port; + + private String path; + + private String method; + + private Integer code; + + private Map requestHeaders; + + private Map responseHeaders; + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/restartPodListBo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/restartPodListBo.java new file mode 100644 index 000000000..d2b0f4956 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bo/restartPodListBo.java @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bo; + +import lombok.Data; + +import java.util.List; + +/** + * @author zhangxiaowei6 + */ +@Data +public class restartPodListBo { + private List podIpList; + + private Integer pipelineId; + + private Integer projectId; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bootstrap/ChaosBootstrap.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bootstrap/ChaosBootstrap.java new file mode 100644 index 000000000..8f6baa67c --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/bootstrap/ChaosBootstrap.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.bootstrap; + +import com.alibaba.nacos.api.config.listener.Listener; +import com.google.common.base.Stopwatch; +import com.xiaomi.youpin.docean.anno.RequestMapping; +import com.xiaomi.youpin.docean.aop.EnhanceInterceptor; +import com.xiaomi.youpin.docean.plugin.nacos.NacosConfig; +import com.xiaomi.youpin.docean.Aop; +import com.xiaomi.youpin.docean.Ioc; +import com.xiaomi.youpin.docean.Mvc; +import com.xiaomi.youpin.docean.config.HttpServerConfig; +import com.xiaomi.youpin.docean.mvc.DoceanHttpServer; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.common.Config; +import run.mone.chaos.operator.config.FilterConfiguration; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.concurrent.*; + +/** + * @author goodjava@qq.com + * @date 2022/6/7 15:02 + */ +@Slf4j +public class ChaosBootstrap { + + public static void main(String[] args) throws InterruptedException { + startHotUpdate(); + LinkedHashMap m = new LinkedHashMap<>(); + m.put(RequestMapping.class, new FilterConfiguration()); + Aop.ins().init(m); + Aop.ins().useAspect(Ioc.ins(), "run.mone.chaos.operator"); + Ioc.ins().init("run.mone.docean.plugin", "com.xiaomi.youpin.docean.plugin", "run.mone.chaos.operator"); + Mvc.ins(); + DoceanHttpServer server = new DoceanHttpServer(HttpServerConfig.builder().port(8998).websocket(false).build()); + /* Metrics.gauge("mone_chaos_start_time") + .set((double) System.currentTimeMillis() / 1000);*/ + server.start(); + } + + public static void startHotUpdate() { + long startTime = System.currentTimeMillis(); + try { + NacosConfig nacosConfig = new NacosConfig(); + nacosConfig.setDataId(Config.ins().get("nacos.config.data.id", "")); + nacosConfig.setGroup(Config.ins().get("nacos_config_group", "DEFAULT_GROUP")); + nacosConfig.setServerAddr(Config.ins().get("nacos.config.addrs", "")); + nacosConfig.init(); + nacosConfig.forEach(Config.ins()::set); + nacosConfig.addListener(nacosConfig.getDataId(), nacosConfig.getGroup(), new Listener() { + @Override + public Executor getExecutor() { + return null; + } + + @Override + public void receiveConfigInfo(String content) { + try { + log.info("receiveConfigInfo: {}", content); + Map configMap = new HashMap<>(); + + if (content != null && !content.isEmpty()) { + String[] perConfig = content.split("\n|\r\n"); + for (String it : perConfig) { + if (it == null || it.isEmpty() || it.startsWith("#")) { + continue; + } + int index = it.indexOf("="); + if (index > -1) { + configMap.put(it.substring(0, index), it.substring(index + 1)); + } + } + } + configMap.forEach(Config.ins()::set); + } catch (Exception e) { + log.error("receiveConfigInfo, s:{}, error:", content, e); + } + } + }); + log.info("update success ,cost: {}ms", System.currentTimeMillis() - startTime); + } catch (Exception e) { + log.error("update config error: {}", e); + } + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/Config.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/Config.java new file mode 100644 index 000000000..d9f8e60a4 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/Config.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.common; + +import lombok.extern.slf4j.Slf4j; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/12 14:22 + */ + +@Slf4j +public class Config { + private Properties properties; + + private Config() { + InputStream is = Config.class.getClassLoader().getResourceAsStream("config.properties"); + properties = new Properties(); + try { + properties.load(is); + } catch (IOException e) { + log.warn("load config error:{}", e.getMessage()); + } + } + + private final static class LazyHolder { + private static Config ins = new Config(); + } + + public final static Config ins() { + return LazyHolder.ins; + } + + public String get(String key, String defaultValue) { + return properties.getOrDefault(key, defaultValue).toString().trim(); + } + + + public void set(String key, String value) { + properties.setProperty(key, value); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/ContainerExec.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/ContainerExec.java new file mode 100644 index 000000000..376f4c8d9 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/ContainerExec.java @@ -0,0 +1,49 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.common; + +import com.xiaomi.youpin.docean.anno.Component; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.dsl.ExecWatch; +import lombok.extern.slf4j.Slf4j; + +/** + * @author zhangping17 + */ +@Slf4j +@Component +public class ContainerExec { + + @javax.annotation.Resource + private KubernetesClient kubernetesClient; + + public void exec(Pod pod, String[] args) { + try { + ExecWatch watch = kubernetesClient.pods() + .inNamespace(pod.getMetadata().getNamespace()) + .withName(pod.getMetadata().getName()) + //.inContainer(pod.getStatus().getContainerStatuses().get(0).getContainerID()) + .writingOutput(System.out) + .writingError(System.err) + .withTTY() + .exec(args); + log.info("pod exec success"); + } catch (Exception e) { + log.error("pod exec error,", e); + } + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/context/MoneUserContext.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/context/MoneUserContext.java new file mode 100644 index 000000000..2fe4e1238 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/common/context/MoneUserContext.java @@ -0,0 +1,41 @@ + +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.common.context; + +import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +import run.mone.chaos.operator.vo.UserInfoVo; + +/** + * @author hoho + */ +public class MoneUserContext { + + private static ThreadLocal currentUserHolder = new ThreadLocal<>(); + + public static void setCurrentUser(UserInfoVo userInfo) { + currentUserHolder.set(userInfo); + } + + public static UserInfoVo getCurrentUser() { + return currentUserHolder.get(); + } + + public static void clear() { + currentUserHolder.remove(); + } + +} \ No newline at end of file diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/config/FilterConfiguration.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/config/FilterConfiguration.java new file mode 100644 index 000000000..85a11374f --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/config/FilterConfiguration.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.config; + +import com.google.common.collect.Sets; +import com.xiaomi.hera.trace.context.TraceIdUtil; +import com.xiaomi.mone.log.common.Config; +import com.xiaomi.mone.tpc.login.filter.DoceanReqUserFilter; +import com.xiaomi.mone.tpc.login.util.ConstUtil; +import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +import com.xiaomi.youpin.docean.Ioc; +import com.xiaomi.youpin.docean.anno.Component; +import com.xiaomi.youpin.docean.aop.AopContext; +import com.xiaomi.youpin.docean.aop.EnhanceInterceptor; +import com.xiaomi.youpin.docean.mvc.ContextHolder; +import com.xiaomi.youpin.docean.mvc.MvcContext; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import run.mone.chaos.operator.common.context.MoneUserContext; + +import javax.annotation.Resource; +import java.lang.reflect.Method; +import java.util.*; +import java.util.stream.Collectors; + +@Slf4j +@Component +public class FilterConfiguration extends EnhanceInterceptor { + + @Resource + private DoceanReqUserFilter doceanReqUserFilter; + + public FilterConfiguration() { + doceanReqUserFilter = new DoceanReqUserFilter(); + Config config = Config.ins(); + Map map = new HashMap<>(); + map.put(ConstUtil.devMode, config.get("tpc.devMode", "false")); + map.put(ConstUtil.innerAuth, "true"); + //map.put(ConstUtil.authTokenUrl, config.get("auth_token_url", "http://127.0.0.1:8998/login/token/parse")); + map.put(ConstUtil.ignoreUrl, "/chaosApiTask/*"); + //map.put(ConstUtil.loginUrl, config.get("tpc_login_url", "")); + // map.put(ConstUtil.logoutUrl, config.get("tpc_logout_url", "")); + map.put(ConstUtil.PUBLIC_KEY_FILTER_INIT_PARAM_KEY, config.get("aegis.sdk.public.key", "")); + doceanReqUserFilter.init(map); + } + + private static final Integer MAX_LENGTH = 3000; + + + private String filterUrls = "";//((Config)Ioc.ins().getBean(Config.class)).get("filter_urls", ""); + + private static final Set TPC_HEADERS_URLS = Sets.newHashSet(); + + private List filterUrlList; + + { + filterUrlList = Arrays.stream(filterUrls.split(",")).distinct().collect(Collectors.toList()); + //TPC_HEADERS_URLS.add(SPACE_PAGE_URL); + } + + @Override + public void before(AopContext aopContext, Method method, Object[] args) { + /** + * User information will not be available in the context + */ + if (filterUrlList.contains(method.getName())) { + return; + } + MvcContext mvcContext = ContextHolder.getContext().get(); + try { + saveUserInfoThreadLocal(mvcContext); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private void saveUserInfoThreadLocal(MvcContext mvcContext) throws Exception { + AuthUserVo userVo = (AuthUserVo) mvcContext.session().getAttribute(ConstUtil.TPC_USER); + if (null == userVo && !doceanReqUserFilter.doFilter(mvcContext)) { + throw new Exception("please go to login"); + } + userVo = (AuthUserVo) mvcContext.session().getAttribute(ConstUtil.TPC_USER); + MoneUserContext.setCurrentUser(null); + } + + @Override + public Object after(AopContext context, Method method, Object res) { + solveResHeaders(); + clearThreadLocal(); + return super.after(context, method, res); + } + + private void solveResHeaders() { + MvcContext mvcContext = ContextHolder.getContext().get(); + mvcContext.getResHeaders().put("traceId", TraceIdUtil.traceId() == null ? StringUtils.EMPTY : TraceIdUtil.traceId()); + if (TPC_HEADERS_URLS.contains(mvcContext.getPath())) { + mvcContext.getResHeaders().put("tpc_home_url_head", ((Config)Ioc.ins().getBean(Config.class)).get("tpc_home_url_head", "https://127.0.0.1")); + } + } + + @Override + public void exception(AopContext context, Method method, Throwable ex) { + log.error("data exception,", ex); + clearThreadLocal(); + super.exception(context, method, ex); + } + + private void clearThreadLocal() { + MoneUserContext.clear(); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/config/MoneUser.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/config/MoneUser.java new file mode 100644 index 000000000..30ba6aeaf --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/config/MoneUser.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.config; + +import com.google.gson.annotations.SerializedName; +import lombok.Builder; +import lombok.Data; +import lombok.ToString; + +@Data +@ToString +@Builder +public class MoneUser { + + /** + * Username, such as: zhangsan + */ + @SerializedName("cas:user") + private String user; + + private String fullUser; + + /** + * Username, such as: Zhang San + */ + @SerializedName("cas:name") + private String name; + + /** + * User display name, such as: sa zhang Zhangsan + */ + @SerializedName("cas:displayName") + private String displayName; + + /** + * Department name + */ + @SerializedName("cas:departmentName") + private String departmentName; + + /** + * Email + */ + @SerializedName("cas:email") + private String email; + + /** + * miID + */ + @SerializedName("cas:miID") + private String miID; + + /** + * miID + */ + @SerializedName("cas:uid") + private String uID; + + /** + * avatar + */ + @SerializedName("cas:avatar") + private String avatar; + + private Boolean isAdmin; + + private String zone; + /** + * Last level department ID + */ + private String deptId; + + private String company; + + private Integer userType; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/CmdConstant.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/CmdConstant.java new file mode 100644 index 000000000..3d355dde6 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/CmdConstant.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; + +/** + * @author zhangping17 + */ +public class CmdConstant { + + public static final String BLANK_SPACE = " "; + + public static final String CPU = "--cpu" + BLANK_SPACE; + + public static final String CPU_LOAD = "-l";//"--cpu-load"; + + public static final String MEM_STRESS_SIZE = "--size" + BLANK_SPACE; + + public static final String MEM_STRESS_TIME = "--time" + BLANK_SPACE; + + public static final String MEM_STRESS_WORKER = "--workers 1"; + + public static final String VM = "--vm" + BLANK_SPACE; + + public static final String VM_BYTES = "--vm-bytes" + BLANK_SPACE; + + public static final String VM_HANG = "--vm-hang"; + + public static final String IO_NUM = "-i";//"--io"; + + public static final String HDD = "-d";//"--hdd"; + + public static final String HDD_BYTES = "--hdd-bytes"; + + public static final String TIMEOUT = "--timeout" + BLANK_SPACE; + + public static final String DIVISION = ","; + + public static final String TC_DELAY = "tc,qdisc,add,dev,%s,root,netem,delay,%dms"; + + public static final String TC_LOSS = "tc,qdisc,add,dev,%s,root,netem,loss,%d%%"; + + public static final String TC_CORRUPTION = "tc,qdisc,add,dev,%s,root,netem,corrupt,%d%%"; + + public static final String TC_DUPLICATES = "tc,qdisc,add,dev,%s,root,netem,duplicate,%d%%"; + + public static final String TC_DELETE = "tc,qdisc,del,dev,%s,root"; + + public static final String JVM_TEMPLATE = "RULE %s\n" + + "CLASS %s\n" + + "METHOD %s\n" + + "AT ENTRY\n" + + "IF true\n" + + "DO %s\n" + + "ENDRULE\n"; + + public static final String JVM_TEMPLATE_DELAY = "java.lang.Thread.sleep(%dL)"; + + public static final String JVM_TEMPLATE_GC = "System.gc()"; + + public static final String JVM_TEMPLATE_EXCEPTION = ""; + + public static final String JVM_TEMPLATE_RETURN = "return \"%s\""; + + public static final String JVM_FILE = "/tmp"; + + public static final String JVM_BTM = ".btm"; + + //内部PAUSE容器镜像 + public static final String POD_FAILURE_PAUSE_IMAGE = "micr.cloud.mioffice.cn/mixiao/mione-chaos-pause:v0.0.1"; + + //mione-chaos-containerName-podName-init/normal + public static final String POD_FAILURE_ANNOTATION = "mione-chaos-%s-%s-%s"; + + public static final String HTTP_TPROXY_CMD = "/usr/local/bin/tproxy -i -vv"; + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/HttpActionEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/HttpActionEnum.java new file mode 100644 index 000000000..812eb6f88 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/HttpActionEnum.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; +/** + * @author zhangxiaowei6 + * @Date 2023/12/20 15:58 + */ +public enum HttpActionEnum { + + ABORT(1, "abort"), + DELAY(2, "delay"), + ; + private int type; + private String typeName; + + HttpActionEnum(int type, String typeName) { + this.type = type; + this.typeName = typeName; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/HttpTargetEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/HttpTargetEnum.java new file mode 100644 index 000000000..c483d7940 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/HttpTargetEnum.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/20 15:58 + */ +public enum HttpTargetEnum { + REQUEST(1, "request"), + RESPONSE(2, "response"), + ; + private int type; + private String typeName; + + HttpTargetEnum(int type, String typeName) { + this.type = type; + this.typeName = typeName; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/JvmActionEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/JvmActionEnum.java new file mode 100644 index 000000000..c57cbd18e --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/JvmActionEnum.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; + +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; + +public enum JvmActionEnum { + + exception(0, "exception"), + re(1, "return"); + + private int type; + private String typeName; + + JvmActionEnum(int type, String typeName) { + this.type = type; + this.typeName = typeName; + } + + public int type() { + return this.type; + } + + public String typeName() { + return this.typeName; + } + + + public static JvmActionEnum fromType(Integer type) { + for (JvmActionEnum routeType : JvmActionEnum.values()) { + if (routeType.type == type) { + return routeType; + } + } + return null; + } + + public static Map toMap() { + Map map = new LinkedHashMap<>(); + JvmActionEnum[] values = values(); + Arrays.stream(values).forEach(i -> map.put(i.typeName(), i.type())); + return map; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/ModeEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/ModeEnum.java new file mode 100644 index 000000000..febc1e7a0 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/ModeEnum.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; + +/** + * @author zhangping17 + */ + +public enum ModeEnum { + // TODO 扩展fixed, percent + ANY(1, "any"), + ALL(2, "all"), + APPOINT(3, "appoint"); + + private int type; + private String typeName; + + ModeEnum(int type, String typeName) { + this.type = type; + this.typeName = typeName; + } + + public int type() { + return this.type; + } + + public String typeName() { + return this.typeName; + } + + + public static ModeEnum fromType(Integer type) { + for (ModeEnum routeType : ModeEnum.values()) { + if (null == type) { + return null; + } + if (routeType.type == type) { + return routeType; + } + } + return ANY; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/StatusEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/StatusEnum.java new file mode 100644 index 000000000..cf4013fc0 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/StatusEnum.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; + +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; + +public enum StatusEnum { + + un_know(-99, "un_know", "未知状态"), + + init(0, "init", "初始化"), + un_action(1, "un_action", "未执行"), + actioning(2, "actioning", "执行中"), + fail(3, "fail", "执行失败"), + recovered(4, "recovered", "已恢复"), + ; + + private int type; + private String typeName; + + private String desc; + + StatusEnum(int type, String typeName, String desc) { + this.type = type; + this.typeName = typeName; + this.desc = desc; + } + + public int type() { + return this.type; + } + + public String typeName() { + return this.typeName; + } + + + public static StatusEnum fromType(Integer type) { + for (StatusEnum routeType : StatusEnum.values()) { + if (routeType.type == type) { + return routeType; + } + } + return un_know; + } + + public static Map toMap() { + Map map = new LinkedHashMap<>(); + StatusEnum[] values = values(); + Arrays.stream(values).forEach(i -> map.put(i.desc, i.type)); + return map; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/TaskEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/TaskEnum.java new file mode 100644 index 000000000..f0dfcb3b7 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/TaskEnum.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant; + +import lombok.Getter; +import run.mone.chaos.operator.bo.*; +import run.mone.chaos.operator.bo.http.HttpBO; +import run.mone.chaos.operator.dao.domain.*; +import run.mone.chaos.operator.service.TaskBaseService; +import run.mone.chaos.operator.service.impl.*; + +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; + +public enum TaskEnum { + + un_know(-99, "unknow", null, null, null), + pod(4, "pod", PodBO.class, PodPO.class, PodChaosServiceImpl.class), + ; + private int type; + private String typeName; + + @Getter + private final Class boClass; + + @Getter + private final Class poClass; + + + @Getter + private final Class serviceClass; + + TaskEnum(int type, String typeName, Class bo, Class poClass, Class serviceClass) { + this.type = type; + this.typeName = typeName; + this.poClass = poClass; + this.boClass = bo; + this.serviceClass = serviceClass; + } + + + public int type() { + return this.type; + } + + public String typeName() { + return this.typeName; + } + + + public static TaskEnum fromType(Integer type) { + for (TaskEnum routeType : TaskEnum.values()) { + if (routeType.type == type) { + return routeType; + } + } + return un_know; + } + + public static Map toMap() { + Map map = new LinkedHashMap<>(); + TaskEnum[] values = values(); + Arrays.stream(values).forEach(i -> map.put(i.typeName(), i.type())); + return map; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/io/IOMethodEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/io/IOMethodEnum.java new file mode 100644 index 000000000..16be8ea6f --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/io/IOMethodEnum.java @@ -0,0 +1,49 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant.io; + +import java.util.Objects; + +public enum IOMethodEnum { + WRITE(1, "write"), + READ(2, "read"), + ; + + private int type; + private String typeName; + + IOMethodEnum(int type, String typeName) { + this.type = type; + this.typeName = typeName; + } + + public int type() { + return this.type; + } + + public String typeName() { + return this.typeName; + } + + public static boolean IsContainByTypeName(String typeName) { + for (IOMethodEnum routeType : IOMethodEnum.values()) { + if (Objects.equals(routeType.typeName, typeName)) { + return true; + } + } + return false; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/io/IOTypeEnum.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/io/IOTypeEnum.java new file mode 100644 index 000000000..034bbf708 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/constant/io/IOTypeEnum.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.constant.io; + +import java.util.Objects; + +/** + * @author zhangxiaowei6 + * @Date 2024/1/18 10:19 + */ + +public enum IOTypeEnum { + Latency(1, "latency"), + Fault(2, "fault"), + AttrOverride(3,"attrOverride"), + ; + + private int type; + private String typeName; + + IOTypeEnum(int type, String typeName) { + this.type = type; + this.typeName = typeName; + } + + public int type() { + return this.type; + } + + public String typeName() { + return this.typeName; + } + + public static boolean IsContainByTypeName(String typeName) { + for (IOTypeEnum routeType : IOTypeEnum.values()) { + if (Objects.equals(routeType.typeName, typeName)) { + return true; + } + } + return false; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosBackendController.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosBackendController.java new file mode 100644 index 000000000..ae16ccba7 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosBackendController.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.controller; + +import com.xiaomi.youpin.docean.anno.Controller; +import com.xiaomi.youpin.docean.anno.RequestMapping; +import com.xiaomi.youpin.docean.anno.RequestParam; +import com.xiaomi.youpin.docean.mvc.MvcResult; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.bo.chaosBot.CreateBotCronBo; +import run.mone.chaos.operator.bo.restartPodListBo; +import run.mone.chaos.operator.service.ChaosBackendService; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/18 17:06 + * @Desc 用于提供后台接口 + */ + +@Controller +@Slf4j +public class ChaosBackendController { + + @Resource + private ChaosBackendService backendService; + + // 用于recover失败,导致全局实验锁无法释放,提供解锁后台接口 + @RequestMapping(path = "/chaosBackend/deleteCacheKey", method = "get") + public MvcResult deleteCacheKey(@RequestParam(value = "id") String id) { + return backendService.deleteCacheKey(id); + } + + // 用于兜底,将传入的podIpList都进行重启 + @RequestMapping(path = "/chaosBackend/restartPodList") + public MvcResult restartPodList(restartPodListBo bo) { + return backendService.restartPodList(bo); + } + + //查询管理员 + @RequestMapping(path = "/chaosBackend/getAdmin", method = "get") + public MvcResult> getAdmin() { + return backendService.getAdmin(); + } + + // 后端服务可用性 + @RequestMapping(path = "/chaosBackend/getServiceAvailabilityUrl", method = "get") + public MvcResult getServiceAvailabilityUrl() { + + return backendService.getServiceAvailabilityUrl(); + } + + @RequestMapping(path = "/chaosBackend/getReentrantLockValue", method = "get") + public MvcResult getReentrantLockValue(@RequestParam(value = "projectId") Integer projectId,@RequestParam(value = "pipelineId") Integer pipelineId) { + return backendService.getReentrantLockValue(projectId,pipelineId); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosMetricsController.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosMetricsController.java new file mode 100644 index 000000000..b7b543f19 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosMetricsController.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.controller; + +import com.xiaomi.youpin.docean.anno.Controller; +import com.xiaomi.youpin.docean.anno.RequestMapping; +import com.xiaomi.youpin.docean.anno.RequestParam; +import com.xiaomi.youpin.docean.mvc.MvcResult; +import com.xiaomi.youpin.docean.plugin.config.anno.Value; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.bo.ChaosMetricsBo; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.service.ChaosMetricsService; +import run.mone.chaos.operator.vo.PodLogUrlVO; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/17 10:27 + */ +@Controller +@Slf4j +public class ChaosMetricsController { + + @Resource + private ChaosMetricsService chaosMetricsService; + + @RequestMapping(path = "/chaosMetrics/getGoingGrafanaUrl", method = "get") + public MvcResult> getGoingGrafanaUrl(@RequestParam(value = "id") String id, @RequestParam(value = "executedTimes") + int executedTimes, @RequestParam(value = "status") int status) { + MvcResult mvcResult = new MvcResult(); + String checkRes = preCheck(status, executedTimes); + if (!"ok".equals(checkRes)) { + log.info("getGoingGrafanaUrl preCheck error:{}",checkRes); + mvcResult.setCode(500); + mvcResult.setMessage("出错啦"); + return mvcResult; + } + + mvcResult.setData(chaosMetricsService.getGoingGrafanaUrl(id, executedTimes, status)); + return mvcResult; + } + + + @RequestMapping(path = "/chaosMetrics/getTaskLogUrl", method = "get") + public MvcResult> getTaskLogUrl(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult(); + mvcResult.setData(chaosMetricsService.getTaskLogUrl(id)); + return mvcResult; + } + + private String preCheck(int status, int count) { + if (count <= 0) { + return "The experiment was performed at least once"; + } + if (status != StatusEnum.actioning.type() && status != StatusEnum.recovered.type()) { + return "The experiment status is not actioning or recovered"; + } + return "ok"; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosTaskController.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosTaskController.java new file mode 100644 index 000000000..4adb7df31 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/ChaosTaskController.java @@ -0,0 +1,323 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.controller; + +import com.google.gson.Gson; +import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +import com.xiaomi.youpin.docean.Ioc; +import com.xiaomi.youpin.docean.anno.Controller; +import com.xiaomi.youpin.docean.anno.RequestMapping; +import com.xiaomi.youpin.docean.anno.RequestParam; +import com.xiaomi.youpin.docean.mvc.ContextHolder; +import com.xiaomi.youpin.docean.mvc.MvcResult; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.tuple.Pair; +import run.mone.chaos.operator.aspect.anno.ParamValidate; +import run.mone.chaos.operator.bo.CreateChaosTaskBo; +import run.mone.chaos.operator.bo.PipelineBO; +import run.mone.chaos.operator.bo.TaskQryParam; +import run.mone.chaos.operator.bo.chaosBot.CreateBotCronBo; +import run.mone.chaos.operator.common.Config; +import run.mone.chaos.operator.constant.ModeEnum; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.constant.TaskEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dto.page.PageData; +import run.mone.chaos.operator.service.*; +import run.mone.chaos.operator.vo.ChaosTaskDetailVO; +import run.mone.chaos.operator.vo.ChaosTaskInfoVO; +import run.mone.chaos.operator.vo.ChaosTaskReportVO; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * @author zhangxiaowei6 + * @author caohbaoyu + * @author zhangping + * @desc chaosTask的前台界面操作 + * @Date 2023/12/15 11:24 + */ +@Controller +@Slf4j +public class ChaosTaskController { + @Resource + private ChaosTaskService chaosTaskService; + + @Resource + private UserService userService; + + @Resource + private LockService lockService; + + @Resource + private ChaosBackendService backendService; + + private static Gson gson = new Gson(); + + @ParamValidate + @RequestMapping(path = "/chaosTask/createChaosTask") + public MvcResult createChaosTask(CreateChaosTaskBo createChaosTaskBo) { + MvcResult mvcResult = new MvcResult<>(); + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")); + if (ObjectUtils.isEmpty(userVo)) { + mvcResult.setCode(500); + mvcResult.setMessage("用户未登录"); + return mvcResult; + } + + if (ModeEnum.ANY.type() == createChaosTaskBo.getMode()) { + Optional checkPodNum = checkPodNum(createChaosTaskBo); + if (checkPodNum.isPresent()) { + mvcResult.setCode(500); + mvcResult.setMessage(checkPodNum.get()); + return mvcResult; + } + } + + createChaosTaskBo.setCreateUser(userVo.getAccount()); + mvcResult.setData(saveTask(createChaosTaskBo)); + return mvcResult; + } + + @ParamValidate + @RequestMapping(path = "/chaosTask/updateChaosTask") + public MvcResult updateChaoTask(CreateChaosTaskBo createChaosTaskBo) { + MvcResult mvcResult = new MvcResult<>(); + ChaosTask chaosTask = chaosTaskService.getChaosTaskById(createChaosTaskBo.getId()); + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")); + if (ObjectUtils.isEmpty(chaosTask)) { + mvcResult.setCode(500); + mvcResult.setMessage("实验任务不存在"); + return mvcResult; + } + if (!userVo.getAccount().equals(chaosTask.getCreateUser()) && !backendService.isAdmin(userVo.getAccount())) { + mvcResult.setCode(500); + mvcResult.setMessage("不能修改非自己创建的实验任务"); + return mvcResult; + } + if (ModeEnum.ANY.type() == createChaosTaskBo.getMode()) { + Optional checkPodNum = checkPodNum(createChaosTaskBo); + if (checkPodNum.isPresent()) { + mvcResult.setCode(500); + mvcResult.setMessage(checkPodNum.get()); + return mvcResult; + } + } + + String account = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")).getAccount(); + createChaosTaskBo.setCreateUser(account); + createChaosTaskBo.setExecutedTimes(chaosTask.getExecutedTimes()); + String insertId = saveTask(createChaosTaskBo); + mvcResult.setData(insertId); + return mvcResult; + } + + private String saveTask(CreateChaosTaskBo createChaosTaskBo) { + TaskEnum taskEnum = TaskEnum.fromType(createChaosTaskBo.getTaskType()); + Class boClass = taskEnum.getBoClass(); + PipelineBO pipelineBO = gson.fromJson(createChaosTaskBo.getOperateParam(), boClass); + + Class serviceClass = taskEnum.getServiceClass(); + TaskBaseService taskBaseService = Ioc.ins().getBean(serviceClass); + return taskBaseService.save(createChaosTaskBo, pipelineBO, StatusEnum.un_action.type()); + } + + + @RequestMapping(path = "/chaosTask/getContainers") + public MvcResult> getContainers(CreateChaosTaskBo createChaosTaskBo) { + MvcResult> mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.getContainers(createChaosTaskBo.getProjectId(), createChaosTaskBo.getPipelineId())); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/execute", method = "get") + public MvcResult execute(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult<>(); + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")); + if (ObjectUtils.isEmpty(userVo)) { + mvcResult.setCode(500); + mvcResult.setMessage("用户未登录"); + return mvcResult; + } + ChaosTask chaosTaskById = chaosTaskService.getChaosTaskById(id); + if (chaosTaskById == null || chaosTaskById.getCreateUser().isEmpty()) { + mvcResult.setCode(500); + mvcResult.setMessage("任务不存在或者任务异常!"); + return mvcResult; + } + if (!userVo.getAccount().equals(chaosTaskById.getCreateUser()) && !backendService.isAdmin(userVo.getAccount())) { + mvcResult.setCode(500); + mvcResult.setMessage("不能执行非自己创建的实验任务"); + return mvcResult; + } + + // 前置检查 + String checkRes = preCheck(chaosTaskById); + if (!"ok".equals(checkRes)) { + mvcResult.setCode(500); + mvcResult.setMessage(checkRes); + return mvcResult; + } + + chaosTaskById.setUpdateUser(userVo.getAccount()); + chaosTaskById.setExecutedTimes(chaosTaskById.getExecutedTimes() + 1); + + chaosTaskService.insertExeLog(chaosTaskById, userVo.getAccount()); + + TaskEnum taskEnum = TaskEnum.fromType(chaosTaskById.getTaskType()); + Class serviceClass = taskEnum.getServiceClass(); + TaskBaseService taskBaseService = Ioc.ins().getBean(serviceClass); + + mvcResult.setData(taskBaseService.execute(chaosTaskById)); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/recover", method = "get") + public MvcResult recover(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult<>(); + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")); + ChaosTask chaosTaskById = chaosTaskService.getChaosTaskById(id); + if (ObjectUtils.isEmpty(chaosTaskById)) { + mvcResult.setCode(500); + mvcResult.setMessage("任务实验不存在"); + return mvcResult; + } + if (chaosTaskById.getStatus() != StatusEnum.actioning.type()) { + mvcResult.setCode(500); + String adminStr = backendService.getAdminStr().getData(); + mvcResult.setMessage("异常:实验状态不为actioned,请联系" + adminStr + "!"); + return mvcResult; + } + if (!userVo.getAccount().equals(chaosTaskById.getCreateUser()) && !backendService.isAdmin(userVo.getAccount())) { + mvcResult.setCode(500); + mvcResult.setMessage("不能恢复非自己创建的实验任务"); + return mvcResult; + } + + boolean chaosRecoverLock = lockService.chaosRecoverLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + if (!chaosRecoverLock) { + log.info("chaosRecoverLock fail, id:{}", chaosTaskById.getId().toString()); + mvcResult.setCode(500); + mvcResult.setMessage("实验任务正在恢复中"); + return mvcResult; + } + + + String account = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")).getAccount(); + chaosTaskById.setUpdateUser(account); + + TaskEnum taskEnum = TaskEnum.fromType(chaosTaskById.getTaskType()); + Class serviceClass = taskEnum.getServiceClass(); + TaskBaseService taskBaseService = Ioc.ins().getBean(serviceClass); + taskBaseService.recover(chaosTaskById); + // 执行实验锁解除 + lockService.chaosRecoverUnLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + lockService.chaosUnLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/getTaskList") + public MvcResult> getTaskList(TaskQryParam qryParam) { + log.info("ChaosTaskController.getTaskList param:{}", qryParam); + MvcResult> mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.getTaskList(qryParam)); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/getChaosTaskDetail", method = "get") + public MvcResult getChaosTaskDetail(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.getChaosTaskDetail(id)); + return mvcResult; + } + + + @RequestMapping(path = "/chaosTask/getTaskType", method = "post") + public MvcResult> getTaskType() { + MvcResult> mvcResult = new MvcResult<>(); + mvcResult.setData(TaskEnum.toMap()); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/getTaskReportList") + public MvcResult> getTaskReportList(TaskQryParam qryParam) { + MvcResult> mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.getTaskReportList(qryParam)); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/deleteTask", method = "get") + public MvcResult deleteTask(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.deleteTask(id)); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/deleteReport", method = "get") + public MvcResult deleteReport(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.deleteReport(id)); + return mvcResult; + } + + @RequestMapping(path = "/chaosTask/getChaosTaskReportDetail", method = "get") + public MvcResult getChaosTaskReportDetail(@RequestParam(value = "id") String id) { + MvcResult mvcResult = new MvcResult<>(); + mvcResult.setData(chaosTaskService.getChaosTaskReportDetail(id)); + return mvcResult; + } + + + @RequestMapping(path = "/chaosTask/getStatusType", method = "post") + public MvcResult> getStatusType() { + MvcResult> mvcResult = new MvcResult<>(); + mvcResult.setData(StatusEnum.toMap()); + return mvcResult; + } + + private String preCheck(ChaosTask task) { + if (ObjectUtils.isEmpty(task)) { + return "任务实验不存在"; + } + // 进行中状态不能再执行实验,恢复的实验也不能再运行 + if (task.getStatus() == StatusEnum.actioning.type()) { + return "实验状态异常,当前状态为: " + StatusEnum.fromType(task.getStatus()).typeName(); + } + // 重入锁校验失败情况 + String isReentrantLock = Config.ins().get("enableChaosReentrantLock", "false"); + String redisValue = String.valueOf(task.getId()); + if (isReentrantLock.equals("true") && !lockService.chaosLock(task.getProjectId(), task.getPipelineId(), redisValue)) { + return "实验进行中,请稍后重试"; + } + return "ok"; + } + + private Optional checkPodNum(CreateChaosTaskBo createChaosTaskBo) { + Integer podNums = chaosTaskService.getPodNums(createChaosTaskBo.getPipelineId()); + if (podNums < createChaosTaskBo.getContainerNum()) { + return Optional.of("实验容器数量不能大于实验pod数量"); + } + return Optional.empty(); + + } + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/UserController.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/UserController.java new file mode 100644 index 000000000..90f0e7dd9 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/controller/UserController.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.controller; + +import com.xiaomi.youpin.docean.anno.Controller; +import com.xiaomi.youpin.docean.anno.RequestMapping; +import com.xiaomi.youpin.infra.rpc.Result; +import org.apache.commons.lang3.ObjectUtils; +import run.mone.chaos.operator.service.UserService; +import run.mone.chaos.operator.vo.UserInfoVo; + +import javax.annotation.Resource; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-14 14:28 + */ +@Controller +public class UserController { + + @Resource + private UserService userService; + + @RequestMapping(path = "/user/getUserInfo") + public Result userInfoVo() { + UserInfoVo userInfo = userService.getUserInfo(); + if (ObjectUtils.isEmpty(userInfo)) { + throw new RuntimeException("user not exist"); + } + return Result.success(userInfo); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/BaseDomain.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/BaseDomain.java new file mode 100644 index 000000000..45372a3a2 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/BaseDomain.java @@ -0,0 +1,67 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import dev.morphia.annotations.Id; +import lombok.Data; +import org.bson.types.ObjectId; + +import java.io.Serializable; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/13 19:03 + */ + +@Data +public abstract class BaseDomain implements Serializable { + @Id + private ObjectId id; + private String createUser; + + private String updateUser; + + private Long createTime; + + private Long updateTime; + + private Long endTime; + + private int deleted; + + public void insertInit() { + if (createTime == null) { + createTime = System.currentTimeMillis(); + } + if (updateTime == null) { + updateTime = System.currentTimeMillis(); + } + + if (createUser == null) { + createUser = "mione"; + } + if (updateUser == null) { + updateUser = "mione"; + } + } + + public void updateInit() { + updateTime = System.currentTimeMillis(); + if (updateUser == null) { + updateUser = "unknown"; + } + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTask.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTask.java new file mode 100644 index 000000000..a40f6eb93 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTask.java @@ -0,0 +1,124 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Field; +import dev.morphia.annotations.Index; +import dev.morphia.annotations.Indexes; +import lombok.Data; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.bson.types.ObjectId; +import run.mone.chaos.operator.bo.CreateChaosTaskBo; +import run.mone.chaos.operator.bo.PipelineBO; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +@Data +@Entity("chaosTask") +@Indexes({ + @Index(fields = @Field("projectId")), + @Index(fields = @Field("projectName")), + @Index(fields = @Field("pipelineId")), + @Index(fields = @Field("taskType")), + @Index(fields = @Field("experimentName")) +}) +public class ChaosTask extends BaseDomain implements Serializable { + + private Integer projectId; + + private String projectName; + + private Integer pipelineId; + + private Integer taskType; + + private String experimentName; + + private Integer containerNum; + + private Integer modeType; + + private Long duration; + + /** + * 执行次数 + */ + private Integer executedTimes; + + private List podIpList; + + private List instanceAndIps = new ArrayList<>(); + + private Integer status; + + private String containerName; + + private StressPO stressPO; + + private NetworkPO networkPO; + + private HttpPO httpPO; + + private IOPO ioPO; + + private JvmPO jvmPO; + + private TimePO timePO; + + private PodPO podPO; + + public static ChaosTask of(PipelineBO pipelineBO, int taskType, int modeType, int statusType, String experimentName) { + ChaosTask chaosTask = new ChaosTask(); + chaosTask.setProjectId(pipelineBO.getProjectId()); + chaosTask.setProjectName(pipelineBO.getProjectName()); + chaosTask.setPipelineId(pipelineBO.getPipelineId()); + chaosTask.setDuration(pipelineBO.getDuration()); + chaosTask.setTaskType(taskType); + chaosTask.setModeType(modeType); + chaosTask.setStatus(statusType); + chaosTask.setExperimentName(experimentName); + return chaosTask; + } + + public static ChaosTask of(CreateChaosTaskBo taskBo, int statusType) { + ChaosTask chaosTask = new ChaosTask(); + if (StringUtils.isNotBlank(taskBo.getId())) { + chaosTask.setId(new ObjectId(taskBo.getId())); + } + chaosTask.setProjectId(taskBo.getProjectId()); + chaosTask.setProjectName(taskBo.getProjectName()); + chaosTask.setPipelineId(taskBo.getPipelineId()); + chaosTask.setDuration(taskBo.getDuration()); + chaosTask.setExperimentName(taskBo.getExperimentName()); + chaosTask.setCreateUser(taskBo.getCreateUser()); + chaosTask.setTaskType(taskBo.getTaskType()); + chaosTask.setModeType(taskBo.getMode()); + chaosTask.setContainerNum(Optional.ofNullable(taskBo.getContainerNum()).orElse(1)); + chaosTask.setExecutedTimes(ObjectUtils.isEmpty(taskBo.getExecutedTimes()) ? 0 : taskBo.getExecutedTimes()); + chaosTask.setStatus(statusType); + chaosTask.setPodIpList(taskBo.getPodIpList()); + chaosTask.setContainerName(taskBo.getContainerName()); + chaosTask.setCreateUser(taskBo.getCreateUser()); + chaosTask.setUpdateUser(taskBo.getCreateUser()); + return chaosTask; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTaskLog.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTaskLog.java new file mode 100644 index 000000000..baacb5801 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTaskLog.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import dev.morphia.annotations.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springframework.beans.BeanUtils; + +import java.io.Serializable; +import java.util.List; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-25 10:10 + */ +@Data +@Entity("chaosTaskLog") +@Indexes({ + @Index(fields = @Field("projectId")), + @Index(fields = @Field("projectName")), + @Index(fields = @Field("pipelineId")), + @Index(fields = @Field("taskType")), + @Index(fields = @Field("experimentName")) +}) +@EqualsAndHashCode(callSuper = false) +public class ChaosTaskLog extends BaseDomain implements Serializable { + private String taskId; + + private Integer projectId; + + private String projectName; + + private Integer pipelineId; + + private Integer taskType; + + private String experimentName; + + private Integer modeType; + + private Integer status; + + private Integer executedTimes; + + private String operateParam; + + private List instanceUidAndIPList; + + public static ChaosTaskLog of(ChaosTask chaosTask) { + ChaosTaskLog chaosTaskLog = new ChaosTaskLog(); + BeanUtils.copyProperties(chaosTask, chaosTaskLog); + if (chaosTask.getId() != null) { + chaosTaskLog.setTaskId(chaosTask.getId().toString()); + } + chaosTaskLog.setId(null); + chaosTaskLog.setInstanceUidAndIPList(chaosTask.getInstanceAndIps()); + chaosTaskLog.setCreateUser(chaosTask.getCreateUser()); + chaosTaskLog.setCreateTime(System.currentTimeMillis()); + chaosTaskLog.setUpdateUser(chaosTask.getUpdateUser()); + chaosTaskLog.setUpdateTime(System.currentTimeMillis()); + return chaosTaskLog; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTaskReport.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTaskReport.java new file mode 100644 index 000000000..91c545329 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/ChaosTaskReport.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import dev.morphia.annotations.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.bson.types.ObjectId; +import run.mone.chaos.operator.constant.ModeEnum; +import run.mone.chaos.operator.constant.TaskEnum; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 10:51 + */ +@Data +@Entity("chaosTaskReport") +@Indexes({ + @Index(fields = @Field("projectId")), + @Index(fields = @Field("projectName")), + @Index(fields = @Field("pipelineId")), + @Index(fields = @Field("taskType")), + @Index(fields = @Field("experimentName")), + @Index(fields = @Field("experimentId")) +}) +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ChaosTaskReport extends BaseDomain implements Serializable { + + private String reportName; + + private Integer projectId; + + private String projectName; + + private Integer pipelineId; + + private String experimentId; + + private String experimentName; + + private Integer executedTimes; + + private Integer taskType; + + private Integer status; + + private String taskCreator; + + private String snapshot; + + private String monitorUrl; + + public static ChaosTaskReport of(ChaosTask chaosTask) { + String reportName = String.format("%s-%s-%s-%s", chaosTask.getProjectName(), TaskEnum.fromType(chaosTask.getTaskType()), ModeEnum.fromType(chaosTask.getModeType()).typeName(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm"))); + ChaosTaskReport report = ChaosTaskReport.builder() + .pipelineId(chaosTask.getPipelineId()) + .reportName(reportName) + .projectId(chaosTask.getProjectId()) + .projectName(chaosTask.getProjectName()) + .executedTimes(chaosTask.getExecutedTimes()) + .experimentName(chaosTask.getExperimentName()) + .experimentId(chaosTask.getId().toString()) + .taskType(chaosTask.getTaskType()) + .status(chaosTask.getStatus()) + .taskCreator(chaosTask.getCreateUser()) + .monitorUrl("") + .build(); + report.setCreateTime(System.currentTimeMillis()); + report.setCreateUser(chaosTask.getCreateUser()); + return report; + } + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/HttpPO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/HttpPO.java new file mode 100644 index 000000000..d6aa56b81 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/HttpPO.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; +import run.mone.chaos.operator.bo.http.HttpBaseRuleBO; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/20 15:51 + */ + +@Data +public class HttpPO implements Serializable { + private List rules; + private Boolean isRecover; + private List instanceAndIps; + private List proxy_ports; + private List podIpList; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/IOPO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/IOPO.java new file mode 100644 index 000000000..210403161 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/IOPO.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/21 10:51 + */ +@Data +public class IOPO implements Serializable { + private String type; + private Boolean isRecover; + private List instanceAndIps; + private String volume; + private Long startTime; + + private String path; + private List methods; + private Integer percent; + private String latency; + private String id; + private List podIpList; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/InstanceUidAndIP.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/InstanceUidAndIP.java new file mode 100644 index 000000000..94d3aeb04 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/InstanceUidAndIP.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/9 14:57 + */ + +@Data +public class InstanceUidAndIP { + private String instanceUid; + private String ip; + private String containerId; + + /** + * stress 执行结果的记忆参数 + */ + private String memoryInstance; + + private String memoryInstanceUid; + + private String cpuInstance; + + private String cpuInstanceUid; + + public InstanceUidAndIP(String instanceUid, String ip) { + this.instanceUid = instanceUid; + this.ip = ip; + } + + public InstanceUidAndIP() { + + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/JvmPO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/JvmPO.java new file mode 100644 index 000000000..42c0b346a --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/JvmPO.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class JvmPO implements Serializable { + + private Integer type; + + private String rule; + + private String clName; + + private String methodName; + + private String response; + + private List instanceUidAndIPList; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/NetworkPO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/NetworkPO.java new file mode 100644 index 000000000..0e34e589f --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/NetworkPO.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class NetworkPO implements Serializable { + + private String dev; + + private Integer delayTime; + + private Integer lossPercent; + + private Integer corruptionPercent; + + private Integer duplicatesPercent; + + private List instanceUidAndIPList; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/PodPO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/PodPO.java new file mode 100644 index 000000000..fcefb3249 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/PodPO.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; +/** + * @author zhangxiaowei6 + * @Date 2024/4/16 09:43 + */ + +@Data +public class PodPO implements Serializable { + private String type; + private String containerName; + private String id; + private List podIpList; + private List instanceUidAndIPList; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/StressPO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/StressPO.java new file mode 100644 index 000000000..e01b3e5a7 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/StressPO.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class StressPO implements Serializable { + + private Integer cpuNum; + + /** + * load CPU with P percent loading for the CPU stress workers. 0 is effectively a sleep (no load) and 100 is full loading. + */ + private Integer cpuLoad; + + private Integer vmNum; + + /** + * mmap N bytes per vm worker, the default is 256MB. + * One can specify the size as % of total available memory or in units of Bytes, KBytes, MBytes and GBytes using the suffix b, k, m or g. + */ + private Integer vmBytes; + + private String vmUnit; + + /** + * sleep N seconds before unmapping memory, the default is zero seconds. Specifying 0 will do an infinite wait. + */ + private Integer vmHang; + + /** + * 指定产生N个处理sync()函数的磁盘I/O进程,sync()用于将内存上的内容写到硬盘上 + */ + private Integer ioNum; + + /** + * start N workers continually writing, reading and removing temporary files. + * The default mode is to stress test sequential writes and reads. + * With the --aggressive option enabled without any --hdd-opts options the hdd stressor will work through all the --hdd-opt options one by one to cover a range of I/O options. + */ + private Integer hdd; + + /** + * write N bytes for each hdd process, the default is 1 GB. + * One can specify the size as % of free space on the file system or in units of Bytes, KBytes, MBytes and GBytes using the suffix b, k, m or g. + */ + private Integer hddBytes; + + private String hddUnit; + + /** + * stop stress test after T seconds. One can also specify the units of time in seconds, minutes, hours, days or years with the suffix s, m, h, d or y. + * Note: A timeout of 0 will run stress-ng without any timeouts (run forever) + */ + private Integer cpuTimeOut; + + private String cpuTimeOutUnit; + + private Integer vmTimeOut; + + private String vmTimeOutUnit; + + private String memoryInstance; + + private String memoryInstanceUid; + + private String cpuInstance; + + private String cpuInstanceUid; + + private List instanceUidAndIPList; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/TaskExeLog.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/TaskExeLog.java new file mode 100644 index 000000000..94a20a02e --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/TaskExeLog.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Field; +import dev.morphia.annotations.Index; +import dev.morphia.annotations.Indexes; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: 执行日志 + * @date 2024-04-23 10:02 + */ +@Data +@Entity("taskExeLog") +@Indexes({ + @Index(fields = @Field("taskId")) +}) +public class TaskExeLog extends BaseDomain implements Serializable { + + private String experimentName; + + private Long startTime; + + private String taskId; + + private String executor; + + private Integer experimentTimes; + + private Long duration; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/TimePO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/TimePO.java new file mode 100644 index 000000000..ef8c91e7d --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/domain/TimePO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.domain; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * @author caobaoyu + * @description: + * @date 2024-01-03 15:08 + */ +@Data +public class TimePO implements Serializable { + + // 这个值用mongo里边的创建任务的id代替 + private String uid; + + private String instanceId; + + private Long timeOffset; + + private long clkIdsMask; + + private List ipAndUids; + + @Data + @Builder + @AllArgsConstructor + @NoArgsConstructor + public static class IpAndUid { + String ip; + String uid; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/BaseDao.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/BaseDao.java new file mode 100644 index 000000000..328be4873 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/BaseDao.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.impl; + +import com.xiaomi.youpin.docean.Ioc; +import dev.morphia.Datastore; +import dev.morphia.Key; +import dev.morphia.query.*; +import dev.morphia.query.internal.MorphiaCursor; +import lombok.extern.slf4j.Slf4j; +import org.bson.types.ObjectId; +import org.springframework.util.CollectionUtils; +import run.mone.chaos.operator.dao.domain.BaseDomain; +import run.mone.chaos.operator.dto.page.PageData; + +import java.util.*; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/13 19:03 + */ +@Slf4j +public abstract class BaseDao { + + protected Datastore datastore = Ioc.ins().getBean(Datastore.class); + + public Object insert(BaseDomain domain) { + domain.insertInit(); + Key result = datastore.save(domain); + log.info("BaseDao.insert={}", result); + return result.getId(); + } + + public int update(Object id, Map kvMap, Class clazz) { + if (kvMap.isEmpty()) { + return 0; + } + Query query = datastore.createQuery(clazz).field("_id").equal(id); + UpdateOperations updateOperations = datastore.createUpdateOperations(clazz); + kvMap.forEach(updateOperations::set); + updateOperations.set("updateTime", System.currentTimeMillis()); + if (!kvMap.containsKey("updateUser")) { + updateOperations.set("updateUser", "unknown"); + } + UpdateResults updateRes = datastore.update(query, updateOperations); + log.info("BaseDao.update={}", updateRes); + return updateRes.getUpdatedCount(); + } + + public T getById(Object id, Class clazz) { + if (id == null) { + return null; + } + Query query = datastore.createQuery(clazz).field("_id").equal(new ObjectId(String.valueOf(id))); + T t = query.get(); + log.info("BaseDao.getById id={}, clazzName={}, result={}", id, clazz.getName(), t); + return t; + } + + public List queryListById(Collection ids, Class clazz) { + if (CollectionUtils.isEmpty(ids)) { + return null; + } + List idArr = new ArrayList<>(ids); + Query query = datastore.createQuery(clazz).field("id").in(idArr); + try (MorphiaCursor tMorphiaCursor = query.find()) { + return tMorphiaCursor.toList(); + } + } + + public long getTotal(Query query, Class clazz) { + return query.count(); + } + + public PageData getListByPage(PageData pageData, Class clazz) { + Query query = datastore.createQuery(clazz); + long all = query.count(); + return getPageData(pageData, query, all); + } + + private PageData getPageData(PageData pageData, Query query, long all) { + try (MorphiaCursor morphiaCursor = query.order("-updateTime").find(new FindOptions().skip(pageData.getPage() > 0 ? (pageData.getPage() - 1) * pageData.getPageSize() : 0).limit(pageData.getPageSize()))) { + List list = morphiaCursor.toList(); + pageData.setList(list); + pageData.setTotal(query.count()); + return pageData; + } + } + + public PageData getListByMap(Map kvMap, PageData pageData, Class clazz) { + Query query = datastore.createQuery(clazz); + long all = query.countAll(); + kvMap.forEach((k, v) -> { + if (v instanceof Collection) { + query.field(k).in((Collection) v); + } else { + query.field(k).equal(v); + } + }); + return getPageData(pageData, query, all); + } + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskDao.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskDao.java new file mode 100644 index 000000000..290b3372a --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskDao.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.impl; + +import com.google.gson.Gson; +import com.xiaomi.youpin.docean.anno.Component; +import dev.morphia.query.FindOptions; +import dev.morphia.query.Query; +import dev.morphia.query.internal.MorphiaCursor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.domain.ChaosTaskLog; +import run.mone.chaos.operator.dao.domain.InstanceUidAndIP; +import run.mone.chaos.operator.dto.page.PageData; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@Component +public class ChaosTaskDao extends BaseDao { + + private static final Logger log = LoggerFactory.getLogger(ChaosTaskDao.class); + @Resource + private ChaosTaskLogDao chaosTaskLogDao; + + private static final Gson gson = new Gson(); + + public long getTotal() { + Query query = datastore.createQuery(ChaosTask.class); + return getTotal(query, ChaosTask.class); + } + + public PageData getListByPage(PageData pageData) { + return getListByPage(pageData, ChaosTask.class); + } + + public Object insert(ChaosTask chaosTask) { + if (Objects.nonNull(chaosTask.getId()) && chaosTask.getStatus() == StatusEnum.un_action.type()) { + return insert(chaosTask, false); + } + return insert(chaosTask, true); + } + + public Object insert(ChaosTask chaosTask, boolean addLog) { + Object insertId = super.insert(chaosTask); + if (addLog) { + ChaosTaskLog log = ChaosTaskLog.of(chaosTask); + log.setOperateParam(getOperateParam(chaosTask)); + chaosTaskLogDao.insert(log); + } + + return insertId; + } + + public int update(Object id, Map kvMap) { + log.info("update kvMap:{}", gson.toJson(kvMap)); + ChaosTask chaosTask = getById(id, ChaosTask.class); + if (null == chaosTask) { + return 0; + } + super.update(id, kvMap, ChaosTask.class); + ChaosTaskLog log = ChaosTaskLog.of(chaosTask); + if (kvMap.containsKey("executedTimes")) { + log.setExecutedTimes((Integer) kvMap.get("executedTimes")); + } + if (kvMap.containsKey("instanceAndIps")) { + log.setInstanceUidAndIPList((List) kvMap.get("instanceAndIps")); + } + if (kvMap.containsKey("updateUser")) { + log.setUpdateUser((String) kvMap.get("updateUser")); + } + log.setStatus((Integer) kvMap.get("status")); + log.setOperateParam(getOperateParam(chaosTask)); + chaosTaskLogDao.insert(log); + return 1; + } + + public ChaosTask getLatestByKvMap(Map kvMap) { + Query query = datastore.createQuery(ChaosTask.class); + kvMap.forEach((k, v) -> { + query.field(k).equal(v); + }); + return query.order("-updateTime").get(); + } + + public PageData getListByMap(PageData pageData, Map kvMap) { + return getListByMap(kvMap, pageData, ChaosTask.class); + } + + public PageData getListByStatusAndTime(PageData pageData, Map kvMap) { + Query query = datastore.createQuery(ChaosTask.class); + + try (MorphiaCursor morphiaCursor = query.field("endTime").lessThan(System.currentTimeMillis()).field("status").in((Iterable) kvMap.get("status")).find(new FindOptions().skip(pageData.getPage() > 0 ? (pageData.getPage() - 1) * pageData.getPageSize() : 0).limit(pageData.getPageSize()))) { + List list = morphiaCursor.toList(); + pageData.setList(list); + pageData.setTotal(query.count()); + return pageData; + } + } + + + /** + * 这个后续如果用工作流,可能得优化 + * + * @param task + * @return + */ + private String getOperateParam(ChaosTask task) { + String operateParam = ""; + if (Objects.nonNull(task.getJvmPO())) { + operateParam = gson.toJson(task.getJvmPO()); + } else if (Objects.nonNull(task.getStressPO())) { + operateParam = gson.toJson(task.getStressPO()); + } else if (Objects.nonNull(task.getNetworkPO())) { + operateParam = gson.toJson(task.getNetworkPO()); + } else if (Objects.nonNull(task.getHttpPO())) { + operateParam = gson.toJson(task.getHttpPO()); + } else if (Objects.nonNull(task.getIoPO())) { + operateParam = gson.toJson(task.getIoPO()); + } else if (Objects.nonNull(task.getTimePO())) { + operateParam = gson.toJson(task.getTimePO()); + } + return operateParam; + } + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskLogDao.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskLogDao.java new file mode 100644 index 000000000..b43f70086 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskLogDao.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.impl; + +import com.xiaomi.youpin.docean.anno.Component; +import run.mone.chaos.operator.dao.domain.ChaosTaskLog; +import run.mone.chaos.operator.dto.page.PageData; + +import java.util.Map; + +/** + * @author caobaoyu + * @description: + * @date 2023-12-25 10:35 + */ +@Component +public class ChaosTaskLogDao extends BaseDao { + + public PageData getListByPage(PageData pageData){ + return getListByPage(pageData, ChaosTaskLog.class); + } + + public PageData getListByMap(PageData pageData, Map kvMap) { + return getListByMap(kvMap, pageData, ChaosTaskLog.class); + } + + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskReportDao.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskReportDao.java new file mode 100644 index 000000000..26929c2da --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/ChaosTaskReportDao.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.impl; + +import com.xiaomi.youpin.docean.anno.Component; +import run.mone.chaos.operator.constant.ModeEnum; +import run.mone.chaos.operator.constant.TaskEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.domain.ChaosTaskReport; +import run.mone.chaos.operator.dto.page.PageData; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 14:11 + */ +@Component +public class ChaosTaskReportDao extends BaseDao { + + private static final String REPORT_NAME_TEMPLATE = "%s-%s-%s-%s"; + + private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm"); + + + public PageData getListByMap(PageData pageData, Map kvMap) { + return getListByMap(kvMap, pageData, ChaosTaskReport.class); + } + + public String createReport(ChaosTaskReport report) { + return insert(report).toString(); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/TaskExeLogDao.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/TaskExeLogDao.java new file mode 100644 index 000000000..3a918c6aa --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dao/impl/TaskExeLogDao.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dao.impl; + +import com.xiaomi.youpin.docean.anno.Component; +import run.mone.chaos.operator.dao.domain.TaskExeLog; +import run.mone.chaos.operator.dto.page.PageData; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-23 10:08 + */ +@Component +public class TaskExeLogDao extends BaseDao { + + public TaskExeLog getExeLogByTaskIdAndExecutedTimes(String taskId, Integer executedTimes) { + Map map = new HashMap<>(); + map.put("taskId", taskId); + map.put("experimentTimes", executedTimes); + PageData pageData = new PageData<>(); + PageData listByMap = getListByMap(map, pageData, TaskExeLog.class); + if (!listByMap.getList().isEmpty()) { + return listByMap.getList().get(0); + } + return null; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/grpc/GrpcPodAndChannel.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/grpc/GrpcPodAndChannel.java new file mode 100644 index 000000000..ae0d185d7 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/grpc/GrpcPodAndChannel.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dto.grpc; + +import io.fabric8.kubernetes.api.model.Pod; +import io.grpc.ManagedChannel; +import lombok.Builder; +import lombok.Data; + +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/8 19:37 + */ +@Data +@Builder +public class GrpcPodAndChannel { + public Pod pod; + public ManagedChannel channel; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOChaosActionDTO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOChaosActionDTO.java new file mode 100644 index 000000000..6043fdb2e --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOChaosActionDTO.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dto.io; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/13 14:20 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class IOChaosActionDTO implements Serializable { + private String type; + private String path; + private Integer percent; + private List methods; + private List faults; + private String latency; + private String source; + private String volume; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOFaultDTO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOFaultDTO.java new file mode 100644 index 000000000..91338ea58 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOFaultDTO.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dto.io; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/13 14:22 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class IOFaultDTO implements Serializable { + private Integer errno; + private Integer weight; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOFilterDTO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOFilterDTO.java new file mode 100644 index 000000000..dbaef077c --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/io/IOFilterDTO.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dto.io; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/13 14:21 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Data +public class IOFilterDTO implements Serializable { + private String path; + private Integer percent; + private List methods; +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/page/PageData.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/page/PageData.java new file mode 100644 index 000000000..9458a135b --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/dto/page/PageData.java @@ -0,0 +1,46 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.dto.page; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import run.mone.chaos.operator.vo.ChaosTaskInfoVO; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/15 11:15 + */ +@ToString +@Data +@NoArgsConstructor +public class PageData implements Serializable { + private int page; + private int pageSize; + private long total; + private List list; + + public PageData(List chaosTaskInfoVOS, int pageSize, long total, int page) { + this.pageSize = pageSize; + this.total = total; + this.page = page; + this.list = chaosTaskInfoVOS; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/mongodb/mongo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/mongodb/mongo.java new file mode 100644 index 000000000..24db4f085 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/mongodb/mongo.java @@ -0,0 +1,46 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.mongodb; + +import com.mongodb.MongoClient; +import com.mongodb.MongoClientURI; +import com.xiaomi.youpin.docean.Ioc; +import com.xiaomi.youpin.docean.anno.Bean; +import com.xiaomi.youpin.docean.anno.Configuration; +import com.xiaomi.youpin.docean.anno.Service; +import com.xiaomi.youpin.docean.plugin.config.Config; +import com.xiaomi.youpin.docean.plugin.config.anno.Value; +import dev.morphia.Datastore; +import dev.morphia.Morphia; + +@Configuration +public class mongo { + + @Bean + public Datastore createDatastore() { + Config config = Ioc.ins().getBean(Config.class); + String url = config.get("mongodb.url", ""); + String name = config.get("mongodb.name", ""); + + Morphia morphia = new Morphia(); + morphia.mapPackage("run.mone.chaos.operator.dao.domain"); + MongoClient mongoClient = new MongoClient(new MongoClientURI(url)); + Datastore datastore = morphia.createDatastore(mongoClient, name); + datastore.ensureIndexes(); + return datastore; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/schedule/ScheduleService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/schedule/ScheduleService.java new file mode 100644 index 000000000..a279e61ab --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/schedule/ScheduleService.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.schedule; + +import com.xiaomi.youpin.docean.Ioc; +import com.xiaomi.youpin.docean.anno.Service; +import com.xiaomi.youpin.docean.mvc.MvcResult; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.bo.chaosBot.CreateBotCronBo; +import run.mone.chaos.operator.constant.TaskEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.impl.ChaosTaskDao; +import run.mone.chaos.operator.dto.page.PageData; +import run.mone.chaos.operator.service.ChaosBackendService; +import run.mone.chaos.operator.service.LockService; +import run.mone.chaos.operator.service.TaskBaseService; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + + +/** + * @author goodjava@qq.com + * @date 2022/6/7 15:09 + */ +@Service +@Slf4j +public class ScheduleService { + + @Resource + private ChaosTaskDao taskDao; + + + public void init() { + log.info("init"); + Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> { + execute(); + }, 5, 15, TimeUnit.SECONDS); + } + + /** + * 实验取消有三种模式:点击取消、时间轮取消、扫库时间取消 + */ + private void execute() { + try { + Map kvMap = new HashMap<>(); + List status = List.of(2); + kvMap.put("status", status); + PageData pageData = new PageData<>(); + pageData.setPage(1); + pageData.setPageSize(100); + pageData = taskDao.getListByStatusAndTime(pageData, kvMap); + for (ChaosTask task : pageData.getList()) { + //取消任务 + TaskEnum taskEnum = TaskEnum.fromType(task.getTaskType()); + Class serviceClass = taskEnum.getServiceClass(); + TaskBaseService taskBaseService = Ioc.ins().getBean(serviceClass); + try { + boolean chaosRecoverLock = ((LockService) Ioc.ins().getBean(LockService.class)).chaosRecoverLock(task.getProjectId(), task.getPipelineId()); + if (chaosRecoverLock) { + taskBaseService.recover(task); + ((LockService) Ioc.ins().getBean(LockService.class)).chaosRecoverUnLock(task.getProjectId(), task.getPipelineId()); + ((LockService) Ioc.ins().getBean(LockService.class)).chaosUnLock(task.getProjectId(), task.getPipelineId()); + } else { + log.info("chaosRecoverLock is false, taskId:{}", task.getId().toString()); + } + } catch (Exception e) { + log.error("schedule recover error,taskId:{}", task.getId().toString(), e); + } + } + } catch (Exception e) { + log.error("schedule recover error", e); + } + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosBackendService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosBackendService.java new file mode 100644 index 000000000..e29432678 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosBackendService.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.google.gson.Gson; +import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +import com.xiaomi.youpin.docean.anno.Service; +import com.xiaomi.youpin.docean.mvc.ContextHolder; +import com.xiaomi.youpin.docean.mvc.MvcResult; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.PodList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; +import org.apache.commons.lang3.ObjectUtils; +import run.mone.chaos.operator.bo.restartPodListBo; +import run.mone.chaos.operator.common.Config; +import run.mone.chaos.operator.dao.domain.ChaosTask; + +import javax.annotation.Resource; +import java.time.Duration; +import java.util.Arrays; +import java.util.List; + +/** + * @author zhangxiaowei6 + */ +@Slf4j +@Service +public class ChaosBackendService { + + @Resource + private LockService lockService; + + @Resource + private ChaosTaskService chaosTaskService; + + @Resource + private ChaosMetricsService chaosMetricsService; + + @Resource(name = "podClient") + private MixedOperation> podClient; + + private final String NACOS_ADMIN_KEY = "admin"; + + private final String NACOS_ADMIN_DEFAULT = "zhangxiaowei6,caobaoyu,zhangping17,gaoyulin"; + + private String CHAOS_ENV; + + private final Gson gson = new Gson(); + + private static final OkHttpClient client = new OkHttpClient.Builder() + .connectTimeout(Duration.ofSeconds(120)) + .readTimeout(Duration.ofSeconds(120)) + .build(); + + public void init() { + log.info("begin init backendService!"); + CHAOS_ENV = Config.ins().get("chaos.env", "staging"); + } + + public MvcResult restartPodList(restartPodListBo bo) { + MvcResult mvcResult = new MvcResult<>(); + try { + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get() + .getSession().getAttribute("TPC_USER")); + if (!getAdminList().contains(userVo.getAccount())) { + mvcResult.setCode(401); + mvcResult.setData("权限不足!"); + return mvcResult; + } + // 开始重启给定的pod + log.info("ChaosBackendService.restart param :{}", bo); + List pods = podClient.inAnyNamespace().withLabel("pipeline-id", String.valueOf(bo.getPipelineId())).list().getItems(); + pods.stream().filter(pod -> bo.getPodIpList().contains(pod.getStatus().getPodIP())).forEach(pod -> podClient.delete(pod)); + mvcResult.setData("ok"); + return mvcResult; + } catch (Exception e) { + log.error("ChaosBackendService.restartPodList error:{}", e); + mvcResult.setCode(500); + mvcResult.setData("error!"); + return mvcResult; + } + } + + public MvcResult deleteCacheKey(String id) { + MvcResult mvcResult = new MvcResult<>(); + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get() + .getSession().getAttribute("TPC_USER")); + if (!getAdminList().contains(userVo.getAccount())) { + mvcResult.setCode(401); + mvcResult.setData("权限不足!"); + return mvcResult; + } + ChaosTask chaosTaskById = chaosTaskService.getChaosTaskById(id); + if (ObjectUtils.isEmpty(chaosTaskById)) { + mvcResult.setCode(500); + mvcResult.setData("实验不存在!"); + return mvcResult; + } + + // 执行实验锁解除 + lockService.chaosUnLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + mvcResult.setCode(0); + mvcResult.setData("ok"); + return mvcResult; + } + + public MvcResult> getAdmin() { + MvcResult> mvcResult = new MvcResult<>(); + mvcResult.setData(getAdminList()); + return mvcResult; + } + + public MvcResult getAdminStr() { + MvcResult res = new MvcResult<>(); + res.setData(Config.ins().get(NACOS_ADMIN_KEY, NACOS_ADMIN_DEFAULT)); + return res; + } + + public MvcResult getServiceAvailabilityUrl() { + String chaosServiceAvailabilityUrl = chaosMetricsService.getChaosServiceAvailabilityUrl(); + MvcResult mvcResult = new MvcResult<>(); + mvcResult.setData(chaosServiceAvailabilityUrl); + return mvcResult; + } + + public MvcResult getReentrantLockValue(int projectId, int pipelineId) { + log.info("ChaosBackendService.getReentrantLockValue projectId:{},pipelineId:{}", projectId, pipelineId); + MvcResult res = new MvcResult<>(); + try { + String reentrantLockValue = lockService.getReentrantLockValue(projectId, pipelineId); + log.info("ChaosBackendService.getReentrantLockValue reentrantLockValue:{}", reentrantLockValue); + res.setData(reentrantLockValue); + return res; + } catch (Exception e) { + log.error("ChaosBackendService.getReentrantLockValue error:{}", e); + res.setCode(500); + res.setMessage(e.getMessage()); + return res; + } + } + + public boolean isAdmin(String userName) { + return getAdminList().contains(userName); + } + + private List getAdminList() { + try { + String adminStr = Config.ins().get(NACOS_ADMIN_KEY, NACOS_ADMIN_DEFAULT); + return Arrays.stream(adminStr.split(",")).toList(); + } catch (Exception e) { + log.error("ChaosBackendService.getAdminList error:{},return default:{}", e, NACOS_ADMIN_DEFAULT); + return Arrays.stream(NACOS_ADMIN_DEFAULT.split(",")).toList(); + } + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosMetricsService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosMetricsService.java new file mode 100644 index 000000000..99f492021 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosMetricsService.java @@ -0,0 +1,298 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.google.common.base.Stopwatch; +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import com.xiaomi.youpin.docean.anno.Service; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.PodList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import lombok.extern.slf4j.Slf4j; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import run.mone.chaos.operator.common.Config; +import run.mone.chaos.operator.constant.TaskEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.domain.ChaosTaskLog; +import run.mone.chaos.operator.dao.domain.ChaosTaskReport; +import run.mone.chaos.operator.dao.domain.InstanceUidAndIP; +import run.mone.chaos.operator.dao.domain.TaskExeLog; +import run.mone.chaos.operator.dao.impl.TaskExeLogDao; +import run.mone.chaos.operator.vo.PodLogUrlVO; + +import javax.annotation.Resource; +import java.time.Duration; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/17 10:43 + */ +@Slf4j +@Service +public class ChaosMetricsService { + + private final String ERROR_URL = "xxx"; + + + @Resource + private ChaosTaskService chaosTaskService; + @Resource + private TaskExeLogDao exeLogDao; + @Resource(name = "podClient") + private MixedOperation> podClient; + + private static final OkHttpClient client = new OkHttpClient.Builder() + .connectTimeout(Duration.ofSeconds(20)) + .readTimeout(Duration.ofSeconds(20)) + .build(); + + + public Map getGoingGrafanaUrl(String id, int count, int status) { + Map res = new HashMap<>(); + try { + ChaosTask task = chaosTaskService.getChaosTaskById(id); + List chaosTaskLogByTaskIdAndExecutedTimesAndStatus = chaosTaskService.getChaosTaskLogByTaskIdAndExecutedTimesAndStatus(count, id, status); + if (chaosTaskLogByTaskIdAndExecutedTimesAndStatus == null || chaosTaskLogByTaskIdAndExecutedTimesAndStatus.isEmpty()) { + log.info("Not found task log id:" + id + " count:" + count); + return new HashMap<>(); + } + ChaosTaskLog taskLog = chaosTaskLogByTaskIdAndExecutedTimesAndStatus.getFirst(); + if (taskLog.getInstanceUidAndIPList().isEmpty()) { + log.info("No affected instances found"); + } + + // 获取报告信息 ,记录时间 + Stopwatch sw = Stopwatch.createStarted(); + List chaosTaskReportByTaskIdAndExecutedTimes = chaosTaskService.getChaosTaskReportByTaskIdAndExecutedTimes(count, id); + if (chaosTaskReportByTaskIdAndExecutedTimes == null || chaosTaskReportByTaskIdAndExecutedTimes.isEmpty()) { + // 执行中没有report,直接生成 + res.put("grafanaUrl", packageGrafanaUrl(task, taskLog, null, true)); + } else { + // 执行中已经有report,直接用 + ChaosTaskReport taskReport = chaosTaskReportByTaskIdAndExecutedTimes.getFirst(); + // 如果报告里有grafana链接,直接用,否则生成一遍 + if (taskReport.getMonitorUrl() != null && !taskReport.getMonitorUrl().isEmpty()) { + log.info("Found task reportId:{} grafanaUrl: {}", taskReport.getId(), taskReport.getMonitorUrl()); + res.put("grafanaUrl", taskReport.getMonitorUrl()); + } else { + // 生成grafana链接 + log.info("Not found task reportId:{} ,and begin generate", taskReport.getId()); + res.put("grafanaUrl", packageGrafanaUrl(task, taskLog, taskReport, false)); + } + } + log.info("packageGrafanaUrl cost time:{}", sw.elapsed(TimeUnit.MILLISECONDS)); + + res.put("heraUrl", packageHeraUrl(task, taskLog)); + return res; + } catch (Exception e) { + log.error("getGoingGrafanaUrl error", e); + return new HashMap<>(); + } + } + + private String getGrafanaDomain() { + return Config.ins().get("grafana.domain", "https://grafana-mione.test.mi.com"); + } + + private String getLogUrl() { + return Config.ins().get("dashLog.domain", "http://mionetty.systech.test.b2c.srv/kubelogs"); + } + + private List getPodList(Integer projectId, Integer pipLineId) { + Map searchMap = new HashMap<>(); + searchMap.put("project-id", projectId.toString()); + searchMap.put("pipeline-id", pipLineId.toString()); + return podClient.inAnyNamespace().withLabels(searchMap).list().getItems(); + } + + private String packageGrafanaUrl(ChaosTask task, ChaosTaskLog taskLog, ChaosTaskReport taskReport, boolean isExecuteing) { + // 只生成一遍,后续存入db + StringBuilder sb = new StringBuilder(); + Integer projectId = task.getProjectId(); + List podList = getPodList(projectId, task.getPipelineId()); + + // 获取应用程序名称 + String originApplication = podList.getFirst().getMetadata().getLabels().get("mione-name"); + String application = projectId.toString() + "_" + originApplication.replaceAll("-", "_"); + + // 根据任务模式选择不同的IP列表和节点IP列表 + List ipList; + List nodeIpList; + List podNameList; + //if (task.getModeType().equals(3)) { + + // 变量定为当时受影响的ip + ipList = taskLog.getInstanceUidAndIPList().stream().map(InstanceUidAndIP::getIp).collect(Collectors.toList()); + nodeIpList = podList.stream().filter(pod -> ipList.contains(pod.getStatus().getPodIP())) + .map(pod -> pod.getStatus().getHostIP()).collect(Collectors.toList()); + podNameList = podList.stream().filter(pod -> ipList.contains(pod.getStatus().getPodIP())) + .map(pod -> pod.getMetadata().getName()).collect(Collectors.toList()); + + if (task.getTaskType() == TaskEnum.pod.type()) { + //如果是pod类型实验,由于有重启,ip会变,把当前所有实例的ip都加进列表 + ipList.addAll(podList.stream().map(pod -> pod.getStatus().getPodIP()).toList()); + nodeIpList.addAll(podList.stream().map(pod -> pod.getStatus().getHostIP()).toList()); + podNameList.addAll(podList.stream().map(pod -> pod.getMetadata().getName()).toList()); + } + /* } else { + ipList = podList.stream().map(pod -> pod.getStatus().getPodIP()).toList(); + nodeIpList = podList.stream().map(pod -> pod.getStatus().getHostIP()).toList(); + podNameList = podList.stream().map(pod -> pod.getMetadata().getName()).toList(); + }*/ + + // 开始时间为实验log里的时间,log里的时间标识为第几次实验的时间 + Long createTime = taskLog.getCreateTime(); + log.info("ChaosMetricsService.packageUrl ipList:{},application:{}", ipList, application); + + TaskExeLog exeLog = exeLogDao.getExeLogByTaskIdAndExecutedTimes(task.getId().toString(), taskLog.getExecutedTimes()); + Long duration = task.getDuration(); + if (Objects.nonNull(exeLog)) { + duration = exeLog.getDuration(); + } + + // 构建URL + sb.append(getGrafanaDomain()) + .append(getUrlSuffix(task.getTaskType())) + .append("&") + .append(getUlrTimeParam(duration, createTime)) + .append("&var-application=") + .append(application) + .append("&refresh=15s&theme=light&kiosk") + .append("&var-env=") + .append(task.getPipelineId()); + + Set ipSet = new HashSet<>(ipList); + Set nodeIpSet = new HashSet<>(nodeIpList); + Set podNameSet = new HashSet<>(podNameList); + appendUrlParams(sb, "var-podIp=", ipSet); + appendUrlParams(sb, "var-Node=", nodeIpSet); + appendUrlParams(sb, "var-pod=", podNameSet); + + if (!isExecuteing) { + // 存入报告db,后续从db拿,防止后续看报告时,获取的pod等信息已经失效了(例如pod销毁了,就不能从历史的podip找到其nodeip了) + Map updateMap = new HashMap<>(1); + updateMap.put("monitorUrl", sb.toString()); + String updateRes = chaosTaskService.updateReport(String.valueOf(taskReport.getId()), updateMap); + log.info("ChaosMetricsService.packageUrl monitorUrl insert to report updateRes:{}", updateRes); + } + return sb.toString(); + } + + private String packageHeraUrl(ChaosTask task, ChaosTaskLog taskLog) { + Integer projectId = task.getProjectId(); + Integer pipelineId = task.getPipelineId(); + String projectName = task.getProjectName(); + long createTime = taskLog.getCreateTime(); + long duration = task.getDuration(); + long endTime = createTime + duration + (60 * 1000 * 5); + + // 获取 hera 相关配置 + String heraApiDomain = Config.ins().get("hera.api.domain", "http://mifaas.systech.test.b2c.srv/"); + String heraApiPath = Config.ins().get("hera.api.serverEnvName.path", "hera-api/hera-api-mimeter/mimeter/getServerEnvName"); + String heraDomain = Config.ins().get("hera.domain", "http://hera.be.test.mi.com/project-target-monitor/application/dash-board"); + + // 获取 Pod 列表 + List podList = getPodList(projectId, pipelineId); + String originApplication = podList.getFirst().getMetadata().getLabels().get("mione-name"); + String application = projectId + "_" + originApplication.replaceAll("-", "_"); + + // 构建请求 Hera API 的 URL,并获取 serverEnvName + String requestHeraApiUrl = String.format("%s%s?application=%s&serverEnvId=%d", heraApiDomain, heraApiPath, application, pipelineId); + + Stopwatch stopwatch = Stopwatch.createStarted(); + String serverEnvName = getServerEnvName(requestHeraApiUrl); + log.info("getServerEnvName cost time:{}", stopwatch.stop()); + + // 构建 Hera 页面的 URL + return String.format("%s?id=%d&name=%s&start_time=%d&end_time=%d&serverEnv=%s", heraDomain, projectId, projectName, createTime, endTime, serverEnvName); + } + + + private void appendUrlParams(StringBuilder sb, String paramName, Set paramValues) { + paramValues.forEach(value -> sb.append("&").append(paramName).append(value)); + } + + + private String getUrlSuffix(int taskType) { + String typeName = TaskEnum.fromType(taskType).typeName(); + return Config.ins().get("grafana." + typeName + ".url", ERROR_URL); + } + + // duration 毫秒时间戳 + private String getUlrTimeParam(long duration, long createTime) { + //开始时间往前5min + long startTime = createTime - (60 * 1000 * 5); + // 结束时间往后加1min再加duration + long endTime = createTime + duration + (60 * 1000); + return "from=" + startTime + "&to=" + endTime; + } + + + public List getTaskLogUrl(String id) { + ChaosTask task = chaosTaskService.getChaosTaskById(id); + List podList = getPodList(task.getProjectId(), task.getPipelineId()); + List ipList = task.getInstanceAndIps().stream().map(InstanceUidAndIP::getIp).toList(); + return podList.stream().filter(pod -> ipList.contains(pod.getStatus().getPodIP())).map(i -> { + PodLogUrlVO vo = new PodLogUrlVO(); + vo.setIp(i.getStatus().getPodIP()); + vo.setPodName(i.getMetadata().getName()); + vo.setLogUrl(buildLogUrl(i.getMetadata().getNamespace(), i.getMetadata().getName(), task.getProjectId(), task.getPipelineId())); + return vo; + }).toList(); + } + + public String getChaosServiceAvailabilityUrl() { + String grafanaDomain = getGrafanaDomain(); + String path = Config.ins().get("grafana.chaos.all.url", "/d/mone_chaos_all/mone-chaos-all?orgId=1"); + return grafanaDomain + path + "&refresh=15s&theme=light"; + } + + private String buildLogUrl(String namespace, String podName, Integer projectId, Integer pipLineId) { + return getLogUrl() + String.format("/%s/%s/%s-0-%s/", namespace, podName, projectId, pipLineId); + } + + private String getServerEnvName(String url) { + Request request = new Request.Builder() + .url(url) + .build(); + try { + Response response = client.newCall(request).execute(); + if (response.isSuccessful()) { + String responseBody = response.body().string(); + JsonObject jsonObject = new Gson().fromJson(responseBody, JsonObject.class); + String data = jsonObject.get("data").getAsString(); + if (data == null || data.isEmpty()) { + log.info("getServerEnvName get data null url: {}, res: {}", url, responseBody); + return null; + } + return data; + } else { + log.info("getServerEnvName not successful url : {}", url); + return null; + } + } catch (Exception e) { + log.error("getServerEnvName error:", e); + return null; + } + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosTaskService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosTaskService.java new file mode 100644 index 000000000..3e36da0ce --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ChaosTaskService.java @@ -0,0 +1,368 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.google.gson.Gson; +import com.xiaomi.youpin.docean.anno.Service; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.PodList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.compress.utils.Lists; +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; +import org.springframework.beans.BeanUtils; +import run.mone.chaos.operator.bo.TaskQryParam; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.constant.TaskEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.domain.ChaosTaskLog; +import run.mone.chaos.operator.dao.domain.ChaosTaskReport; +import run.mone.chaos.operator.dao.domain.TaskExeLog; +import run.mone.chaos.operator.dao.impl.ChaosTaskDao; +import run.mone.chaos.operator.dao.impl.ChaosTaskLogDao; +import run.mone.chaos.operator.dao.impl.ChaosTaskReportDao; +import run.mone.chaos.operator.dao.impl.TaskExeLogDao; +import run.mone.chaos.operator.dto.page.PageData; +import run.mone.chaos.operator.vo.*; + +import javax.annotation.Resource; +import java.lang.reflect.Field; +import java.util.*; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; + +/** + * @author zhangxiaowei6 + * @author caobaoyu + * @Date 2023/12/15 11:26 + */ +@Slf4j +@Service +public class ChaosTaskService { + + @Resource + private ChaosTaskDao taskDao; + + @Resource + private ChaosTaskReportDao taskReportDao; + + @Resource + private ChaosTaskLogDao taskLogDao; + + @Resource + private TaskExeLogDao exeLogDao; + + + private static Gson gson = new Gson(); + + @Resource(name = "podClient") + private MixedOperation> podClient; + + public PageData getListByMap(Map map) { + try { + PageData pageData = new PageData<>(); + return taskDao.getListByMap(pageData, map); + } catch (Exception e) { + log.error("getListByMap error:", e); + } + return null; + } + + public ChaosTask getChaosTaskById(String id) { + return taskDao.getById(id, ChaosTask.class); + } + + public List getChaosTaskLogByTaskIdAndExecutedTimesAndStatus(int executedTimes, String taskId, int status) { + List logList = Lists.newArrayList(); + PageData pageData = new PageData<>(); + Map map = new HashMap<>(); + map.put("taskId", taskId); + map.put("executedTimes", executedTimes); + map.put("status", status); + PageData initLogData = taskLogDao.getListByMap(pageData, map); + logList.addAll(initLogData.getList()); + return logList; + } + + public List getChaosTaskReportByTaskIdAndExecutedTimes(int executedTimes, String taskId) { + List reportList = Lists.newArrayList(); + PageData pageData = new PageData<>(); + Map map = new HashMap<>(); + map.put("experimentId", taskId); + map.put("executedTimes", executedTimes); + PageData listByMap = taskReportDao.getListByMap(pageData, map); + reportList.addAll(listByMap.getList()); + return reportList; + } + + + private Map buildQueryParam(TaskQryParam qryParam) { + Map map = new HashMap<>(); + if (qryParam.getTaskType() != null) { + map.put("taskType", qryParam.getTaskType()); + } + if (qryParam.getStatus() != null) { + map.put("status", qryParam.getStatus()); + } + if (StringUtils.isNotBlank(qryParam.getExperimentName())) { + map.put("experimentName", qryParam.getExperimentName()); + } + if (StringUtils.isNotBlank(qryParam.getProjectName())) { + map.put("projectName", qryParam.getProjectName()); + } + if (qryParam.getPipelineId() != null) { + map.put("pipelineId", qryParam.getPipelineId()); + } + if (StringUtils.isNotBlank(qryParam.getCreator())) { + map.put("createUser", qryParam.getCreator()); + } + map.put("deleted", 0); + return map; + } + + public Integer getPodNums( Integer pipelineId) { + List podList = podClient.inAnyNamespace().withLabel("pipeline-id", pipelineId.toString()).list().getItems(); + podList = podList.stream().filter(pod -> pod.getStatus().getContainerStatuses().stream().allMatch(containerStatus -> containerStatus.getState().getRunning() != null)).toList(); + return podList.size(); + } + + public List getContainers(Integer projectId, Integer pipelineId) { + List containers = new ArrayList<>(); + List podList = podClient.inAnyNamespace().withLabel("pipeline-id", pipelineId.toString()).list().getItems(); + if (podList == null || podList.isEmpty()) { + return containers; + } + podList.get(0).getStatus().getContainerStatuses().forEach(containerStatus -> { + if (containerStatus.getName().equals(projectId.toString() + "-0-" + pipelineId.toString())) { + containers.add("main"); + } else { + containers.add(containerStatus.getName()); + } + }); + if (containers.contains("main")) { + //主容器放在第一位 + containers.remove("main"); + containers.add(0, "main"); + } + return containers; + } + + public PageData getTaskList(TaskQryParam qryParam) { + if (!StringUtils.isEmpty(qryParam.getId())) { + // 使用ID直接查询任务 + ChaosTask byId = taskDao.getById(qryParam.getId(), ChaosTask.class); + if (byId != null) { + // 转换单个任务到VO对象 + List chaosTaskInfoVOS = Collections.singletonList(convertToChaosTaskInfoVO(byId)); + return new PageData<>(chaosTaskInfoVOS, 1, 1, 1); + } else { + // 没有找到任务,返回空的分页数据 + return new PageData<>(Collections.emptyList(), 1, 0, 1); + } + } else { + // 构建查询参数 + Map map = buildQueryParam(qryParam); + // 查询任务列表 + PageData listByMap = taskDao.getListByMap(qryParam.buildPageData(), map); + // 转换任务列表到VO对象列表 + List list = convertToChaosTaskInfoVOS(listByMap.getList()); + // 返回分页数据 + return new PageData<>(list, listByMap.getPage(), listByMap.getTotal(), listByMap.getPageSize()); + } + } + + // 将ChaosTask转换为ChaosTaskInfoVO + private ChaosTaskInfoVO convertToChaosTaskInfoVO(ChaosTask chaosTask) { + return ChaosTaskInfoVO.builder().id(chaosTask.getId().toString()) + .experimentName(chaosTask.getExperimentName()) + .projectName(chaosTask.getProjectName()) + .type(chaosTask.getTaskType()) + .mode(chaosTask.getModeType()) + .status(chaosTask.getStatus()) + .creator(chaosTask.getCreateUser()) + .createTime(chaosTask.getCreateTime()) + .updateTime(chaosTask.getUpdateTime()) + .updateUser(chaosTask.getUpdateUser()) + .executedTimes(chaosTask.getExecutedTimes()) + .duration(chaosTask.getDuration()) + .build(); + } + + // 将ChaosTask列表转换为ChaosTaskInfoVO列表的辅助方法 + private List convertToChaosTaskInfoVOS(List chaosTasks) { + return chaosTasks.stream() + .map(this::convertToChaosTaskInfoVO) + .collect(Collectors.toList()); + } + + public ChaosTaskDetailVO getChaosTaskDetail(String id) { + ChaosTask chaosTaskById = getChaosTaskById(id); + ChaosTaskDetailVO chaosTaskDetailVO = new ChaosTaskDetailVO(chaosTaskById); + + TaskExeLog exeLog = exeLogDao.getExeLogByTaskIdAndExecutedTimes(id, chaosTaskById.getExecutedTimes()); + if (Objects.nonNull(exeLog)) { + chaosTaskDetailVO.setExecutor(exeLog.getExecutor()); + chaosTaskDetailVO.setStartTime(exeLog.getStartTime()); + } + TaskEnum taskEnum = TaskEnum.fromType(chaosTaskById.getTaskType()); + Class poClass = taskEnum.getPoClass(); + chaosTaskDetailVO.setOperateParam(getOperateParam(chaosTaskById, poClass)); + return chaosTaskDetailVO; + } + + private String getOperateParam(ChaosTask task, Class boClass) { + String operateParam = ""; + Field[] fields = task.getClass().getDeclaredFields(); + for (Field field : fields) { + if (field.getType().equals(boClass)) { + field.setAccessible(true); + try { + Object fieldValue = field.get(task); + operateParam = gson.toJson(fieldValue); + } catch (IllegalAccessException e) { + log.error("getOperateParam error:", e); + } + } + } + return operateParam; + } + + + public PageData getTaskReportList(TaskQryParam qryParam) { + PageData chaosTaskPageData = qryParam.buildPageData(); + Map map = buildQueryParam(qryParam); + if (StringUtils.isNotBlank(qryParam.getCreator())) { + map.remove("createUser"); + map.put("taskCreator", qryParam.getCreator()); + } + PageData listByMap = taskReportDao.getListByMap(chaosTaskPageData, map); + List list = listByMap.getList().stream().map(report -> { + ChaosTaskReportVO vo = new ChaosTaskReportVO(); + BeanUtils.copyProperties(report, vo); + vo.setId(report.getId().toString()); + return vo; + }).toList(); + PageData res = new PageData<>(); + res.setList(list); + res.setPageSize(listByMap.getPageSize()); + res.setPage(listByMap.getPage()); + res.setTotal(listByMap.getTotal()); + return res; + } + + public ChaosTaskReportVO getChaosTaskReportDetail(String id) { + ChaosTaskReport report = taskReportDao.getById(id, ChaosTaskReport.class); + ChaosTaskReportVO vo = new ChaosTaskReportVO(); + BeanUtils.copyProperties(report, vo); + vo.setId(report.getId().toString()); + ChaosTask chaosTask = taskDao.getById(report.getExperimentId(), ChaosTask.class); + vo.setContainerNum(chaosTask.getContainerNum()); + vo.setInstanceInfoList(chaosTask.getInstanceAndIps().stream().map(r -> { + InstanceInfoVO instanceInfoVO = new InstanceInfoVO(); + instanceInfoVO.setIp(r.getIp()); + instanceInfoVO.setContainerId(r.getContainerId()); + instanceInfoVO.setInstanceUid(r.getInstanceUid()); + return instanceInfoVO; + }).toList()); + + List logList = Lists.newArrayList(); + // 初始化的也得查出来。 + PageData pageData = new PageData<>(); + Map map = new HashMap<>(); + map.put("taskId", report.getExperimentId()); + map.put("executedTimes", 0); + PageData initLogData = taskLogDao.getListByMap(pageData, map); + logList.addAll(initLogData.getList()); + + map.put("taskId", report.getExperimentId()); + map.put("executedTimes", report.getExecutedTimes()); + PageData logData = taskLogDao.getListByMap(pageData, map); + logList.addAll(logData.getList()); + List list = logList.stream().sorted(Comparator.comparing(ChaosTaskLog::getCreateTime)).toList(); + Long startTime = 0L; + Long endTime = 0L; + + for (ChaosTaskLog r : list) { + if (r.getStatus().equals(StatusEnum.actioning.type())) { + startTime = r.getCreateTime(); + } + if (r.getStatus().equals(StatusEnum.recovered.type())) { + endTime = r.getCreateTime(); + } + } + + + if (startTime != null && endTime != null) { + vo.setExecuteTime(endTime - startTime); + } + + TaskEnum taskEnum = TaskEnum.fromType(chaosTask.getTaskType()); + vo.setOperateParam(getOperateParam(chaosTask, taskEnum.getPoClass())); + + List stepList = list.stream().map(r -> ChaosTaskLogVO.builder() + .logId(r.getId().toString()) + .operator(r.getUpdateUser()) + .createTime(r.getCreateTime()) + .status(r.getStatus()) + .build()).toList(); + vo.setExeStep(stepList); + + return vo; + } + + public String deleteTask(String id) { + ChaosTask byId = taskDao.getById(id, ChaosTask.class); + if (Objects.isNull(byId)) { + throw new RuntimeException("task not found"); + } + Map map = new HashMap<>(); + map.put("deleted", 1); + taskDao.update(byId.getId(), map); + return byId.getId().toString(); + } + + public String deleteReport(String id) { + ChaosTaskReport byId = taskReportDao.getById(id, ChaosTaskReport.class); + if (Objects.isNull(byId)) { + throw new RuntimeException("report not found"); + } + Map map = new HashMap<>(); + map.put("deleted", 1); + taskReportDao.update(byId.getId(), map, ChaosTaskReport.class); + return byId.getId().toString(); + } + + public String updateReport(String id,Map map) { + ChaosTaskReport byId = taskReportDao.getById(id, ChaosTaskReport.class); + if (Objects.isNull(byId)) { + throw new RuntimeException("report not found"); + } + taskReportDao.update(byId.getId(), map, ChaosTaskReport.class); + return byId.getId().toString(); + } + + public String insertExeLog(ChaosTask task, String account) { + TaskExeLog log = new TaskExeLog(); + log.setExecutor(account); + log.setExperimentTimes(task.getExecutedTimes()); + log.setExperimentName(task.getExperimentName()); + log.setTaskId(task.getId().toString()); + log.setDuration(task.getDuration()); + log.setStartTime(System.currentTimeMillis()); + return exeLogDao.insert(log).toString(); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/GrpcChannelService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/GrpcChannelService.java new file mode 100644 index 000000000..496c8a069 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/GrpcChannelService.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.xiaomi.youpin.docean.anno.Service; +import com.xiaomi.youpin.docean.plugin.config.anno.Value; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.PodList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.dto.grpc.GrpcPodAndChannel; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/8 19:35 + */ +@Slf4j +@Service +public class GrpcChannelService { + + @Resource(name = "podClient") + private MixedOperation> podClient; + @Value("${chaos.daemon.port}") + private String daemonPort; + + @Value("${chaos.daemon.mock.enable}") + private String daemonMock; + + @Value("${chaos.daemon.mock.url}") + private String daemonMockUrl; + + @Value("${chaos.daemon.mock.port}") + private String daemonMockPort; + + private ConcurrentHashMap channelMap = new ConcurrentHashMap<>(); + + public final String CHAOS_DAEMON_LABEL_KEY = "apps"; + public final String CHAOS_DAEMON_LABEL_VALUE = "mione-chaos-daemon"; + + + // 获取pod与pod对应的channel列表 + public List grpcPodAndChannelList(List podList) { + // log.info("grpcPodAndChannelList podList:{}", podList); + List res = new ArrayList<>(); + + try { + res = podList.stream() + .map(pod -> { + // 通过标签,找到chaos-daemon的pod ip + String podIP = getChaosDaemonIp(pod.getStatus().getHostIP()); + // 是否走mock? + String targetIP = "true".equals(daemonMock) ? daemonMockUrl : podIP; + int targetPort = "true".equals(daemonMock) ? Integer.parseInt(daemonMockPort) : Integer.parseInt(daemonPort); + + try { + ManagedChannel channel = channelMap.get(targetIP + "-" + targetPort); + + if (channel == null || channel.isShutdown() || channel.isTerminated()) { + channel = ManagedChannelBuilder + .forAddress(targetIP, targetPort) + .usePlaintext() + .keepAliveTime(5, TimeUnit.MINUTES) + .keepAliveTimeout(5, TimeUnit.MINUTES) + .keepAliveWithoutCalls(true) + .build(); + channelMap.put(targetIP + "-" + targetPort, channel); + } + + return GrpcPodAndChannel.builder() + .channel(channel) + .pod(pod) + .build(); + } catch (Exception e) { + log.error("Failed to create channel for pod {}: {}", podIP, e.getMessage()); + return null; + } + }) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + // log.info("grpcPodAndChannelList res:{}", res); + } catch (Exception e) { + log.error("grpcPodAndChannelList error:{}", e); + } + + return res; + } + + private String getChaosDaemonIp(String hostIp) { + List chaosDaemonIps = podClient.inAnyNamespace().withLabel(CHAOS_DAEMON_LABEL_KEY, CHAOS_DAEMON_LABEL_VALUE).list().getItems(); + AtomicReference res = new AtomicReference<>(""); + chaosDaemonIps.forEach(pod -> { + if (hostIp.equals(pod.getStatus().getHostIP())) { + res.set(pod.getStatus().getPodIP()); + } + }); + return res.get(); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/LockService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/LockService.java new file mode 100644 index 000000000..eb0bfbe4b --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/LockService.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.xiaomi.youpin.docean.anno.Service; +import lombok.extern.slf4j.Slf4j; +import run.mone.chaos.operator.util.GenKeyUtil; + +import javax.annotation.Resource; + +/** + * @author zhangxiaowei6 + * @Date 2024/4/18 14:58 + */ +@Slf4j +@Service +public class LockService { + + @Resource + private RedisCacheService cache; + public boolean chaosLock(Integer projectId, Integer pipelineId,String redisValue) { + String key = GenKeyUtil.genRedisLockKey(String.valueOf(projectId), String.valueOf(pipelineId)); + boolean res = cache.lockWithoutTime(key,redisValue); + log.info("ChaosTaskController.chaosLock key: {} ,res: {},redisValue: {}", key, res,redisValue); + return res; + } + + public void chaosUnLock(Integer projectId, Integer pipelineId) { + String key = GenKeyUtil.genRedisLockKey(String.valueOf(projectId), String.valueOf(pipelineId)); + boolean unlock = cache.unlock(key); + log.info("ChaosTaskController.chaosUnLock res: {}", unlock); + } + + public boolean chaosRecoverLock(Integer projectId, Integer pipelineId) { + String key = GenKeyUtil.genRecoverRedisLockKey(String.valueOf(projectId), String.valueOf(pipelineId)); + boolean res = cache.lock(key, 60*1000); + log.info("ChaosTaskController.chaosRecoverLock key: {} ,res: {}", key, res); + return res; + } + + public void chaosRecoverUnLock(Integer projectId, Integer pipelineId) { + String key = GenKeyUtil.genRecoverRedisLockKey(String.valueOf(projectId), String.valueOf(pipelineId)); + boolean unlock = cache.unlock(key); + log.info("ChaosTaskController.chaosRecoverUnLock res: {}", unlock); + } + + public String getReentrantLockValue(int projectId,int pipelineId) { + String key = GenKeyUtil.genRedisLockKey(String.valueOf(projectId), String.valueOf(pipelineId)); + return cache.get(key); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ProjectService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ProjectService.java new file mode 100644 index 000000000..60facbde1 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/ProjectService.java @@ -0,0 +1,75 @@ +///* +// * Copyright 2020 Xiaomi +// * +// * 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 run.mone.chaos.operator.service; +// +//import com.xiaomi.mone.tpc.api.service.ProjectFacade; +//import com.xiaomi.mone.tpc.common.param.ProjectQryParam; +//import com.xiaomi.mone.tpc.common.vo.ProjectVoV2; +//import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +//import com.xiaomi.youpin.docean.anno.Service; +//import com.xiaomi.youpin.docean.plugin.config.anno.Value; +//import com.xiaomi.youpin.docean.plugin.dubbo.anno.Reference; +//import lombok.extern.slf4j.Slf4j; +//import org.apache.commons.collections4.CollectionUtils; +//import org.apache.commons.lang3.tuple.Pair; +// +//import javax.annotation.Resource; +//import java.util.List; +// +//@Slf4j +//@Service +//public class ProjectService { +// +// @Reference(interfaceClass = ProjectFacade.class, group = "$ref.tpc.service.group", check = true, timeout = 15000, version = "1.0") +// private ProjectFacade projectFacade; +// +// @Resource +// private ChaosBackendService backendService; +// +// @Value("$is.local") +// private String isLocal; +// +// public Pair checkUserProjectAuth(String projectName, AuthUserVo userVo) { +// if ("true".equals(isLocal)) { +// return Pair.of(0, "ok"); +// } +// List projectFromTpc = getProjectFromTpc(projectName, userVo.getAccount(), userVo.getUserType()); +// // 如果用户没有项目权限,并且不是admin,则返回错误 +// if (CollectionUtils.isEmpty(projectFromTpc) && !backendService.isAdmin(userVo.getAccount())) { +// return Pair.of(-1, "用户没有该项目权限"); +// } +// return Pair.of(0, "ok"); +// } +// +// public List getProjectFromTpc(String projectName, String account, Integer userType) { +// ProjectQryParam projectQryParam = new ProjectQryParam(); +// projectQryParam.setAccount(account); +// projectQryParam.setName(projectName); +// projectQryParam.setUserType(userType); +// projectQryParam.setNeedTopSort(true); +// return projectFacade.search(projectQryParam).getData(); +// } +// +// public List getProjectFromTpcWithOutProjectName(String account, Integer userType) { +// ProjectQryParam projectQryParam = new ProjectQryParam(); +// projectQryParam.setAccount(account); +// projectQryParam.setUserType(userType); +// projectQryParam.setNeedTopSort(true); +// return projectFacade.search(projectQryParam).getData(); +// } +// +// +//} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/RedisCacheService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/RedisCacheService.java new file mode 100644 index 000000000..ae440c579 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/RedisCacheService.java @@ -0,0 +1,284 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + + +import com.xiaomi.youpin.docean.anno.Service; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.pool2.impl.GenericObjectPoolConfig; +import org.springframework.util.StringUtils; +import redis.clients.jedis.HostAndPort; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisCluster; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.params.SetParams; +import run.mone.chaos.operator.common.Config; + +import javax.annotation.PostConstruct; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +@Slf4j +@Service +public class RedisCacheService { + + private JedisPool pool = null; + + private JedisCluster jedisCluster = null; + + // init nacos + public void init() { + log.info("Init RedisCacheService"); + String redisAddress = Config.ins().get("redis.address", ""); + String redisPWD = Config.ins().get("redis.password", ""); + String redisCluster = Config.ins().get("redis.cluster", "no"); + log.info("Redis address: {}, Password: {},redisCluster:{}", redisAddress, redisPWD, redisCluster); + + if (StringUtils.isEmpty(redisAddress)) { + throw new IllegalArgumentException("Redis address is null"); + } + + String maxActive = Config.ins().get("redis.maxActive", "24"); + String maxWait = Config.ins().get("redis.maxWait", "1000"); + String maxIdle = Config.ins().get("redis.maxIdle", "8"); + String redisTimeout = Config.ins().get("redis.timeout", "2000"); + + GenericObjectPoolConfig config = new GenericObjectPoolConfig(); + config.setMaxIdle(Integer.parseInt(maxIdle)); + config.setMinIdle(0); + config.setMaxTotal(Integer.parseInt(maxActive)); + config.setMaxWaitMillis(Integer.parseInt(maxWait)); + log.info("Chaos Redis config: {}", config.toString()); + + try { + if ("yes".equalsIgnoreCase(redisCluster)) { + // Cluster mode + String[] addrArr = redisAddress.split(","); + Set jedisClusterNodes = new HashSet<>(); + for (String addr : addrArr) { + String[] infos = addr.split(":"); + if (infos.length != 2) { + throw new IllegalArgumentException("Redis address is in an invalid format"); + } + jedisClusterNodes.add(new HostAndPort(infos[0], Integer.parseInt(infos[1]))); + } + if (StringUtils.isEmpty(redisPWD)) { + jedisCluster = new JedisCluster(jedisClusterNodes, 3000, Integer.parseInt(redisTimeout), 3, config); + } else { + jedisCluster = new JedisCluster(jedisClusterNodes, 3000, Integer.parseInt(redisTimeout), 3, redisPWD, config); + } + } else { + // Single node mode + String[] infos = redisAddress.split(":"); + if (infos.length != 2) { + throw new IllegalArgumentException("Redis address is in an invalid format"); + } + if (StringUtils.isEmpty(redisPWD)) { + throw new IllegalArgumentException("Redis password is null"); + } + pool = new JedisPool(config, infos[0], Integer.parseInt(infos[1]), Integer.parseInt(redisTimeout), redisPWD); + } + } catch (Exception e) { + log.error("Chaos Redis initialization error: {}", e.getMessage()); + } + } + + + /* + * key 锁 + * expireTime 毫秒超时时间 + * */ + public boolean lock(String key, long expireTime) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + SetParams params = new SetParams(); + params.px(expireTime); + params.nx(); + String opRes = jedis.set(key, "1", params); + return opRes.equals("OK"); + } + } + + if (jedisCluster != null) { + SetParams params = new SetParams(); + params.px(expireTime); + params.nx(); + String opRes = jedisCluster.set(key, "1", params); + return opRes.equals("OK"); + } + throw new RuntimeException("redisPool is null"); + } + + /* + * key 锁 + * 注意:未在进行的状态才可以加锁 + * */ + public boolean lockWithoutTime(String key) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + SetParams params = new SetParams(); + params.nx(); + String opRes = jedis.set(key, "1", params); + if (StringUtils.isEmpty(opRes)) { + return false; + } + return opRes.equals("OK"); + } + } + + + if (jedisCluster != null) { + SetParams params = new SetParams(); + params.nx(); + String opRes = jedisCluster.set(key, "1", params); + if (StringUtils.isEmpty(opRes)) { + return false; + } + return opRes.equals("OK"); + } + + throw new RuntimeException("redisPool is null"); + } + + public boolean lockWithoutTime(String key,String value) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + SetParams params = new SetParams(); + params.nx(); + String opRes = jedis.set(key, value, params); + if (StringUtils.isEmpty(opRes)) { + return false; + } + return opRes.equals("OK"); + } + } + + + if (jedisCluster != null) { + SetParams params = new SetParams(); + params.nx(); + String opRes = jedisCluster.set(key, value, params); + if (StringUtils.isEmpty(opRes)) { + return false; + } + return opRes.equals("OK"); + } + + throw new RuntimeException("redisPool is null"); + } + + public boolean set(String key,String value) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + SetParams params = new SetParams(); + params.nx(); + String opRes = jedis.set(key, value, params); + if (StringUtils.isEmpty(opRes)) { + return false; + } + return opRes.equals("OK"); + } + } + + + if (jedisCluster != null) { + SetParams params = new SetParams(); + params.nx(); + String opRes = jedisCluster.set(key, value, params); + if (StringUtils.isEmpty(opRes)) { + return false; + } + return opRes.equals("OK"); + } + + throw new RuntimeException("redisPool is null"); + } + + /* + * key 锁 + * */ + public boolean unlock(String key) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + Long del = jedis.del(key); + return del == 1; + } + } + + if (jedisCluster != null) { + Long del = jedisCluster.del(key); + return del == 1; + } + + throw new RuntimeException("redisPool is null"); + } + + // 未开始、已恢复状态可以加锁,进行中不可加 + public boolean lockByStatus(String key, long expireTime) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + SetParams params = new SetParams(); + params.px(expireTime); + params.nx(); + String opRes = jedis.set(key, "1", params); + return opRes.equals("OK"); + } + } + throw new RuntimeException("redisPool is null"); + } + + // recover完成后,释放锁,只有恢复状态的锁可以释放 + public boolean unlockByStatus(String key) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + Long del = jedis.del(key); + return del == 1; + } + } + throw new RuntimeException("redisPool is null"); + } + + public String get(String key) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + return jedis.get(key); + } + } + + if (jedisCluster != null) { + return jedisCluster.get(key); + } + throw new RuntimeException("redisPool is null"); + } + + public boolean del(String key) { + if (pool != null) { + try (Jedis jedis = pool.getResource()) { + Long del = jedis.del(key); + return del == 1; + } + } + + if (jedisCluster != null) { + Long del = jedisCluster.del(key); + return del == 1; + } + + throw new RuntimeException("redisPool is null"); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/TaskBaseService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/TaskBaseService.java new file mode 100644 index 000000000..9c3f4524e --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/TaskBaseService.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.google.gson.Gson; +import com.xiaomi.youpin.docean.Ioc; +import com.xiaomi.youpin.docean.mvc.MvcResult; +import io.fabric8.kubernetes.api.model.Pod; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.ObjectUtils; +import run.mone.chaos.operator.bo.CreateChaosTaskBo; +import run.mone.chaos.operator.bo.PipelineBO; +import run.mone.chaos.operator.bo.chaosBot.CreateBotCronBo; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dto.grpc.GrpcPodAndChannel; + +import javax.annotation.Resource; +import java.util.*; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-11 14:39 + */ +@Slf4j +public abstract class TaskBaseService { + + + public Gson gson = new Gson(); + + public abstract String save(CreateChaosTaskBo createChaosTaskBo, PipelineBO pipelineBO, Integer taskStatus); + + public abstract String execute(ChaosTask chaosTask); + + public abstract String recover(ChaosTask chaosTask); + + public String wheelTimer(ChaosTask chaosTask) { + TaskWheelTimer taskWheelTimer = Ioc.ins().getBean(TaskWheelTimer.class); + taskWheelTimer.newTimeout(() -> { + ChaosTaskService chaosTaskService = Ioc.ins().getBean(ChaosTaskService.class); + ChaosTask chaosTaskById = chaosTaskService.getChaosTaskById(chaosTask.getId().toString()); + try { + if (chaosTaskById == null) { + log.warn("chaos is null , id:{}", chaosTask.getId().toString()); + return; + } + if (chaosTaskById.getStatus() != StatusEnum.actioning.type()) { + log.warn("chaos id:{}, status:{}", chaosTask.getId().toString(), chaosTaskById.getStatus()); + return; + } + log.warn("taskWheelTimer kill task, id:{}", chaosTask.getId().toString()); + + boolean chaosRecoverLock = ((LockService) Ioc.ins().getBean(LockService.class)).chaosRecoverLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + if (chaosRecoverLock) { + recover(chaosTaskById); + ((LockService) Ioc.ins().getBean(LockService.class)).chaosRecoverUnLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + ((LockService) Ioc.ins().getBean(LockService.class)).chaosUnLock(chaosTaskById.getProjectId(), chaosTaskById.getPipelineId()); + } else { + log.info("taskWheelTimer kill task, id:{}, lock fail", chaosTask.getId().toString()); + } + } catch (Exception e) { + log.error("stress task taskWheelTimer error, taskId:{}", chaosTask.getId().toString(), e); + } + }, chaosTask.getDuration()); + return null; + } + + public List getSelectedChannels(ChaosTask chaosTask, List grpcPodAndChannels, Random random) { + Set usedIndices = new HashSet<>(); + List selectedChannels = new ArrayList<>(); + + if (ObjectUtils.isEmpty(chaosTask.getContainerNum()) || chaosTask.getContainerNum() > grpcPodAndChannels.size()) { + chaosTask.setContainerNum(1); + } + + while (selectedChannels.size() < chaosTask.getContainerNum() && usedIndices.size() < grpcPodAndChannels.size()) { + int randomIndex = random.nextInt(grpcPodAndChannels.size()); + if (usedIndices.add(randomIndex)) { + GrpcPodAndChannel grpcPodAndChannel = grpcPodAndChannels.get(randomIndex); + selectedChannels.add(grpcPodAndChannel); + } + } + return selectedChannels; + } + + + public List getPods(ChaosTask chaosTask, List podList) { + Set usedIndices = new HashSet<>(); + List selectedPods = new ArrayList<>(); + if (ObjectUtils.isEmpty(chaosTask.getContainerNum()) || chaosTask.getContainerNum() > podList.size()) { + chaosTask.setContainerNum(1); + } + while (selectedPods.size() < chaosTask.getContainerNum()) { + Random random = new Random(); + int index = random.nextInt(podList.size()); + if (usedIndices.add(index)) { + selectedPods.add(podList.get(index)); + } + } + return selectedPods; + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/TaskWheelTimer.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/TaskWheelTimer.java new file mode 100644 index 000000000..2b779d93f --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/TaskWheelTimer.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.xiaomi.youpin.docean.anno.Service; +import io.netty.util.HashedWheelTimer; +import io.netty.util.Timeout; + +import java.util.concurrent.TimeUnit; + +@Service +public class TaskWheelTimer { + + private HashedWheelTimer hashedWheelTimer; + + public void init() { + hashedWheelTimer = new HashedWheelTimer(100, TimeUnit.MILLISECONDS, 512); + } + + + public Timeout newTimeout(Runnable runnable, long delay) { + return hashedWheelTimer.newTimeout(timeout -> runnable.run(), delay, TimeUnit.MILLISECONDS); + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/UserService.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/UserService.java new file mode 100644 index 000000000..15a25e9fc --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/UserService.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service; + +import com.alibaba.nacos.api.config.annotation.NacosValue; +import com.xiaomi.mone.tpc.api.service.NodeUserFacade; +import com.xiaomi.mone.tpc.api.service.UserFacade; +import com.xiaomi.mone.tpc.api.service.UserOrgFacade; +import com.xiaomi.mone.tpc.common.enums.NodeUserRelTypeEnum; +import com.xiaomi.mone.tpc.common.param.NodeUserQryParam; +import com.xiaomi.mone.tpc.common.param.NullParam; +import com.xiaomi.mone.tpc.common.vo.NodeUserRelVo; +import com.xiaomi.mone.tpc.common.vo.OrgInfoVo; +import com.xiaomi.mone.tpc.common.vo.PageDataVo; +import com.xiaomi.mone.tpc.login.util.UserUtil; +import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +import com.xiaomi.youpin.docean.anno.Service; +import com.xiaomi.youpin.docean.mvc.ContextHolder; +import com.xiaomi.youpin.docean.plugin.dubbo.anno.Reference; +import com.xiaomi.youpin.infra.rpc.Result; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.dubbo.config.annotation.DubboReference; +import run.mone.chaos.operator.vo.UserInfoVo; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +@Service +@Slf4j +public class UserService { + + @Reference(group = "${ref.tpc.service.group}", interfaceClass = NodeUserFacade.class, version = "1.0") + private NodeUserFacade nodeUserFacade; + + @Reference(group = "${ref.tpc.service.group}", interfaceClass = UserOrgFacade.class, version = "1.0") + private UserOrgFacade userOrgFacade; + + @Reference(group = "${ref.tpc.service.group}", interfaceClass = UserFacade.class, version = "1.0") + private UserFacade userFacade; + + @Resource + private ChaosBackendService backendService; + + public UserInfoVo getUserInfo() { + AuthUserVo userVo = ((AuthUserVo) ContextHolder.getContext().get().getSession().getAttribute("TPC_USER")); + if (userVo == null) { + return null; + } + UserInfoVo userInfo = new UserInfoVo(); + userInfo.setDisplayName(userVo.getName()); + userInfo.setEmail(userVo.getEmail()); + userInfo.setName(userVo.getName()); + userInfo.setUsername(userVo.getAccount()); + userInfo.setFullAccount(userVo.genFullAccount()); + userInfo.setAvatar(userVo.getAvatarUrl()); + Optional userOrgInfo = getUserOrgInfo(userVo.getAccount()); + userInfo.setTenant(!userOrgInfo.isPresent() ? "" : userOrgInfo.get().getIdPath()); + userInfo.setUserType(userVo.getUserType()); + userInfo.setAdmin(backendService.isAdmin(userVo.getAccount())); + return userInfo; + } + + /** + * 根据用户名获取用户组织信息,若成功则返回包含OrgInfoVo的Optional,失败则记录警告并返回空的Optional。 + */ + public Optional getUserOrgInfo(String userName) { + NullParam param = new NullParam(); + param.setAccount(userName); + param.setUserType(0); + try { + return Optional.ofNullable(userOrgFacade.getOrgByAccount(param).getData()); + } catch (Exception e) { + log.warn("[LoginService.getAccountFromSession], failed to getOrgByAccount, msg: {} ", e.getMessage()); + } + return Optional.empty(); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/impl/PodChaosServiceImpl.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/impl/PodChaosServiceImpl.java new file mode 100644 index 000000000..aadaf8e26 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/service/impl/PodChaosServiceImpl.java @@ -0,0 +1,503 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.service.impl; + +import com.google.common.collect.Maps; +import com.google.protobuf.Empty; +import com.xiaomi.youpin.docean.anno.Service; +import com.xiaomi.youpin.docean.common.Pair; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.ContainerStatus; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.api.model.PodList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import io.grpc.ManagedChannel; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import pb.ChaosDaemonGrpc; +import pb.Chaosdaemon; +import run.mone.chaos.operator.aspect.anno.GenerateReport; +import run.mone.chaos.operator.bo.CreateChaosTaskBo; +import run.mone.chaos.operator.bo.IOBO; +import run.mone.chaos.operator.bo.PipelineBO; +import run.mone.chaos.operator.bo.PodBO; +import run.mone.chaos.operator.constant.CmdConstant; +import run.mone.chaos.operator.constant.ModeEnum; +import run.mone.chaos.operator.constant.StatusEnum; +import run.mone.chaos.operator.constant.TaskEnum; +import run.mone.chaos.operator.dao.domain.ChaosTask; +import run.mone.chaos.operator.dao.domain.InstanceUidAndIP; +import run.mone.chaos.operator.dao.domain.PodPO; +import run.mone.chaos.operator.dao.impl.ChaosTaskDao; +import run.mone.chaos.operator.dto.grpc.GrpcPodAndChannel; +import run.mone.chaos.operator.service.GrpcChannelService; +import run.mone.chaos.operator.service.TaskBaseService; +import run.mone.chaos.operator.util.AnnotationUtil; +import run.mone.chaos.operator.util.CommonUtil; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-11 14:42 + */ +@Slf4j +@Service +public class PodChaosServiceImpl extends TaskBaseService { + + @Resource + private ChaosTaskDao taskDao; + + @Resource(name = "podClient") + private MixedOperation> podClient; + + @Resource + private GrpcChannelService grpcChannelService; + + @Override + public String save(CreateChaosTaskBo taskBo, PipelineBO pipelineBO, Integer taskStatus) { + log.info("save pod task param createChaosTaskBo={},pipelineBO={},taskStatus={}", taskBo, pipelineBO, taskStatus); + ChaosTask chaosTask = ChaosTask.of(taskBo, taskStatus); + PodBO podBO = new PodBO(); + BeanUtils.copyProperties(pipelineBO, podBO); + PodPO podPO = new PodPO(); + BeanUtils.copyProperties(podBO, podPO); + podPO.setPodIpList(podBO.getPodIpList()); + List instanceUidAndIPList = new ArrayList<>(); + if (taskBo.getMode() == ModeEnum.APPOINT.type()) { + Optional.ofNullable(taskBo.getPodIpList()).ifPresent(ipList -> { + ipList.forEach(ip -> { + InstanceUidAndIP instance = new InstanceUidAndIP(); + instance.setIp(ip); + instanceUidAndIPList.add(instance); + }); + }); + } + chaosTask.setInstanceAndIps(instanceUidAndIPList); + podPO.setInstanceUidAndIPList(instanceUidAndIPList); + chaosTask.setPodPO(podPO); + taskDao.insert(chaosTask); + return chaosTask.getId().toString(); + } + + @Override + @GenerateReport + public String execute(ChaosTask chaosTask) { + try { + List podList = podClient.inAnyNamespace().withLabel("pipeline-id", chaosTask.getPipelineId() + .toString()).list().getItems(); + if (podList == null || podList.isEmpty()) { + return "not found pod!"; + } + PodPO podPO = chaosTask.getPodPO(); + switch (podPO.getType()) { + case "killContainer" -> { + return containerKill(podPO, podList, chaosTask); + } + case "killPod" -> { + return podKill(podPO, podList, chaosTask); + } + case "FailurePod" -> { + return podFailure(podPO, podList, chaosTask); + } + case null, default -> { + return "unknown type"; + } + } + } catch (Exception e) { + log.error("podChaos type: {} error:{}", chaosTask.getPodPO().getType(), e); + return "error"; + } + } + + @Override + @GenerateReport + public String recover(ChaosTask chaosTask) { + try { + List podList = podClient.inAnyNamespace().withLabel("pipeline-id", chaosTask.getPipelineId() + .toString()).list().getItems(); + if (podList == null || podList.isEmpty()) { + return "not found pod!"; + } + + PodPO podPO = chaosTask.getPodPO(); + if (!"FailurePod".equals(podPO.getType())) { + //恢复目前只有替换镜像的恢复,其他直接返回ok + Map updateMap = new HashMap<>(1); + updateMap.put("status", StatusEnum.recovered.type()); + taskDao.update(chaosTask.getId(), updateMap); + return chaosTask.getId().toString(); + } + if (chaosTask.getStatus() != StatusEnum.actioning.type()) { + return "异常:实验状态不为actioning,请联系xxx!"; + } + ModeEnum modeEnum = ModeEnum.fromType(chaosTask.getModeType()); + if (modeEnum.equals(ModeEnum.APPOINT)) { + List instanceUidAndIPList = chaosTask.getPodPO().getInstanceUidAndIPList(); + List pods = CommonUtil.getExecutedPod(podList, instanceUidAndIPList.stream() + .map(InstanceUidAndIP::getIp).collect(Collectors.toList())); + if (pods.isEmpty()) { + return "需要恢复的pod列表为空"; + } else { + podList = pods; + } + } + switch (modeEnum) { + case ANY: + case ALL: + case APPOINT: + // 不需要区分mode,里面有检测 + podList.forEach(pod -> FailureRecover(pod, chaosTask)); + break; + case null, default: + return "Invalid mode!"; + } + + Map updateMap = new HashMap<>(1); + updateMap.put("status", StatusEnum.recovered.type()); + taskDao.update(chaosTask.getId(), updateMap); + return chaosTask.getId().toString(); + } catch (Exception e) { + log.error("podChaos recover error:{}", e); + return "error"; + } + } + + public String containerKill(PodPO podPO, List podList, ChaosTask chaosTask) { + + List grpcPodAndChannels = grpcChannelService.grpcPodAndChannelList(podList); + if (grpcPodAndChannels.isEmpty()) { + return "unable to connect any grpc server!"; + } + + ModeEnum modeEnum = ModeEnum.fromType(chaosTask.getModeType()); + if (modeEnum.equals(ModeEnum.APPOINT)) { + List ips = CommonUtil.getExcludedIPs(podList, chaosTask.getPodPO().getInstanceUidAndIPList() + .stream().map(InstanceUidAndIP::getIp).toList()); + if (!ips.isEmpty()) { + return "流水线不存在ip:" + String.join(",", ips) + ",请重新设置"; + } + } + switch (modeEnum) { + case ANY -> killRandomContainers(grpcPodAndChannels, chaosTask); + case ALL -> killAllContainers(podList, grpcPodAndChannels, chaosTask); + case APPOINT -> { + if (podPO.getPodIpList() == null || podPO.getPodIpList().isEmpty()) { + return "podIpList is empty"; + } + List ips = chaosTask.getPodPO().getInstanceUidAndIPList().stream().map(InstanceUidAndIP::getIp).toList(); + killAppointedContainers(ips, grpcPodAndChannels, chaosTask); + } + default -> { + return "Invalid mode!"; + } + } + + return chaosTask.getId().toString(); + } + + private void updateStatus(List podIp, ChaosTask chaosTask, Integer status) { + List instanceUidAndIPList = new ArrayList<>(); + podIp.forEach(ip -> { + InstanceUidAndIP instance = new InstanceUidAndIP(); + instance.setIp(ip); + instanceUidAndIPList.add(instance); + }); + Map map = Maps.newHashMap(); + map.put("status", status); + map.put("endTime", System.currentTimeMillis() + chaosTask.getDuration()); + map.put("updateUser", chaosTask.getUpdateUser()); + map.put("instanceAndIps", instanceUidAndIPList); + map.put("executedTimes", chaosTask.getExecutedTimes()); + int update = taskDao.update(chaosTask.getId(), map); + log.info("podChaos update res: {}", update); + } + + public String podKill(PodPO podPO, List podList, ChaosTask chaosTask) { + try { + ModeEnum modeEnum = ModeEnum.fromType(chaosTask.getModeType()); + if (modeEnum.equals(ModeEnum.APPOINT)) { + List ips = CommonUtil.getExcludedIPs(podList, chaosTask.getPodPO() + .getInstanceUidAndIPList().stream().map(InstanceUidAndIP::getIp).toList()); + if (!ips.isEmpty()) { + return "流水线不存在ip:" + String.join(",", ips) + ",请重新设置"; + } + } + switch (modeEnum) { + case ANY -> deleteRandomPod(podList, chaosTask); + case ALL -> deleteAllPods(podList, chaosTask); + case APPOINT -> deleteAppointedPods(podList, chaosTask.getPodPO() + .getInstanceUidAndIPList().stream().map(InstanceUidAndIP::getIp).toList(), chaosTask); + case null, default -> { + return "Invalid mode!"; + } + } + + return chaosTask.getId().toString(); + } catch (Exception e) { + log.error("pod kill error:{}", e); + return "error"; + } + } + + public String podFailure(PodPO podPO, List podList, ChaosTask chaosTask) { + try { + ModeEnum modeEnum = ModeEnum.fromType(chaosTask.getModeType()); + if (modeEnum.equals(ModeEnum.APPOINT)) { + List ips = CommonUtil.getExcludedIPs(podList, chaosTask.getPodPO() + .getInstanceUidAndIPList().stream().map(InstanceUidAndIP::getIp).toList()); + if (!ips.isEmpty()) { + return "流水线不存在ip:" + String.join(",", ips) + ",请重新设置"; + } + } + switch (modeEnum) { + case ANY -> failureRandomPod(podList, chaosTask); + case ALL -> failureAllPods(podList, chaosTask); + case APPOINT -> failureAppointedPods(podList, chaosTask.getPodPO().getInstanceUidAndIPList() + .stream().map(InstanceUidAndIP::getIp).toList(), chaosTask); + case null, default -> { + return "Invalid mode!"; + } + } + // 时间轮终止任务 + wheelTimer(chaosTask); + return chaosTask.getId().toString(); + } catch (Exception e) { + log.error("pod failure error:{}", e); + return "error"; + } + } + + private void FailureRecover(Pod pod, ChaosTask chaosTask) { + log.info("begin FailureRecover ns :{},name :{}", pod.getMetadata().getNamespace(), pod.getMetadata().getName()); + //替换container镜像 + // 只执行给定容器 + String containId = CommonUtil.getContainerIdByName(pod, chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + List containerStatuses = pod.getStatus().getContainerStatuses(); + List containers = pod.getSpec().getContainers(); + String needContainerName = containerStatuses.stream().filter(container -> container.getContainerID() + .equals(containId)).map(ContainerStatus::getName).findFirst().get(); + String podName = pod.getMetadata().getName(); + containers.forEach(container -> { + if (needContainerName.equals(container.getName())) { + String containerName = container.getName(); + String annotationRecord = AnnotationUtil.GenKeyForImage(podName, containerName, false); + log.info("FailureRecover.GenKeyForImage: {},isInit:{}", annotationRecord, false); + if (pod.getMetadata().getAnnotations() == null) { + pod.getMetadata().setAnnotations(new HashMap()); + } + //判断是否有特殊标记 + if (pod.getMetadata().getAnnotations().containsKey(annotationRecord)) { + String originImage = pod.getMetadata().getAnnotations().get(annotationRecord); + container.setImage(originImage); + pod.getMetadata().getAnnotations().remove(annotationRecord); + } else { + log.error("FailureRecover.fail not valid annotationRecord ,correct is :{},podName :{} containerName :{},is init:{}" + , annotationRecord, podName, containerName, false); + } + } + }); + pod.getSpec().setContainers(containers); + + //替换initContainer镜像 + List initContainers = pod.getSpec().getInitContainers(); + initContainers.forEach(container -> { + if (needContainerName.equals(container.getName())) { + String containerName = container.getName(); + String annotationRecord = AnnotationUtil.GenKeyForImage(podName, containerName, true); + log.info("FailurePod.GenKeyForImage: {},isInit:{}", annotationRecord, true); + if (pod.getMetadata().getAnnotations() == null) { + pod.getMetadata().setAnnotations(new HashMap()); + } + //判断是否有特殊标记 + if (pod.getMetadata().getAnnotations().containsKey(annotationRecord)) { + String originImage = pod.getMetadata().getAnnotations().get(annotationRecord); + container.setImage(originImage); + pod.getMetadata().getAnnotations().remove(annotationRecord); + } else { + log.error("FailureRecover.fail not valid annotationRecord ,correct is :{},podName :{} containerName :{},is init:{}" + , annotationRecord, podName, containerName, true); + } + } + }); + pod.getSpec().setInitContainers(initContainers); + //写回 + podClient.inNamespace(pod.getMetadata().getNamespace()).replace(pod); + } + + private void failureRandomPod(List podList, ChaosTask chaosTask) { + Random random = new Random(System.currentTimeMillis()); + Pod pod = podList.get(random.nextInt(podList.size())); + // 只执行给定容器 + String containId = CommonUtil.getContainerIdByName(pod, chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + FailurePod(pod, containId); + updateStatus(List.of(pod.getStatus().getPodIP()), chaosTask, StatusEnum.actioning.type()); + } + + private void FailurePod(Pod pod, String containerId) { + log.info("begin FailurePod ns :{},name :{}", pod.getMetadata().getNamespace(), pod.getMetadata().getName()); + + //替换container镜像 + List containerStatuses = pod.getStatus().getContainerStatuses(); + List containers = pod.getSpec().getContainers(); + String needContainerName = containerStatuses.stream().filter(container -> container.getContainerID() + .equals(containerId)).map(ContainerStatus::getName).findFirst().get(); + containers.forEach(container -> { + if (container.getName().equals(needContainerName)) { + String originImage = container.getImage(); + String containerName = container.getName(); + String annotationRecord = AnnotationUtil.GenKeyForImage(originImage, containerName, false); + log.info("FailurePod.GenKeyForImage: {},isInit:{}", annotationRecord, false); + if (pod.getMetadata().getAnnotations() == null) { + pod.getMetadata().setAnnotations(new HashMap()); + } + //如果注释有了,跳过此容器 + Map annotations = pod.getMetadata().getAnnotations(); + if (annotations.containsKey(annotationRecord)) { + return; + } + //写入注释与pause镜像 + annotations.put(annotationRecord, originImage); + container.setImage(CmdConstant.POD_FAILURE_PAUSE_IMAGE); + } + }); + pod.getSpec().setContainers(containers); + + //替换initContainers镜像 + List initContainers = pod.getSpec().getInitContainers(); + String podName = pod.getMetadata().getName(); + initContainers.forEach(container -> { + if (container.getName().equals(needContainerName)) { + String originImage = container.getImage(); + String containerName = container.getName(); + String annotationRecord = AnnotationUtil.GenKeyForImage(podName, containerName, true); + log.info("FailurePod.GenKeyForImage: {},isInit:{}", annotationRecord, true); + if (pod.getMetadata().getAnnotations() == null) { + pod.getMetadata().setAnnotations(new HashMap()); + } + //如果注释有了,跳过此容器 + Map annotations = pod.getMetadata().getAnnotations(); + if (annotations.containsKey(annotationRecord)) { + return; + } + //写入注释与pause镜像 + annotations.put(annotationRecord, originImage); + container.setImage(CmdConstant.POD_FAILURE_PAUSE_IMAGE); + } + }); + pod.getSpec().setInitContainers(initContainers); + //写回 + podClient.inNamespace(pod.getMetadata().getNamespace()).replace(pod); + } + + private void failureAllPods(List podList, ChaosTask chaosTask) { + // 只执行给定容器 + podList.forEach(pod -> { + String containId = CommonUtil.getContainerIdByName(pod, chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + FailurePod(pod, containId); + }); + updateStatus(podList.stream().map(it -> it.getStatus().getPodIP()).toList(), chaosTask, StatusEnum.actioning.type()); + } + + private void failureAppointedPods(List podList, List podIpList, ChaosTask chaosTask) { + if (podIpList == null || podIpList.isEmpty()) { + throw new IllegalArgumentException("podIpList is empty"); + } + + podList.forEach(pod -> { + if (podIpList.contains(pod.getStatus().getPodIP())) { + String containId = CommonUtil.getContainerIdByName(pod, chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + FailurePod(pod, containId); + } + }); + updateStatus(podIpList, chaosTask, StatusEnum.actioning.type()); + } + + private void deleteRandomPod(List podList, ChaosTask chaosTask) { + Random random = new Random(System.currentTimeMillis()); + Pod pod = podList.get(random.nextInt(podList.size())); + podClient.inNamespace(pod.getMetadata().getNamespace()).delete(pod); + updateStatus(List.of(pod.getStatus().getPodIP()), chaosTask, StatusEnum.actioning.type()); + } + + private void deleteAllPods(List podList, ChaosTask chaosTask) { + podList.forEach(pod -> { + podClient.inNamespace(pod.getMetadata().getNamespace()).delete(pod); + }); + updateStatus(podList.stream().map(it -> it.getStatus().getPodIP()).toList(), chaosTask, StatusEnum.actioning.type()); + } + + private void deleteAppointedPods(List podList, List podIpList, ChaosTask chaosTask) { + if (podIpList == null || podIpList.isEmpty()) { + throw new IllegalArgumentException("podIpList is empty"); + } + + podList.forEach(pod -> { + if (podIpList.contains(pod.getStatus().getPodIP())) { + podClient.inNamespace(pod.getMetadata().getNamespace()).delete(pod); + } + }); + updateStatus(podIpList, chaosTask, StatusEnum.actioning.type()); + } + + private void killRandomContainers(List grpcPodAndChannels, ChaosTask chaosTask) { + + Random random = new Random(System.currentTimeMillis()); + GrpcPodAndChannel grpcPodAndChannel = grpcPodAndChannels.get(random.nextInt(grpcPodAndChannels.size())); + String containId = CommonUtil.getContainerIdByName(grpcPodAndChannel.getPod(), chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + + killContainer(grpcPodAndChannel.getPod(), grpcPodAndChannel.getChannel(), containId); + updateStatus(List.of(grpcPodAndChannel.getPod().getStatus().getPodIP()), chaosTask, StatusEnum.actioning.type()); + } + + private void killAllContainers(List podList, List grpcPodAndChannels, ChaosTask chaosTask) { + grpcPodAndChannels.forEach(podAndChannel -> { + String containId = CommonUtil.getContainerIdByName(podAndChannel.getPod(), chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + killContainer(podAndChannel.getPod(), podAndChannel.getChannel(), containId); + }); + updateStatus(grpcPodAndChannels.stream().map(it -> it.getPod().getStatus().getPodIP()).toList(), chaosTask, StatusEnum.actioning.type()); + } + + private void killAppointedContainers(List ips, List grpcPodAndChannels, ChaosTask chaosTask) { + grpcPodAndChannels.forEach(podAndChannel -> { + if (ips.contains(podAndChannel.getPod().getStatus().getPodIP())) { + String containId = CommonUtil.getContainerIdByName(podAndChannel.getPod(), chaosTask.getContainerName(), + chaosTask.getProjectId(), chaosTask.getPipelineId()); + killContainer(podAndChannel.getPod(), podAndChannel.getChannel(), containId); + } + }); + updateStatus(ips, chaosTask, StatusEnum.actioning.type()); + } + + private void killContainer(Pod pod, ManagedChannel channel, String containId) { + log.info("begin killContainer name:{}", pod.getMetadata().getName()); + Chaosdaemon.ContainerRequest containerRequest = Chaosdaemon.ContainerRequest.newBuilder() + .setContainerId(containId).setAction(Chaosdaemon.ContainerAction.newBuilder() + .setAction(Chaosdaemon.ContainerAction.Action.forNumber(0))).build(); + Empty empty = ChaosDaemonGrpc.newBlockingStub(channel).containerKill(containerRequest); + log.info("killContainer req :{},res :{}", containerRequest, empty); + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/util/AnnotationUtil.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/util/AnnotationUtil.java new file mode 100644 index 000000000..a65b270fc --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/util/AnnotationUtil.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.util; + +import io.fabric8.kubernetes.api.model.Pod; +import org.apache.commons.lang3.StringUtils; +import run.mone.chaos.operator.constant.CmdConstant; + +/** + * @author zhangxiaowei6 + * @Date 2023/12/6 10:48 + */ + + +public class AnnotationUtil { + + //生成pod的annotation,用于记录podFailure过程的原始信息 + + public static String GenKeyForImage(String podName, String containerName, boolean isInit) { + String doing = ""; + if (isInit) { + doing = String.format(CmdConstant.POD_FAILURE_ANNOTATION, containerName, podName, "-init"); + } else { + doing = String.format(CmdConstant.POD_FAILURE_ANNOTATION, containerName, podName, "-normal"); + } + + //超过63 直接用containerName记录 + if (StringUtils.length(doing) > 63) { + doing = containerName; + } + + return doing; + } +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/util/CommonUtil.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/util/CommonUtil.java new file mode 100644 index 000000000..f7ed8ed62 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/util/CommonUtil.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.util; + +import com.xiaomi.youpin.docean.common.Pair; +import io.fabric8.kubernetes.api.model.Pod; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +public class CommonUtil { + + /** + * 获取ipList不在podList的元素 + * @param podList + * @param ipList + * @return + */ + public static List getExcludedIPs(List podList, List ipList) { + List podIps = podList.stream().map(pod -> pod.getStatus().getPodIP()).collect(Collectors.toList()); + List ips = new ArrayList<>(); + for (String ip : ipList) { + if (!podIps.contains(ip)) { + ips.add(ip); + } + } + return ips; + } + + /** + * 获取ipList在podList的元素 + * @param podList + * @param ipList + * @return + */ + public static List getExecutedPod(List podList, List ipList) { + List pods = new ArrayList<>(); + for (Pod pod : podList) { + if (ipList.contains(pod.getStatus().getPodIP())) { + pods.add(pod); + } + } + return pods; + } + + /** + * 获取容器ID + * @param pod + * @param containerName + * @param projectId + * @param pipelineId + * @return + */ + public static String getContainerIdByName(Pod pod, String containerName, Integer projectId, Integer pipelineId) { + if ("main".equals(containerName)) { + containerName = projectId + "-0-" + pipelineId; + } + for (int i=0; i podIpList; + + private Long duration; + + private Integer taskType; + + private Integer status; + + private String containerName; + + private String operateParam; + + private String createUser; + + private Integer executedTimes; + + private Long startTime; + + private String executor; + + private Integer containerNum; + + public ChaosTaskDetailVO(ChaosTask chaosTask) { + id = chaosTask.getId().toString(); + experimentName = chaosTask.getExperimentName(); + pipelineId = chaosTask.getPipelineId(); + projectId = chaosTask.getProjectId(); + projectName = chaosTask.getProjectName(); + modeType = chaosTask.getModeType(); + duration = chaosTask.getDuration(); + taskType = chaosTask.getTaskType(); + status = chaosTask.getStatus(); + containerName = chaosTask.getContainerName(); + podIpList = chaosTask.getPodIpList(); + executedTimes = chaosTask.getExecutedTimes(); + containerNum = chaosTask.getContainerNum(); + } + + public ChaosTaskDetailVO() { + + } + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskInfoVO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskInfoVO.java new file mode 100644 index 000000000..6112b51ad --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskInfoVO.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-15 16:23 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class ChaosTaskInfoVO implements Serializable { + + /** + * 实验id + */ + private String id; + + /** + * 实验名称 + */ + private String experimentName; + + private String projectName; + + private String pipLineId; + + private Integer type; + + private Integer mode; + + private Integer status; + + private String creator; + + private Long createTime; + + private Integer executedTimes; + + private Long updateTime; + + private String updateUser; + + private Long duration; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskLogVO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskLogVO.java new file mode 100644 index 000000000..b2753c9d5 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskLogVO.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 17:02 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class ChaosTaskLogVO implements Serializable { + + private String logId; + + private String operator; + + private Long createTime; + + private Integer status; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskReportVO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskReportVO.java new file mode 100644 index 000000000..e77bdb9d6 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/ChaosTaskReportVO.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.vo; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 10:51 + */ +@Data +public class ChaosTaskReportVO implements Serializable { + + private String id; + + private String reportName; + + private Integer projectId; + + private String projectName; + + private Integer pipelineId; + + private String experimentId; + + private String experimentName; + + private Integer taskType; + + private Integer status; + + private String taskCreator; + + private Long createTime; + + /** + * 执行时间 + */ + private Long executeTime; + + private Integer executedTimes; + + private String operateParam; + + private String pipelineName; + + private String snapshot; + + private Integer containerNum; + + /** + * 执行流程 + */ + private List exeStep; + + /** + * 实验影响的实例信息 + */ + private List instanceInfoList; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/InstanceInfoVO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/InstanceInfoVO.java new file mode 100644 index 000000000..52c620718 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/InstanceInfoVO.java @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-16 14:30 + */ +@Data +public class InstanceInfoVO implements Serializable { + + private String instanceUid; + private String ip; + private String containerId; + +} + diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/PodLogUrlVO.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/PodLogUrlVO.java new file mode 100644 index 000000000..c71b98694 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/PodLogUrlVO.java @@ -0,0 +1,36 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author caobaoyu + * @description: + * @date 2024-04-22 17:28 + */ +@Data +public class PodLogUrlVO implements Serializable { + + private String ip; + + private String podName; + + private String logUrl; + +} diff --git a/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/UserInfoVo.java b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/UserInfoVo.java new file mode 100644 index 000000000..32d0b11d7 --- /dev/null +++ b/chaos/chaos-service/src/main/java/run.mone/chaos/operator/vo/UserInfoVo.java @@ -0,0 +1,49 @@ +/* + * Copyright 2020 Xiaomi + * + * 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 run.mone.chaos.operator.vo; + +import com.xiaomi.mone.tpc.login.vo.AuthUserVo; +import lombok.Data; + +@Data +public class UserInfoVo { + + private String fullAccount; + private int userType; + private String username;//用户账号 + private String name;//名称 + private String displayName;//展示名称 + private String email;//邮箱 + private String id;//id + private String avatar;//头像图片 + private String tenant; + private boolean admin; //是否admin + + + public static UserInfoVo convert(AuthUserVo userVo) { + UserInfoVo userInfo = new UserInfoVo(); + userInfo.setDisplayName(userVo.getName()); + userInfo.setEmail(userVo.getEmail()); + userInfo.setName(userVo.getName()); + userInfo.setUsername(userVo.getAccount()); + userInfo.setFullAccount(userVo.genFullAccount()); + userInfo.setAvatar(userVo.getAvatarUrl()); + userInfo.setUserType(userVo.getUserType()); + return userInfo; + } + + +} diff --git a/chaos/chaos-service/src/main/proto/chaosdaemon.proto b/chaos/chaos-service/src/main/proto/chaosdaemon.proto new file mode 100644 index 000000000..026ce3af6 --- /dev/null +++ b/chaos/chaos-service/src/main/proto/chaosdaemon.proto @@ -0,0 +1,319 @@ +syntax = "proto3"; + +package pb; + +import "google/protobuf/empty.proto"; + +service ChaosDaemon { + rpc SetTcs(TcsRequest) returns (google.protobuf.Empty) {} + + rpc FlushIPSets(IPSetsRequest) returns (google.protobuf.Empty) {} + + rpc SetIptablesChains(IptablesChainsRequest) returns (google.protobuf.Empty) {} + + rpc SetTimeOffset(TimeRequest) returns (google.protobuf.Empty) {} + rpc RecoverTimeOffset(TimeRequest) returns (google.protobuf.Empty) {} + + rpc ContainerKill(ContainerRequest) returns (google.protobuf.Empty) {} + rpc ContainerGetPid (ContainerRequest) returns (ContainerResponse) {} + + rpc ExecStressors (ExecStressRequest) returns (ExecStressResponse) {} + rpc CancelStressors (CancelStressRequest) returns (google.protobuf.Empty) {} + + rpc ApplyIOChaos(ApplyIOChaosRequest) returns (ApplyIOChaosResponse) {} + + rpc ApplyHttpChaos(ApplyHttpChaosRequest) returns (ApplyHttpChaosResponse) {} + + rpc ApplyBlockChaos(ApplyBlockChaosRequest) returns (ApplyBlockChaosResponse) {} + rpc RecoverBlockChaos(RecoverBlockChaosRequest) returns (google.protobuf.Empty) {} + + rpc SetDNSServer (SetDNSServerRequest) returns (google.protobuf.Empty) {} + + rpc InstallJVMRules(InstallJVMRulesRequest) returns (google.protobuf.Empty) {} + + rpc UninstallJVMRules(UninstallJVMRulesRequest) returns (google.protobuf.Empty) {} +} + +message TcHandle { + uint32 major = 1; + uint32 minor = 2; +} + +message ContainerRequest{ + ContainerAction action = 1; + string container_id = 2; +} + +message ContainerResponse{ + uint32 pid = 1; +} + +message NetemRequest { + Netem netem = 1; + string container_id = 2; + TcHandle handle = 3; + TcHandle parent = 4; +} + +message Netem { + uint32 time = 1; + uint32 jitter = 2; + float delay_corr = 3; + uint32 limit = 4; + float loss = 5; + float loss_corr = 6; + uint32 gap = 7; + float duplicate = 8; + float duplicate_corr = 9; + float reorder = 10; + float reorder_corr = 11; + float corrupt = 12; + float corrupt_corr = 13; + TcHandle parent = 14; + TcHandle handle = 15; +} + +message TbfRequest { + Tbf tbf = 1; + string container_id = 2; +} + +message Tbf { + uint64 rate = 1; + uint32 limit = 2; + uint32 buffer = 3; + uint64 peak_rate = 4; + uint32 min_burst = 5; +} + +message QdiscRequest { + Qdisc qdisc = 1; + string container_id = 2; +} + +message Qdisc { + TcHandle parent = 1; + TcHandle handle = 2; + string type = 3; + repeated string args = 4; +} + +message EmatchFilterRequest { + EmatchFilter filter = 1; + string container_id = 2; +} + +message EmatchFilter { + string match = 1; + TcHandle parent = 2; + TcHandle classid = 3; +} + +message TcFilterRequest { + TcFilter filter = 1; + string container_id = 2; +} + +message TcFilter { + TcHandle parent = 1; +} + +message IPSetsRequest { + repeated IPSet ipsets = 1; + string container_id = 2; + bool enterNS = 3; +} + +message IPSet { + string name = 1; + repeated string cidrs = 2; + repeated CidrAndPort cidr_and_ports = 3; + repeated string set_names = 4; + string type = 5; +} + +message CidrAndPort { + string cidr = 1; + uint32 port = 2; +} + +message IptablesChainsRequest { + repeated Chain chains = 1; + string container_id = 2; + bool enterNS = 3; +} + +message Chain { + string name = 1; + enum Direction { + INPUT = 0; + OUTPUT = 1; + } + Direction direction = 2; + repeated string ipsets = 3; + string target = 4; + string protocol = 5; + string source_ports = 6; + string destination_ports = 7; + string tcp_flags = 8; + string device = 9; +} + +message TimeRequest { + string container_id = 1; + int64 sec = 2; + int64 nsec = 3; + uint64 clk_ids_mask = 4; + string uid = 5; + string pod_container_name = 6; +} + +message ContainerAction { + enum Action { + KILL = 0; + GETPID = 1; + } + Action action = 1; +} + +message ExecStressRequest { + enum Scope { + CONTAINER = 0; + POD = 1; + } + Scope scope = 1; + string target = 2; + string cpuStressors = 3; + bool enterNS = 4; + string memoryStressors = 5; + int32 oomScoreAdj = 7; +} + +message ExecStressResponse { + string cpuInstance = 1; + int64 cpuStartTime = 2; + string memoryInstance = 3; + int64 memoryStartTime = 4; + string cpuInstanceUid = 5; + string memoryInstanceUid = 6; +} + +message CancelStressRequest { + string cpuInstance = 1; + int64 cpuStartTime = 2; + string memoryInstance = 3; + int64 memoryStartTime = 4; + string cpuInstanceUid = 5; + string memoryInstanceUid = 6; +} + +message ApplyIOChaosRequest { + string actions = 1; + string volume = 2; + string container_id = 3; + + int64 instance = 4; + int64 startTime = 5; + bool enterNS = 6; + string instance_uid = 7; +} + +message ApplyIOChaosResponse { + int64 instance = 1; + int64 startTime = 2; + string instance_uid = 3; +} + +message ApplyHttpChaosRequest { + string rules = 1; + repeated uint32 proxy_ports = 2; + string container_id = 3; + + int64 instance = 4; + int64 startTime = 5; + bool enterNS = 6; + string instance_uid = 7; + + string tls = 8; +} + +message ApplyHttpChaosResponse { + int64 instance = 1; + int64 startTime = 2; + int32 statusCode = 3; + string error = 4; + string instance_uid = 5; +} + + +message TcsRequest { + repeated Tc tcs = 1; + string container_id = 2; + bool enterNS = 4; +} + +message Tc { + enum Type { + NETEM = 0; + BANDWIDTH = 1; + } + Type type = 1; + Netem netem = 2; + Tbf tbf = 3; + string ipset = 4; + string protocol = 5; + string source_port = 6; + string egress_port = 7; + string device = 9; +} + +message SetDNSServerRequest { + string container_id = 1; + string dns_server = 2; + bool enable = 3; + bool enterNS = 4; +} + +message InstallJVMRulesRequest { + string container_id = 1; + string rule = 2; + int32 port = 3; + bool enterNS = 4; +} + +message UninstallJVMRulesRequest { + string container_id = 1; + string rule = 2; + int32 port = 3; + bool enterNS = 4; +} + +message ApplyBlockChaosRequest { + string container_id = 1; + string volume_path = 2; + enum Action { + Delay = 0; + } + Action action = 3; + BlockDelaySpec delay = 5; + bool enterNS = 6; +} + +message BlockDelaySpec { + int64 delay = 1; + double correlation = 2; + int64 jitter = 3; +} + +message BlockLimitSpec { + uint64 quota = 1; + uint64 period_us = 2; +} + +message ApplyBlockChaosResponse { + int32 injection_id = 1; +} + +message RecoverBlockChaosRequest { + int32 injection_id = 1; +} diff --git a/chaos/chaos-service/src/main/resources/config.properties b/chaos/chaos-service/src/main/resources/config.properties new file mode 100644 index 000000000..0510e0a07 --- /dev/null +++ b/chaos/chaos-service/src/main/resources/config.properties @@ -0,0 +1,42 @@ +server.type=${server.type} +log.path=${log.path} +app.name=${app.name} +chaos.daemon.url=${chaos.daemon.url} +chaos.daemon.port=${chaos.daemon.port} +# mock +chaos.daemon.mock.enable=${chaos.daemon.mock.enable} +chaos.daemon.mock.url=${chaos.daemon.mock.url} +chaos.daemon.mock.port=${chaos.daemon.mock.port} +mongodb.url=${mongodb.url} +mongodb.name=${mongodb.name} +dubbo_app_name=${dubbo_app_name} +dubbo.group=${dubbo.group} +dubbo.env.group=${dubbo.env.group} +dubbo_reg_check=${dubbo_reg_check} +dubbo_reg_address=${dubbo_reg_address} +nacos.config.addrs=${nacos.config.addrs} +nacos.config.data.id=${nacos.config.data.id} +close_nacos_plugin=true +grpc.port=31767 + +ref.tpc.service.group=${ref.tpc.service.group} +gwdash.pipeline.group=${gwdash.pipeline.group} +gwdash.project.group=${gwdash.project.group} + +is.local=${is.local} +local.username=${local.username} +server.cas.ignoreUrl=${server.cas.ignoreUrl} +token.parse.url=${token.parse.url} +cas.innerAuth=${cas.innerAuth} +filter.urls="${filter.urls}" + +st.grafana.domain=${st.grafana.domain} +online.grafana.domain=${online.grafana.domain} + +dashLog.domain=${dashLog.domain} + +aegis.sdk.public.key=${aegis.sdk.public.key} + +tpc.devMode=${tpc.devMode} + +response-original-value=true \ No newline at end of file diff --git a/chaos/chaos-service/src/main/resources/config/dev.properties b/chaos/chaos-service/src/main/resources/config/dev.properties new file mode 100644 index 000000000..86e1b7153 --- /dev/null +++ b/chaos/chaos-service/src/main/resources/config/dev.properties @@ -0,0 +1,39 @@ +server.type=dev +app.name=mone_chaos +log.path=/tmp/mone-chaos + +chaos.daemon.url=127.0.0.1 +chaos.daemon.port=31767 +# mock +chaos.daemon.mock.enable=false +chaos.daemon.mock.url=127.0.0.1 +chaos.daemon.mock.port=31767 + +mongodb.url=mongodb://admin:secret@127.0.0.1:27017 +mongodb.name=chaos + +dubbo_app_name=mone-chaos +dubbo.miline.group=online +dubbo_reg_check=false +dubbo_reg_address=nacos://127.0.0.1:80 +nacos.config.addrs=127.0.0.1:80 +nacos.config.data.id=mione_chaos_config +dubbo_threads=800 + +ref.tpc.service.group=staging +gwdash.pipeline.group= +gwdash.project.group=staging + +is.local=true +local.username=lily +server.cas.ignoreUrl=/* +token.parse.url=http://127.0.0.1/login/token/parse +cas.innerAuth=true +filter.urls= + +st.grafana.domain=https://127.0.0.1 +online.grafana.domain=https://127.0.0.1 + +dashLog.domain=http://127.0.0.1 + +tpc.devMode=true diff --git a/chaos/chaos-service/src/main/resources/config/online.properties b/chaos/chaos-service/src/main/resources/config/online.properties new file mode 100644 index 000000000..86e1b7153 --- /dev/null +++ b/chaos/chaos-service/src/main/resources/config/online.properties @@ -0,0 +1,39 @@ +server.type=dev +app.name=mone_chaos +log.path=/tmp/mone-chaos + +chaos.daemon.url=127.0.0.1 +chaos.daemon.port=31767 +# mock +chaos.daemon.mock.enable=false +chaos.daemon.mock.url=127.0.0.1 +chaos.daemon.mock.port=31767 + +mongodb.url=mongodb://admin:secret@127.0.0.1:27017 +mongodb.name=chaos + +dubbo_app_name=mone-chaos +dubbo.miline.group=online +dubbo_reg_check=false +dubbo_reg_address=nacos://127.0.0.1:80 +nacos.config.addrs=127.0.0.1:80 +nacos.config.data.id=mione_chaos_config +dubbo_threads=800 + +ref.tpc.service.group=staging +gwdash.pipeline.group= +gwdash.project.group=staging + +is.local=true +local.username=lily +server.cas.ignoreUrl=/* +token.parse.url=http://127.0.0.1/login/token/parse +cas.innerAuth=true +filter.urls= + +st.grafana.domain=https://127.0.0.1 +online.grafana.domain=https://127.0.0.1 + +dashLog.domain=http://127.0.0.1 + +tpc.devMode=true diff --git a/chaos/chaos-service/src/main/resources/config/staging.properties b/chaos/chaos-service/src/main/resources/config/staging.properties new file mode 100644 index 000000000..86e1b7153 --- /dev/null +++ b/chaos/chaos-service/src/main/resources/config/staging.properties @@ -0,0 +1,39 @@ +server.type=dev +app.name=mone_chaos +log.path=/tmp/mone-chaos + +chaos.daemon.url=127.0.0.1 +chaos.daemon.port=31767 +# mock +chaos.daemon.mock.enable=false +chaos.daemon.mock.url=127.0.0.1 +chaos.daemon.mock.port=31767 + +mongodb.url=mongodb://admin:secret@127.0.0.1:27017 +mongodb.name=chaos + +dubbo_app_name=mone-chaos +dubbo.miline.group=online +dubbo_reg_check=false +dubbo_reg_address=nacos://127.0.0.1:80 +nacos.config.addrs=127.0.0.1:80 +nacos.config.data.id=mione_chaos_config +dubbo_threads=800 + +ref.tpc.service.group=staging +gwdash.pipeline.group= +gwdash.project.group=staging + +is.local=true +local.username=lily +server.cas.ignoreUrl=/* +token.parse.url=http://127.0.0.1/login/token/parse +cas.innerAuth=true +filter.urls= + +st.grafana.domain=https://127.0.0.1 +online.grafana.domain=https://127.0.0.1 + +dashLog.domain=http://127.0.0.1 + +tpc.devMode=true diff --git a/chaos/chaos-service/src/main/resources/logback.xml b/chaos/chaos-service/src/main/resources/logback.xml new file mode 100644 index 000000000..c920ad0b7 --- /dev/null +++ b/chaos/chaos-service/src/main/resources/logback.xml @@ -0,0 +1,49 @@ + + + + + + + ${log.path}/server.log + + %d|%-5level|%thread|%logger{40}|%L|%msg%n + + + ${log.path}/server.log.%d{yyyy-MM-dd-HH} + + + + + + ${log.path}/error.log + + %d|%-5level|%thread|%logger{40}|%L|%msg%n + + + ${log.path}/error.log.%d{yyyy-MM-dd-HH} + + + ERROR + ACCEPT + DENY + + + + + + %d|%-5level|%thread|%logger{40}|%L|%msg%n + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/chaos/pom.xml b/chaos/pom.xml new file mode 100644 index 000000000..fe05627ec --- /dev/null +++ b/chaos/pom.xml @@ -0,0 +1,186 @@ + + + 4.0.0 + + run.mone + ozhera + 1.4.0-jdk21-SNAPSHOT + + + 1.4.0-jdk21-SNAPSHOT + chaos + pom + + + 21 + 21 + + + + chaos-api + chaos-service + + + + + + com.fasterxml.jackson.core + jackson-databind + 2.13.5 + + + + com.fasterxml.jackson.core + jackson-core + 2.13.5 + + + + com.fasterxml.jackson.core + jackson-annotations + 2.13.5 + + + + org.projectlombok + lombok + 1.18.30 + + + + dev.morphia.morphia + core + 1.6.1 + + + + run.mone + docean-plugin-dubbo + 1.4-SNAPSHOT + + + + run.mone + dubbo + 2.7.12-mone-v8 + + + + org.apache.commons + commons-lang3 + 3.12.0 + + + + io.netty + netty-all + 4.1.48.Final + + + + junit + junit + 4.13.2 + + + + run.mone + docean-plugin-nacos + 1.5.0-jdk21 + + + + redis.clients + jedis + 3.1.0 + + + + com.squareup.okhttp3 + okhttp + 4.12.0 + + + + + + + + + + src/main/resources + true + + + src/main/resources/META-INF + true + + config.properties + + META-INF/ + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + package + + shade + + + + + + run.mone.chaos.operator.bootstrap.ChaosBootstrap + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 21 + 21 + 21 + + + + + + + + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 95ec25177..624ae299a 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,7 @@ ozhera-webhook prometheus-starter-all trace-etl + chaos