diff --git a/Readme.md b/Readme.md index 0a50b39..947e05d 100644 --- a/Readme.md +++ b/Readme.md @@ -7,8 +7,8 @@ CDP Java Client ### Project description A simple Java interface for the CDP Studio development platform that allows Java applications to interact with -CDP Applications - retrieve CDP Application structures and read-write object values. For more information -about CDP Studio see https://cdpstudio.com/. +CDP Applications - retrieve CDP Application structures, read-write object values, and authenticate to secured +applications. For more information about CDP Studio see https://cdpstudio.com/. ### Usage @@ -18,7 +18,8 @@ described in the javadoc (https://www.javadoc.io/doc/com.cdptech/cdpclient/). ### Dependencies -* [Maven](https://maven.apache.org/) - Downloads necessary dependencies and builds the library. +* [Maven](https://maven.apache.org/) - Downloads necessary dependencies, including the protocol compiler (`protoc`) + that generates the StudioAPI classes, and builds the library. * [Project Lombok](https://projectlombok.org/) plugin - Install it to your IDE when developing this library or the auto-complete will not find some generated getters-setters. diff --git a/pom.xml b/pom.xml index d8ae723..14a8df4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,13 +3,14 @@ com.cdptech cdpclient - 1.2.4 + 2.0.0 jar ${project.groupId}:${project.artifactId} A simple Java interface for the CDP Studio development platform that allows Java applications to interact with - CDP Applications - retrieve CDP Application structures and read-write object values. + CDP Applications - retrieve CDP Application structures, read-write object values, and authenticate to + secured applications. For more information about CDP Studio see https://cdpstudio.com/. https://github.com/CDPTechnologies/JavaCDPClient @@ -20,7 +21,34 @@ + + + + kr.motd.maven + os-maven-plugin + 1.7.1 + + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + com.google.protobuf:protoc:3.25.5:exe:${os.detected.classifier} + false + + + + + compile + + + + org.apache.maven.plugins maven-compiler-plugin @@ -37,6 +65,11 @@ + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + org.apache.maven.plugins maven-javadoc-plugin @@ -107,7 +140,7 @@ com.google.protobuf protobuf-java - 3.21.5 + 3.25.5 org.java-websocket diff --git a/src/main/java/com/cdptech/cdpclient/AuthRequest.java b/src/main/java/com/cdptech/cdpclient/AuthRequest.java index 0fdbdc1..f7522ea 100644 --- a/src/main/java/com/cdptech/cdpclient/AuthRequest.java +++ b/src/main/java/com/cdptech/cdpclient/AuthRequest.java @@ -58,6 +58,14 @@ class UserAuthResult { private AuthResultCode code; private String text; private List additionalCredentials = new ArrayList<>(); + private List rolesAssigned = new ArrayList<>(); + } + + @Data + class SuggestedUser { + private String username; + private String firstName; + private String lastName; } @Data @@ -82,6 +90,8 @@ class CDPVersion { String getSystemUseNotification(); /** State of the authentication */ UserAuthResult getAuthResult(); + /** Users the application suggests choosing from for login */ + List getSuggestedUsers(); /** * Method to call to accept the application and provide requested credentials. diff --git a/src/main/java/com/cdptech/cdpclient/AuthenticationProtocol.java b/src/main/java/com/cdptech/cdpclient/AuthenticationProtocol.java index 06ac9ab..6a4fca6 100644 --- a/src/main/java/com/cdptech/cdpclient/AuthenticationProtocol.java +++ b/src/main/java/com/cdptech/cdpclient/AuthenticationProtocol.java @@ -15,6 +15,7 @@ class AuthenticationProtocol implements Protocol { private Authenticator authenticator = new Authenticator(); private Transport transport; private Runnable finishedCallback; + private String challenge; AuthenticationProtocol(Transport transport, Runnable finishedCallback) { this.transport = transport; @@ -25,13 +26,21 @@ class AuthenticationProtocol implements Protocol { public void parse(byte[] buf) { try { authenticator.updateUserAuthResult(AuthResponse.parseFrom(buf)); - finishedCallback.run(); + // The server asks for an EncryptedPassword response after the PasswordHash round. Answer it from + // the cached credentials. + StudioAPI.AuthRequest reissue = authenticator.encryptedPasswordReissueRequest(challenge); + if (reissue != null) { + transport.send(reissue.toByteArray()); + } else { + finishedCallback.run(); + } } catch (InvalidProtocolBufferException e) { throw new RuntimeException(e); } } void authenticate(String challenge, Map data) { + this.challenge = challenge; StudioAPI.AuthRequest authMessage = authenticator.createAuthMessage(challenge, data); if (authMessage == null) { finishedCallback.run(); @@ -44,4 +53,9 @@ AuthRequest.UserAuthResult getUserAuthResult() { return authenticator.getUserAuthResult(); } + /** Forget the credentials cached for this attempt (call once the attempt is granted). */ + void clearCachedCredentials() { + authenticator.clearCachedCredentials(); + } + } diff --git a/src/main/java/com/cdptech/cdpclient/Authenticator.java b/src/main/java/com/cdptech/cdpclient/Authenticator.java index bd19822..c4c57e7 100644 --- a/src/main/java/com/cdptech/cdpclient/Authenticator.java +++ b/src/main/java/com/cdptech/cdpclient/Authenticator.java @@ -9,19 +9,35 @@ import com.cdptech.cdpclient.proto.StudioAPI.AuthResponse; import com.google.protobuf.ByteString; +import javax.crypto.Cipher; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.security.GeneralSecurityException; +import java.security.KeyFactory; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.security.PublicKey; +import java.security.spec.X509EncodedKeySpec; import java.util.ArrayList; +import java.util.Base64; +import java.util.HashMap; import java.util.List; import java.util.Map; class Authenticator { + private static final String ENCRYPTED_PASSWORD_TYPE = "EncryptedPassword"; + private static final String PASSWORD_ENCRYPTION_PUBLIC_KEY_PARAM = "PasswordEncryptionPublicKey"; + // The client encrypts with the server-supplied 2048-bit RSA public key. RSA/PKCS#1 v1.5 fits at most + // keyBytes - 11 = 245 bytes per block, so the plaintext is chunked at that size before encryption. + private static final int RSA_KEY_LENGTH_BITS = 2048; + private static final int RSA_MAX_CHUNK_SIZE = RSA_KEY_LENGTH_BITS / 8 - 11; + private AuthResponse authMessage; private MessageDigest digest; private AuthRequest.UserAuthResult userAuthResult; + private Map lastCredentials; Authenticator() { try { @@ -40,24 +56,113 @@ void updateUserAuthResult(AuthResponse authMessage) { userAuthResult.setCode(getResultCode()); userAuthResult.setText(getResultText()); userAuthResult.setAdditionalCredentials(getAdditionalChallenges()); + userAuthResult.setRolesAssigned(new ArrayList<>(authMessage.getRoleAssignedList())); } StudioAPI.AuthRequest createAuthMessage(String challenge, Map data) { - if (!data.containsKey(AuthRequest.USER)) { + // Cache a copy of the credentials so a subsequent EncryptedPassword challenge can be answered without + // re-prompting. The caller owns the map and may scrub or reuse it after accept() returns, hence the copy. + lastCredentials = new HashMap<>(data); + String user = data.get(AuthRequest.USER); + if (user == null || user.isEmpty()) { notifyOfMissingUserName(); return null; } - String user = data.get(AuthRequest.USER); StudioAPI.AuthRequest.Builder authRequest = StudioAPI.AuthRequest.newBuilder().setUserId(user); - if (data.containsKey(AuthRequest.PASSWORD)) { + String password = data.get(AuthRequest.PASSWORD); + if (password != null && !password.isEmpty()) { addPasswordResponse(challenge, data, authRequest, user); + String encryptionPublicKey = getEncryptionPublicKey(); + if (encryptionPublicKey != null) { + addEncryptedPasswordResponse(challenge, data, authRequest, encryptionPublicKey); + } } - if (data.containsKey(AuthRequest.NEW_PASSWORD)) { + String newPassword = data.get(AuthRequest.NEW_PASSWORD); + if (newPassword != null && !newPassword.isEmpty()) { addNewPasswordResponse(data, authRequest, user); } return authRequest.build(); } + /** + * The RSA public key (PEM) from the last AuthResponse's EncryptedPassword challenge, or null when the + * response carries no key. + */ + private String getEncryptionPublicKey() { + for (AuthRequest.Credential credential : userAuthResult.getAdditionalCredentials()) { + if (ENCRYPTED_PASSWORD_TYPE.equals(credential.getType())) { + return credential.getParameters().get(PASSWORD_ENCRYPTION_PUBLIC_KEY_PARAM); + } + } + return null; + } + + private boolean hasEncryptionPublicKey() { + return getEncryptionPublicKey() != null; + } + + /** Drop the cached credentials once the attempt is granted, so the password isn't retained for the connection's lifetime. */ + void clearCachedCredentials() { + lastCredentials = null; + } + + /** + * The AuthRequest that answers the server's EncryptedPassword request from the cached credentials and the + * given challenge. Null when the server sent no encryption key or no password is cached, and the user is + * prompted instead. + */ + StudioAPI.AuthRequest encryptedPasswordReissueRequest(String challenge) { + // An empty cached password cannot answer the challenge, and re-sending the request without a hash + // would repeat on every server response. The user is prompted. + if (hasEncryptionPublicKey() && hasCachedPassword()) { + return createAuthMessage(challenge, lastCredentials); + } + return null; + } + + private boolean hasCachedPassword() { + if (lastCredentials == null) { + return false; + } + String password = lastCredentials.get(AuthRequest.PASSWORD); + return password != null && !password.isEmpty(); + } + + private void addEncryptedPasswordResponse(String challenge, Map data, + StudioAPI.AuthRequest.Builder authRequest, String publicKeyPem) { + String password = data.get(AuthRequest.PASSWORD); + ChallengeResponse challengeResponse = ChallengeResponse.newBuilder() + .setType(ENCRYPTED_PASSWORD_TYPE) + .setResponse(ByteString.copyFrom(encryptPassword(challenge, password, publicKeyPem))) + .build(); + authRequest.addChallengeResponse(challengeResponse); + } + + /** RSA-encrypt {@code challenge + password} with the server-supplied key, chunked to fit PKCS#1 blocks. */ + private byte[] encryptPassword(String challenge, String password, String publicKeyPem) { + byte[] data = (challenge + password).getBytes(StandardCharsets.UTF_8); + try { + Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); + cipher.init(Cipher.ENCRYPT_MODE, parseRsaPublicKey(publicKeyPem)); + ByteArrayOutputStream encrypted = new ByteArrayOutputStream(); + for (int offset = 0; offset < data.length; offset += RSA_MAX_CHUNK_SIZE) { + int length = Math.min(RSA_MAX_CHUNK_SIZE, data.length - offset); + encrypted.write(cipher.doFinal(data, offset, length)); + } + return encrypted.toByteArray(); + } catch (GeneralSecurityException | IOException e) { + throw new RuntimeException("Failed to RSA-encrypt password for EncryptedPassword authentication", e); + } + } + + private PublicKey parseRsaPublicKey(String pem) throws GeneralSecurityException { + String base64 = pem.replaceAll("-----BEGIN [^-]*-----", "") + .replaceAll("-----END [^-]*-----", "") + .replaceAll("\\s", ""); + byte[] der = Base64.getDecoder().decode(base64); + return KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(der)); + } + private void addPasswordResponse(String challenge, Map data, StudioAPI.AuthRequest.Builder authRequest, String user) { String password = data.get(AuthRequest.PASSWORD); ChallengeResponse challengeResponse = ChallengeResponse.newBuilder() @@ -79,17 +184,32 @@ private void addNewPasswordResponse(Map data, StudioAPI.AuthRequ private void notifyOfMissingUserName() { userAuthResult = new AuthRequest.UserAuthResult(); userAuthResult.setCode(AuthRequest.AuthResultCode.USERNAME_REQUIRED); - userAuthResult.setText("Authentication failed: username not specified"); + userAuthResult.setText("Username required"); } private byte[] passwordHash(String user, String password) { - return digest.digest((user.toLowerCase() + ":" + password).getBytes()); + return digest.digest((lowerCaseAscii(user) + ":" + password).getBytes(StandardCharsets.UTF_8)); + } + + /** + * Lower-cases ASCII 'A'-'Z' only. The hash the server compares against is computed from the + * ASCII-lowercased user name, so locale-sensitive or Unicode lowercasing (Turkish dotless i, + * 'Ö' to 'ö') would produce a mismatching digest. + */ + private static String lowerCaseAscii(String text) { + char[] chars = text.toCharArray(); + for (int i = 0; i < chars.length; i++) { + if (chars[i] >= 'A' && chars[i] <= 'Z') { + chars[i] = (char) (chars[i] + ('a' - 'A')); + } + } + return new String(chars); } private byte[] challengeHash(String challenge, byte[] data) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try { - outputStream.write(challenge.getBytes()); + outputStream.write(challenge.getBytes(StandardCharsets.UTF_8)); outputStream.write(':'); outputStream.write(data); } catch (IOException e) { @@ -103,9 +223,12 @@ AuthRequest.UserAuthResult getUserAuthResult() { } private AuthRequest.AuthResultCode getResultCode() { + // A result code this client does not know clears the field, so a missing code is a denial. + if (!authMessage.hasResultCode()) + return AuthRequest.AuthResultCode.INVALID_CHALLENGE_RESPONSE; switch (authMessage.getResultCode()) { - case eUnknown: - return AuthRequest.AuthResultCode.UNKNOWN; + case eCredentialsRequired: + return AuthRequest.AuthResultCode.CREDENTIALS_REQUIRED; case eGranted: return AuthRequest.AuthResultCode.GRANTED; case eGrantedPasswordWillExpireSoon: @@ -137,6 +260,7 @@ private List getAdditionalChallenges() { for (StudioAPI.AdditionalChallengeResponseRequired.Parameter parameter : item.getParameterList()) { c.getParameters().put(parameter.getName(), parameter.getValue()); } + challenges.add(c); } return challenges; } diff --git a/src/main/java/com/cdptech/cdpclient/Client.java b/src/main/java/com/cdptech/cdpclient/Client.java index a9e2acb..b180c59 100644 --- a/src/main/java/com/cdptech/cdpclient/Client.java +++ b/src/main/java/com/cdptech/cdpclient/Client.java @@ -218,9 +218,9 @@ public void setSocketFactory(SocketFactory socketFactory, BiConsumer certificates, boolean endpointIdentificationEnabled) { @@ -262,6 +262,8 @@ public void setTrustedCertificates(List certificates, boolean endpointIden */ @SneakyThrows public void setIgnoreCertificates(boolean ignoreCertificates) { + // TrustingSSLSocketFactory's trust manager is an X509ExtendedTrustManager with empty checks, so the JDK + // runs no endpoint identification for it and this path needs no parameter handler. setSocketFactory(ignoreCertificates ? new TrustingSSLSocketFactory() : null, null); } @@ -318,14 +320,16 @@ public void process() { } private void handleReauthentications() { - if (compositeReauthRequest != null && compositeReauthRequest.isReady()) { - if (compositeReauthRequest.isRejected()) { - close(); - } - long cacheLength = Instant.now().getEpochSecond() - compositeReauthRequest.getReadyTimestamp().getEpochSecond(); - if (cacheLength >= REAUTH_CACHE_LENGTH_SECONDS) { - compositeReauthRequest = null; - } + if (compositeReauthRequest != null && compositeReauthRequest.isReady() && compositeReauthRequest.isRejected()) { + close(); + } + dropExpiredPrompt(); + } + + /** An answered prompt past the cache window hands its answer to nobody. */ + private void dropExpiredPrompt() { + if (compositeReauthRequest != null && compositeReauthRequest.isReady() && isCacheExpired(compositeReauthRequest)) { + compositeReauthRequest = null; } } @@ -492,15 +496,32 @@ void requestCredentials(AuthRequest request) { listener.credentialsRequested(request); } - void requestReauthentication(AuthRequest request) { - if (compositeReauthRequest == null) { + void requestReauthentication(ReauthRequest request) { + // A request that starts a cycle joins the current prompt, and an answered prompt hands its answer + // over. Any other code is the server's or this client's verdict on an answer this connection + // received, so the connection joins the correction prompt already open, or takes the current + // prompt's answer while it is a newer one, or opens the next prompt. + dropExpiredPrompt(); + boolean startsCycle = + request.getAuthResult().getCode() == AuthRequest.AuthResultCode.REAUTHENTICATION_REQUIRED; + CompositeAuthRequest answered = request.getAnsweringPrompt(); + if (compositeReauthRequest != null && !compositeReauthRequest.isReady()) { + compositeReauthRequest.add(request); + } else if (compositeReauthRequest != null && startsCycle) { + compositeReauthRequest.add(request); + } else if (compositeReauthRequest != null && answered != null && compositeReauthRequest != answered) { + compositeReauthRequest.add(request); + } else { compositeReauthRequest = new CompositeAuthRequest(request); listener.credentialsRequested(compositeReauthRequest); - } else { - compositeReauthRequest.add(request); } } + private static boolean isCacheExpired(CompositeAuthRequest prompt) { + long cacheLength = Instant.now().getEpochSecond() - prompt.getReadyTimestamp().getEpochSecond(); + return cacheLength >= REAUTH_CACHE_LENGTH_SECONDS; + } + void requestHandshakeAcceptance(AuthRequest request) { listener.handshakeAcceptanceRequested(request); } diff --git a/src/main/java/com/cdptech/cdpclient/CompositeAuthRequest.java b/src/main/java/com/cdptech/cdpclient/CompositeAuthRequest.java index cfe9bca..a9613af 100644 --- a/src/main/java/com/cdptech/cdpclient/CompositeAuthRequest.java +++ b/src/main/java/com/cdptech/cdpclient/CompositeAuthRequest.java @@ -10,27 +10,37 @@ class CompositeAuthRequest implements AuthRequest { - private List requests = new ArrayList<>(); + private List requests = new ArrayList<>(); private Map cachedData = new HashMap<>(); private Instant readyTimestamp; private boolean accepted; private boolean rejected; - CompositeAuthRequest(AuthRequest firstRequest) { + CompositeAuthRequest(ReauthRequest firstRequest) { requests.add(firstRequest); } - void add(AuthRequest request) { + void add(ReauthRequest request) { if (accepted) { - request.accept(cachedData); + deliver(request, true); } else if (rejected) { - request.reject(); + deliver(request, false); } else { requests.add(request); } } + /** Hands this composite's answer to one connection, which remembers where it came from. */ + private void deliver(ReauthRequest request, boolean accept) { + request.setAnsweringPrompt(this); + if (accept) { + request.accept(cachedData); + } else { + request.reject(); + } + } + @Override public String getSystemName() { return requests.get(0).getSystemName(); @@ -71,13 +81,18 @@ public UserAuthResult getAuthResult() { return requests.get(0).getAuthResult(); } + @Override + public List getSuggestedUsers() { + return requests.get(0).getSuggestedUsers(); + } + @Override public void accept(Map data) { cachedData = data; accepted = true; readyTimestamp = Instant.now(); - for (AuthRequest r : requests) { - r.accept(cachedData); + for (ReauthRequest r : requests) { + deliver(r, true); } } @@ -85,8 +100,8 @@ public void accept(Map data) { public void reject() { rejected = true; readyTimestamp = Instant.now(); - for (AuthRequest r : requests) { - r.reject(); + for (ReauthRequest r : requests) { + deliver(r, false); } } diff --git a/src/main/java/com/cdptech/cdpclient/Connection.java b/src/main/java/com/cdptech/cdpclient/Connection.java index faa78e8..43da69f 100644 --- a/src/main/java/com/cdptech/cdpclient/Connection.java +++ b/src/main/java/com/cdptech/cdpclient/Connection.java @@ -14,6 +14,7 @@ import java.net.URISyntaxException; import java.security.cert.Certificate; import java.time.Instant; +import java.util.List; import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; @@ -39,6 +40,7 @@ class Connection { private RequestDispatch dispatch; private Instant lastActivityNotificationTimestamp = Instant.now(); private long idleLockoutPeriod; + private CompositeAuthRequest reauthAnsweringPrompt; private boolean initInProgress; /** Initialize an IOHandler with the given server URI. */ @@ -101,6 +103,7 @@ private void setUpAuthHandler() { AuthRequest.AuthResultCode code = authHandler.getUserAuthResult().getCode(); if (code == AuthRequest.AuthResultCode.GRANTED || code == AuthRequest.AuthResultCode.GRANTED_PASSWORD_WILL_EXPIRE_SOON) { + authHandler.clearCachedCredentials(); client.requestHandshakeAcceptance(new ConnectionAuthRequest(authHandler.getUserAuthResult(), data -> switchToIOHandler())); } else { requestCredentials(); @@ -110,15 +113,16 @@ private void setUpAuthHandler() { private void setUpReauthentication() { ioHandler.setIdleLockoutPeriodChangeCallback((Long idleLockoutPeriod) -> this.idleLockoutPeriod = idleLockoutPeriod); - ioHandler.setCredentialsRequester((userAuthResult, challenge) -> { + ioHandler.setCredentialsRequester(userAuthResult -> { AuthRequest.AuthResultCode code = userAuthResult.getCode(); if (code == AuthRequest.AuthResultCode.GRANTED || code == AuthRequest.AuthResultCode.GRANTED_PASSWORD_WILL_EXPIRE_SOON) { - client.requestHandshakeAcceptance(new ConnectionAuthRequest(authHandler.getUserAuthResult(), null)); + ioHandler.clearCachedCredentials(); + reauthAnsweringPrompt = null; + client.requestHandshakeAcceptance(new ConnectionAuthRequest(userAuthResult, null)); } else { - client.requestReauthentication(new ConnectionAuthRequest(userAuthResult, data -> { - ioHandler.reauthenticate(challenge, data); - })); + client.requestReauthentication(new ConnectionAuthRequest(userAuthResult, data -> + ioHandler.reauthenticate(data))); } }); } @@ -231,7 +235,7 @@ Instant getLastRequestTimestamp() { return Instant.EPOCH; } - private class ConnectionAuthRequest implements AuthRequest { + private class ConnectionAuthRequest implements ReauthRequest { private final UserAuthResult userAuthResult; private final Consumer> onAccept; @@ -287,6 +291,21 @@ public UserAuthResult getAuthResult() { return userAuthResult; } + @Override + public CompositeAuthRequest getAnsweringPrompt() { + return reauthAnsweringPrompt; + } + + @Override + public void setAnsweringPrompt(CompositeAuthRequest prompt) { + reauthAnsweringPrompt = prompt; + } + + @Override + public List getSuggestedUsers() { + return helloHandler.getSuggestedUsers(); + } + @Override public void accept(Map data) { if (onAccept != null) { diff --git a/src/main/java/com/cdptech/cdpclient/HelloProtocol.java b/src/main/java/com/cdptech/cdpclient/HelloProtocol.java index 007704e..0246d32 100644 --- a/src/main/java/com/cdptech/cdpclient/HelloProtocol.java +++ b/src/main/java/com/cdptech/cdpclient/HelloProtocol.java @@ -7,6 +7,9 @@ import com.cdptech.cdpclient.proto.StudioAPI.Hello; import com.google.protobuf.InvalidProtocolBufferException; +import java.util.ArrayList; +import java.util.List; + class HelloProtocol implements Protocol { private Hello helloMessage; @@ -53,4 +56,16 @@ public String getSystemUseNotification() { public long getIdleLockoutPeriod() { return Integer.toUnsignedLong(helloMessage.getIdleLockoutPeriod()); } + + List getSuggestedUsers() { + List users = new ArrayList<>(); + for (Hello.SuggestedUser u : helloMessage.getSuggestedUsersList()) { + AuthRequest.SuggestedUser user = new AuthRequest.SuggestedUser(); + user.setUsername(u.getUserId()); + user.setFirstName(u.getFirstName()); + user.setLastName(u.getLastName()); + users.add(user); + } + return users; + } } diff --git a/src/main/java/com/cdptech/cdpclient/IOHandler.java b/src/main/java/com/cdptech/cdpclient/IOHandler.java index 022277d..c37b6ee 100644 --- a/src/main/java/com/cdptech/cdpclient/IOHandler.java +++ b/src/main/java/com/cdptech/cdpclient/IOHandler.java @@ -12,15 +12,13 @@ import java.time.Instant; import java.util.Map; -import java.util.function.BiConsumer; import java.util.function.Consumer; import static com.cdptech.cdpclient.proto.StudioAPI.RemoteErrorCode.eAUTH_RESPONSE_EXPIRED; /** - * IOHandler polls the WebSocket thread for new data and deserializes and - * creates events based on it. It also takes requests, serializes them and - * forwards them to WebSocket thread. + * IOHandler deserializes messages read from the RX queue and creates events based on them. + * It also takes requests, serializes them and forwards them to the WebSocket thread. */ class IOHandler implements Protocol { @@ -29,10 +27,11 @@ class IOHandler implements Protocol { private IOListener listener; private TimeSync timeSync; private Consumer idleLockoutPeriodChangeCallback; - private BiConsumer credentialsRequester; + private Consumer credentialsRequester; + private boolean reauthRequestPending; + private String reauthChallenge; private Instant lastRequestTimestamp; - /** Initialize an IOHandler with the given server URI. */ IOHandler(Transport transport) { this.transport = transport; timeSync = new TimeSync(this::timeRequest); @@ -155,16 +154,16 @@ void setRemoteValue(Node node, Variant value) { pbv.setIValue((Integer) value.getValue()); break; case eUSHORT: - pbv.setUsValue((Short) value.getValue()); + pbv.setUsValue(((Number) value.getValue()).intValue()); break; case eSHORT: - pbv.setSValue((Short) value.getValue()); + pbv.setSValue(((Number) value.getValue()).intValue()); break; case eUCHAR: - pbv.setUcValue((Short) value.getValue()); + pbv.setUcValue(((Number) value.getValue()).intValue()); break; case eCHAR: - pbv.setCValue((Byte) value.getValue()); + pbv.setCValue(((Number) value.getValue()).intValue()); break; case eBOOL: pbv.setBValue((Boolean) value.getValue()); @@ -192,7 +191,6 @@ void startStructureSubscription(int nodeId) { updateLastRequestTimestamp(); } - /** Cancel a structure subscription. */ void cancelStructureSubscription(Node node) { // TODO (kar): Not allowed by protocol anymore? } @@ -230,22 +228,41 @@ public void parse(byte[] buf) { case eReauthResponse: authenticator.updateUserAuthResult(pb.getReAuthResponse()); - if (credentialsRequester != null) { - credentialsRequester.accept(authenticator.getUserAuthResult(), null); + AuthRequest.AuthResultCode reauthCode = authenticator.getUserAuthResult().getCode(); + if (reauthCode == AuthRequest.AuthResultCode.GRANTED + || reauthCode == AuthRequest.AuthResultCode.GRANTED_PASSWORD_WILL_EXPIRE_SOON) { + // The cycle is granted. A later idle lockout starts a fresh cycle that may prompt again, and a + // non-granting response keeps the cycle in progress so repeated errors stay suppressed. + reauthRequestPending = false; + } + StudioAPI.AuthRequest reissue = authenticator.encryptedPasswordReissueRequest(reauthChallenge); + if (reissue != null) { + // The server's EncryptedPassword request is answered from the cached credentials. + sendReauthMessage(reissue); + } else if (credentialsRequester != null) { + credentialsRequester.accept(authenticator.getUserAuthResult()); } break; case eRemoteError: if (pb.getError().hasCode() || pb.getError().hasText()) { if (pb.getError().getCode() == eAUTH_RESPONSE_EXPIRED.getNumber()) { - String challenge = pb.getError().getChallenge().toStringUtf8(); + // Store the latest challenge on every expiry error: the server issues a fresh one per expiry, so the + // re-authentication must answer the most recent challenge even when the prompt below is suppressed. + reauthChallenge = pb.getError().getChallenge().toStringUtf8(); if (idleLockoutPeriodChangeCallback != null) { idleLockoutPeriodChangeCallback.accept(Integer.toUnsignedLong(pb.getError().getIdleLockoutPeriod())); } - AuthRequest.UserAuthResult userAuthResult = new AuthRequest.UserAuthResult(); - userAuthResult.setCode(AuthRequest.AuthResultCode.REAUTHENTICATION_REQUIRED); - userAuthResult.setText(pb.getError().getText()); - credentialsRequester.accept(userAuthResult, challenge.toString()); + // Mark the re-authentication cycle in progress before prompting, so repeated + // eAUTH_RESPONSE_EXPIRED errors (e.g. one per in-flight request during idle lockout) raise a + // single prompt and a single re-auth request. The flag clears once the cycle is granted. + if (!reauthRequestPending) { + reauthRequestPending = true; + AuthRequest.UserAuthResult userAuthResult = new AuthRequest.UserAuthResult(); + userAuthResult.setCode(AuthRequest.AuthResultCode.REAUTHENTICATION_REQUIRED); + userAuthResult.setText(pb.getError().getText()); + credentialsRequester.accept(userAuthResult); + } } else { System.err.println("CDP Client received following error (code " + pb.getError().getCode() + "): " + pb.getError().getText()); @@ -263,7 +280,7 @@ public void parse(byte[] buf) { timeSync.refreshDeltaIfNeeded(); } - /** Recursively parse a StudioAPI.Node into a StudioAPI Node. */ + /** Recursively convert a protobuf StudioAPI.Node into this package's Node, including its children. */ private Node parseNodeData(StudioAPI.Node pb) { StudioAPI.Info info = pb.getInfo(); @@ -297,7 +314,8 @@ private Node parseNodeData(StudioAPI.Node pb) { /** Create a StudioAPI Variant from a StudioAPI.VariantValue. */ static Variant createVariant(StudioAPI.VariantValue pbv, long timeDiff) { - long ts = pbv.hasTimestamp() ? pbv.getTimestamp() + timeDiff : 0; + // The clock delta applies to a remote timestamp only. An absent or zero timestamp stays zero. + long ts = (pbv.hasTimestamp() && pbv.getTimestamp() != 0) ? pbv.getTimestamp() + timeDiff : 0; Variant value; if (pbv.hasDValue()) value = new Variant(CDPValueType.eDOUBLE, pbv.getDValue(), ts); @@ -332,24 +350,32 @@ void setIdleLockoutPeriodChangeCallback(Consumer idleLockoutPeriodChangeCa this.idleLockoutPeriodChangeCallback = idleLockoutPeriodChangeCallback; } - void setCredentialsRequester(BiConsumer credentialsRequester) { + void setCredentialsRequester(Consumer credentialsRequester) { this.credentialsRequester = credentialsRequester; } - void reauthenticate(String challenge, Map data) { - StudioAPI.AuthRequest authMessage = authenticator.createAuthMessage(challenge, data); + void reauthenticate(Map data) { + StudioAPI.AuthRequest authMessage = authenticator.createAuthMessage(reauthChallenge, data); if (authMessage == null) { - credentialsRequester.accept(authenticator.getUserAuthResult(), challenge); + credentialsRequester.accept(authenticator.getUserAuthResult()); } else { - transport.send(Container.newBuilder() - .setMessageType(Container.Type.eReauthRequest) - .setReAuthRequest(authMessage) - .build() - .toByteArray()); - updateLastRequestTimestamp(); + sendReauthMessage(authMessage); } } + private void sendReauthMessage(StudioAPI.AuthRequest authMessage) { + transport.send(Container.newBuilder() + .setMessageType(Container.Type.eReauthRequest) + .setReAuthRequest(authMessage) + .build() + .toByteArray()); + updateLastRequestTimestamp(); + } + + void clearCachedCredentials() { + authenticator.clearCachedCredentials(); + } + Instant getLastRequestTimestamp() { return lastRequestTimestamp; } diff --git a/src/main/java/com/cdptech/cdpclient/ReauthRequest.java b/src/main/java/com/cdptech/cdpclient/ReauthRequest.java new file mode 100644 index 0000000..f3bfa17 --- /dev/null +++ b/src/main/java/com/cdptech/cdpclient/ReauthRequest.java @@ -0,0 +1,13 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +/** A connection's re-authentication request. The connection remembers the prompt whose answer it last received. */ +interface ReauthRequest extends AuthRequest { + + CompositeAuthRequest getAnsweringPrompt(); + + void setAnsweringPrompt(CompositeAuthRequest prompt); +} diff --git a/src/main/java/com/cdptech/cdpclient/Transport.java b/src/main/java/com/cdptech/cdpclient/Transport.java index ff3d335..a316b0a 100644 --- a/src/main/java/com/cdptech/cdpclient/Transport.java +++ b/src/main/java/com/cdptech/cdpclient/Transport.java @@ -78,6 +78,7 @@ public void onMessage(String s) { @Override protected void onSetSSLParameters(SSLParameters sslParameters) { + super.onSetSSLParameters(sslParameters); // enables TLS endpoint identification, which the handler may disable if (socketParameterHandler != null) { socketParameterHandler.accept(serverURI, sslParameters); } diff --git a/src/main/java/com/cdptech/cdpclient/Variant.java b/src/main/java/com/cdptech/cdpclient/Variant.java index f286bd3..cdd94fe 100644 --- a/src/main/java/com/cdptech/cdpclient/Variant.java +++ b/src/main/java/com/cdptech/cdpclient/Variant.java @@ -51,23 +51,24 @@ public CDPValueType getValueType() { return valueType; } - /** Get the value timestamp. @returns 0.0 if no timestamp was specified. */ + /** + * The value's timestamp. A server-delivered value that carried no timestamp reports {@code Instant.EPOCH}. + * A Variant built via {@link Builder} without {@link Builder#setTimestamp} reports {@code null}. + */ public Instant getTimestamp() { return timestamp; } - /** Get the Variant's value as a printable String. */ + /** Get the Variant's value as a printable String. Unsigned types print their unsigned value. */ public String toString() { if (valueType == CDPValueType.eUNDEFINED) return ""; + if (valueType == CDPValueType.eUINT) + return Integer.toUnsignedString((Integer) value); + if (valueType == CDPValueType.eUINT64) + return Long.toUnsignedString((Long) value); return value.toString(); } - - - // accounted value types: - // double, float, char, boolean, String - // unaccounted value types: - // (unsigned) int, (unsigned) short, unsigned char, i64 / ui64 - + /** Builder class for constructing immutable Variant objects. */ public static class Builder { private final CDPValueType valueType; @@ -92,7 +93,7 @@ public Builder parse(String strValue) { value = Double.valueOf(strValue); break; case eUINT64: - value = Long.valueOf(strValue); // sign bit represents top bit + value = Long.parseUnsignedLong(strValue); // sign bit represents top bit break; case eINT64: value = Long.valueOf(strValue); @@ -101,27 +102,22 @@ public Builder parse(String strValue) { value = Float.valueOf(strValue); break; case eUINT: - value = Integer.valueOf(strValue); // sign bit represents top bit + value = Integer.parseUnsignedInt(strValue); // parsed as unsigned, so the int holds the full 32-bit range break; case eINT: value = Integer.valueOf(strValue); break; case eUSHORT: - Integer v = Integer.valueOf(strValue); - if (v.intValue() < 0 || v.intValue() > 65535) - throw new IllegalArgumentException("unsigned short out of bounds"); - value = v; + value = parseRangedInt(strValue, 0, 65535, "unsigned short"); break; case eSHORT: - value = Short.valueOf(strValue); + value = parseRangedInt(strValue, Short.MIN_VALUE, Short.MAX_VALUE, "short"); break; case eUCHAR: - value = Integer.valueOf(strValue.charAt(0)); - if (strValue.charAt(0) > 255 || strValue.charAt(0) < 0) - throw new IllegalArgumentException("unsigned char out of bounds"); + value = parseRangedInt(strValue, 0, 255, "unsigned char"); break; case eCHAR: - value = Byte.valueOf(strValue); + value = parseRangedInt(strValue, Byte.MIN_VALUE, Byte.MAX_VALUE, "char"); break; case eBOOL: value = Boolean.valueOf(strValue); @@ -132,7 +128,15 @@ public Builder parse(String strValue) { } return this; } - + + /** Parse a decimal integer and bound it to [min, max], boxing as Integer so all narrow int types share one box. */ + private static Integer parseRangedInt(String strValue, int min, int max, String typeName) { + int v = Integer.parseInt(strValue); + if (v < min || v > max) + throw new IllegalArgumentException(typeName + " out of bounds: " + strValue); + return v; + } + public Builder setTimestamp(Instant timestamp) { this.timestamp = timestamp; return this; diff --git a/src/main/java/com/cdptech/cdpclient/proto/StudioAPI.java b/src/main/java/com/cdptech/cdpclient/proto/StudioAPI.java deleted file mode 100644 index 1982fec..0000000 --- a/src/main/java/com/cdptech/cdpclient/proto/StudioAPI.java +++ /dev/null @@ -1,21643 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: studioapi.proto - -package com.cdptech.cdpclient.proto; - -public final class StudioAPI { - private StudioAPI() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code StudioAPI.Proto.RemoteErrorCode} - */ - public enum RemoteErrorCode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * connection is in non-authenticated state (e.g. because of session inactivity timeout) -
-     * 
- * - * eAUTH_RESPONSE_EXPIRED = 1; - */ - eAUTH_RESPONSE_EXPIRED(1), - /** - *
-     * full reconnect or new AuthRequest with ChallengeResponse is needed to continue
-     * 
- * - * eINVALID_REQUEST = 10; - */ - eINVALID_REQUEST(10), - /** - * eUNSUPPORTED_CONTAINER_TYPE = 20; - */ - eUNSUPPORTED_CONTAINER_TYPE(20), - /** - * eVALUE_THROTTLING_OCCURRING = 30; - */ - eVALUE_THROTTLING_OCCURRING(30), - /** - * eVALUE_THROTTLING_STOPPED = 31; - */ - eVALUE_THROTTLING_STOPPED(31), - /** - * eCHILD_ADD_FAILED = 40; - */ - eCHILD_ADD_FAILED(40), - /** - * eCHILD_REMOVE_FAILED = 50; - */ - eCHILD_REMOVE_FAILED(50), - ; - - /** - *
-     * connection is in non-authenticated state (e.g. because of session inactivity timeout) -
-     * 
- * - * eAUTH_RESPONSE_EXPIRED = 1; - */ - public static final int eAUTH_RESPONSE_EXPIRED_VALUE = 1; - /** - *
-     * full reconnect or new AuthRequest with ChallengeResponse is needed to continue
-     * 
- * - * eINVALID_REQUEST = 10; - */ - public static final int eINVALID_REQUEST_VALUE = 10; - /** - * eUNSUPPORTED_CONTAINER_TYPE = 20; - */ - public static final int eUNSUPPORTED_CONTAINER_TYPE_VALUE = 20; - /** - * eVALUE_THROTTLING_OCCURRING = 30; - */ - public static final int eVALUE_THROTTLING_OCCURRING_VALUE = 30; - /** - * eVALUE_THROTTLING_STOPPED = 31; - */ - public static final int eVALUE_THROTTLING_STOPPED_VALUE = 31; - /** - * eCHILD_ADD_FAILED = 40; - */ - public static final int eCHILD_ADD_FAILED_VALUE = 40; - /** - * eCHILD_REMOVE_FAILED = 50; - */ - public static final int eCHILD_REMOVE_FAILED_VALUE = 50; - - - public final int getNumber() { - 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 RemoteErrorCode 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 RemoteErrorCode forNumber(int value) { - switch (value) { - case 1: return eAUTH_RESPONSE_EXPIRED; - case 10: return eINVALID_REQUEST; - case 20: return eUNSUPPORTED_CONTAINER_TYPE; - case 30: return eVALUE_THROTTLING_OCCURRING; - case 31: return eVALUE_THROTTLING_STOPPED; - case 40: return eCHILD_ADD_FAILED; - case 50: return eCHILD_REMOVE_FAILED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - RemoteErrorCode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RemoteErrorCode findValueByNumber(int number) { - return RemoteErrorCode.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - 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 com.cdptech.cdpclient.proto.StudioAPI.getDescriptor().getEnumTypes().get(0); - } - - private static final RemoteErrorCode[] VALUES = values(); - - public static RemoteErrorCode valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private RemoteErrorCode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:StudioAPI.Proto.RemoteErrorCode) - } - - /** - *
-   ** CDP Node base type identifier. 
-   * 
- * - * Protobuf enum {@code StudioAPI.Proto.CDPNodeType} - */ - public enum CDPNodeType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CDP_UNDEFINED = -1; - */ - CDP_UNDEFINED(-1), - /** - * CDP_SYSTEM = 0; - */ - CDP_SYSTEM(0), - /** - * CDP_APPLICATION = 1; - */ - CDP_APPLICATION(1), - /** - * CDP_COMPONENT = 2; - */ - CDP_COMPONENT(2), - /** - * CDP_OBJECT = 3; - */ - CDP_OBJECT(3), - /** - * CDP_MESSAGE = 4; - */ - CDP_MESSAGE(4), - /** - * CDP_BASE_OBJECT = 5; - */ - CDP_BASE_OBJECT(5), - /** - * CDP_PROPERTY = 6; - */ - CDP_PROPERTY(6), - /** - * CDP_SETTING = 7; - */ - CDP_SETTING(7), - /** - * CDP_ENUM = 8; - */ - CDP_ENUM(8), - /** - * CDP_OPERATOR = 9; - */ - CDP_OPERATOR(9), - /** - * CDP_NODE = 10; - */ - CDP_NODE(10), - /** - * CDP_USER_TYPE = 100; - */ - CDP_USER_TYPE(100), - ; - - /** - * CDP_UNDEFINED = -1; - */ - public static final int CDP_UNDEFINED_VALUE = -1; - /** - * CDP_SYSTEM = 0; - */ - public static final int CDP_SYSTEM_VALUE = 0; - /** - * CDP_APPLICATION = 1; - */ - public static final int CDP_APPLICATION_VALUE = 1; - /** - * CDP_COMPONENT = 2; - */ - public static final int CDP_COMPONENT_VALUE = 2; - /** - * CDP_OBJECT = 3; - */ - public static final int CDP_OBJECT_VALUE = 3; - /** - * CDP_MESSAGE = 4; - */ - public static final int CDP_MESSAGE_VALUE = 4; - /** - * CDP_BASE_OBJECT = 5; - */ - public static final int CDP_BASE_OBJECT_VALUE = 5; - /** - * CDP_PROPERTY = 6; - */ - public static final int CDP_PROPERTY_VALUE = 6; - /** - * CDP_SETTING = 7; - */ - public static final int CDP_SETTING_VALUE = 7; - /** - * CDP_ENUM = 8; - */ - public static final int CDP_ENUM_VALUE = 8; - /** - * CDP_OPERATOR = 9; - */ - public static final int CDP_OPERATOR_VALUE = 9; - /** - * CDP_NODE = 10; - */ - public static final int CDP_NODE_VALUE = 10; - /** - * CDP_USER_TYPE = 100; - */ - public static final int CDP_USER_TYPE_VALUE = 100; - - - public final int getNumber() { - 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 CDPNodeType 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 CDPNodeType forNumber(int value) { - switch (value) { - case -1: return CDP_UNDEFINED; - case 0: return CDP_SYSTEM; - case 1: return CDP_APPLICATION; - case 2: return CDP_COMPONENT; - case 3: return CDP_OBJECT; - case 4: return CDP_MESSAGE; - case 5: return CDP_BASE_OBJECT; - case 6: return CDP_PROPERTY; - case 7: return CDP_SETTING; - case 8: return CDP_ENUM; - case 9: return CDP_OPERATOR; - case 10: return CDP_NODE; - case 100: return CDP_USER_TYPE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - CDPNodeType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public CDPNodeType findValueByNumber(int number) { - return CDPNodeType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - 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 com.cdptech.cdpclient.proto.StudioAPI.getDescriptor().getEnumTypes().get(1); - } - - private static final CDPNodeType[] VALUES = values(); - - public static CDPNodeType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private CDPNodeType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:StudioAPI.Proto.CDPNodeType) - } - - /** - *
-   ** CDP Node value type identifier. 
-   * 
- * - * Protobuf enum {@code StudioAPI.Proto.CDPValueType} - */ - public enum CDPValueType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * eUNDEFINED = 0; - */ - eUNDEFINED(0), - /** - * eDOUBLE = 1; - */ - eDOUBLE(1), - /** - * eUINT64 = 2; - */ - eUINT64(2), - /** - * eINT64 = 3; - */ - eINT64(3), - /** - * eFLOAT = 4; - */ - eFLOAT(4), - /** - * eUINT = 5; - */ - eUINT(5), - /** - * eINT = 6; - */ - eINT(6), - /** - * eUSHORT = 7; - */ - eUSHORT(7), - /** - * eSHORT = 8; - */ - eSHORT(8), - /** - * eUCHAR = 9; - */ - eUCHAR(9), - /** - * eCHAR = 10; - */ - eCHAR(10), - /** - * eBOOL = 11; - */ - eBOOL(11), - /** - * eSTRING = 12; - */ - eSTRING(12), - /** - * eUSERTYPE = 100; - */ - eUSERTYPE(100), - ; - - /** - * eUNDEFINED = 0; - */ - public static final int eUNDEFINED_VALUE = 0; - /** - * eDOUBLE = 1; - */ - public static final int eDOUBLE_VALUE = 1; - /** - * eUINT64 = 2; - */ - public static final int eUINT64_VALUE = 2; - /** - * eINT64 = 3; - */ - public static final int eINT64_VALUE = 3; - /** - * eFLOAT = 4; - */ - public static final int eFLOAT_VALUE = 4; - /** - * eUINT = 5; - */ - public static final int eUINT_VALUE = 5; - /** - * eINT = 6; - */ - public static final int eINT_VALUE = 6; - /** - * eUSHORT = 7; - */ - public static final int eUSHORT_VALUE = 7; - /** - * eSHORT = 8; - */ - public static final int eSHORT_VALUE = 8; - /** - * eUCHAR = 9; - */ - public static final int eUCHAR_VALUE = 9; - /** - * eCHAR = 10; - */ - public static final int eCHAR_VALUE = 10; - /** - * eBOOL = 11; - */ - public static final int eBOOL_VALUE = 11; - /** - * eSTRING = 12; - */ - public static final int eSTRING_VALUE = 12; - /** - * eUSERTYPE = 100; - */ - public static final int eUSERTYPE_VALUE = 100; - - - public final int getNumber() { - 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 CDPValueType 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 CDPValueType forNumber(int value) { - switch (value) { - case 0: return eUNDEFINED; - case 1: return eDOUBLE; - case 2: return eUINT64; - case 3: return eINT64; - case 4: return eFLOAT; - case 5: return eUINT; - case 6: return eINT; - case 7: return eUSHORT; - case 8: return eSHORT; - case 9: return eUCHAR; - case 10: return eCHAR; - case 11: return eBOOL; - case 12: return eSTRING; - case 100: return eUSERTYPE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - CDPValueType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public CDPValueType findValueByNumber(int number) { - return CDPValueType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - 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 com.cdptech.cdpclient.proto.StudioAPI.getDescriptor().getEnumTypes().get(2); - } - - private static final CDPValueType[] VALUES = values(); - - public static CDPValueType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private CDPValueType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:StudioAPI.Proto.CDPValueType) - } - - public interface HelloOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.Hello) - com.google.protobuf.MessageOrBuilder { - - /** - * required string system_name = 1; - * @return Whether the systemName field is set. - */ - boolean hasSystemName(); - /** - * required string system_name = 1; - * @return The systemName. - */ - java.lang.String getSystemName(); - /** - * required string system_name = 1; - * @return The bytes for systemName. - */ - com.google.protobuf.ByteString - getSystemNameBytes(); - - /** - * required uint32 compat_version = 2 [default = 1]; - * @return Whether the compatVersion field is set. - */ - boolean hasCompatVersion(); - /** - * required uint32 compat_version = 2 [default = 1]; - * @return The compatVersion. - */ - int getCompatVersion(); - - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return Whether the incrementalVersion field is set. - */ - boolean hasIncrementalVersion(); - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return The incrementalVersion. - */ - int getIncrementalVersion(); - - /** - * repeated bytes public_key = 4; - * @return A list containing the publicKey. - */ - java.util.List getPublicKeyList(); - /** - * repeated bytes public_key = 4; - * @return The count of publicKey. - */ - int getPublicKeyCount(); - /** - * repeated bytes public_key = 4; - * @param index The index of the element to return. - * @return The publicKey at the given index. - */ - com.google.protobuf.ByteString getPublicKey(int index); - - /** - *
-     * if challenge exists then server expects authentication (AuthRequest message)
-     * 
- * - * optional bytes challenge = 5; - * @return Whether the challenge field is set. - */ - boolean hasChallenge(); - /** - *
-     * if challenge exists then server expects authentication (AuthRequest message)
-     * 
- * - * optional bytes challenge = 5; - * @return The challenge. - */ - com.google.protobuf.ByteString getChallenge(); - - /** - * optional string application_name = 6; - * @return Whether the applicationName field is set. - */ - boolean hasApplicationName(); - /** - * optional string application_name = 6; - * @return The applicationName. - */ - java.lang.String getApplicationName(); - /** - * optional string application_name = 6; - * @return The bytes for applicationName. - */ - com.google.protobuf.ByteString - getApplicationNameBytes(); - - /** - * optional uint32 cdp_version_major = 7; - * @return Whether the cdpVersionMajor field is set. - */ - boolean hasCdpVersionMajor(); - /** - * optional uint32 cdp_version_major = 7; - * @return The cdpVersionMajor. - */ - int getCdpVersionMajor(); - - /** - * optional uint32 cdp_version_minor = 8; - * @return Whether the cdpVersionMinor field is set. - */ - boolean hasCdpVersionMinor(); - /** - * optional uint32 cdp_version_minor = 8; - * @return The cdpVersionMinor. - */ - int getCdpVersionMinor(); - - /** - * optional uint32 cdp_version_patch = 9; - * @return Whether the cdpVersionPatch field is set. - */ - boolean hasCdpVersionPatch(); - /** - * optional uint32 cdp_version_patch = 9; - * @return The cdpVersionPatch. - */ - int getCdpVersionPatch(); - - /** - * optional uint32 idle_lockout_period = 10; - * @return Whether the idleLockoutPeriod field is set. - */ - boolean hasIdleLockoutPeriod(); - /** - * optional uint32 idle_lockout_period = 10; - * @return The idleLockoutPeriod. - */ - int getIdleLockoutPeriod(); - - /** - * optional string system_use_notification = 11; - * @return Whether the systemUseNotification field is set. - */ - boolean hasSystemUseNotification(); - /** - * optional string system_use_notification = 11; - * @return The systemUseNotification. - */ - java.lang.String getSystemUseNotification(); - /** - * optional string system_use_notification = 11; - * @return The bytes for systemUseNotification. - */ - com.google.protobuf.ByteString - getSystemUseNotificationBytes(); - } - /** - *
-   ** Initial server connection response. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.Hello} - */ - public static final class Hello extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.Hello) - HelloOrBuilder { - private static final long serialVersionUID = 0L; - // Use Hello.newBuilder() to construct. - private Hello(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Hello() { - systemName_ = ""; - compatVersion_ = 1; - publicKey_ = java.util.Collections.emptyList(); - challenge_ = com.google.protobuf.ByteString.EMPTY; - applicationName_ = ""; - systemUseNotification_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Hello(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Hello( - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - systemName_ = bs; - break; - } - case 16: { - bitField0_ |= 0x00000002; - compatVersion_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - incrementalVersion_ = input.readUInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - publicKey_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - publicKey_.add(input.readBytes()); - break; - } - case 42: { - bitField0_ |= 0x00000008; - challenge_ = input.readBytes(); - break; - } - case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - applicationName_ = bs; - break; - } - case 56: { - bitField0_ |= 0x00000020; - cdpVersionMajor_ = input.readUInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000040; - cdpVersionMinor_ = input.readUInt32(); - break; - } - case 72: { - bitField0_ |= 0x00000080; - cdpVersionPatch_ = input.readUInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000100; - idleLockoutPeriod_ = input.readUInt32(); - break; - } - case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000200; - systemUseNotification_ = bs; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000008) != 0)) { - publicKey_ = java.util.Collections.unmodifiableList(publicKey_); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Hello_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Hello_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Hello.class, com.cdptech.cdpclient.proto.StudioAPI.Hello.Builder.class); - } - - private int bitField0_; - public static final int SYSTEM_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object systemName_; - /** - * required string system_name = 1; - * @return Whether the systemName field is set. - */ - @java.lang.Override - public boolean hasSystemName() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required string system_name = 1; - * @return The systemName. - */ - @java.lang.Override - public java.lang.String getSystemName() { - java.lang.Object ref = systemName_; - 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(); - if (bs.isValidUtf8()) { - systemName_ = s; - } - return s; - } - } - /** - * required string system_name = 1; - * @return The bytes for systemName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSystemNameBytes() { - java.lang.Object ref = systemName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - systemName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMPAT_VERSION_FIELD_NUMBER = 2; - private int compatVersion_; - /** - * required uint32 compat_version = 2 [default = 1]; - * @return Whether the compatVersion field is set. - */ - @java.lang.Override - public boolean hasCompatVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * required uint32 compat_version = 2 [default = 1]; - * @return The compatVersion. - */ - @java.lang.Override - public int getCompatVersion() { - return compatVersion_; - } - - public static final int INCREMENTAL_VERSION_FIELD_NUMBER = 3; - private int incrementalVersion_; - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return Whether the incrementalVersion field is set. - */ - @java.lang.Override - public boolean hasIncrementalVersion() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return The incrementalVersion. - */ - @java.lang.Override - public int getIncrementalVersion() { - return incrementalVersion_; - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 4; - private java.util.List publicKey_; - /** - * repeated bytes public_key = 4; - * @return A list containing the publicKey. - */ - @java.lang.Override - public java.util.List - getPublicKeyList() { - return publicKey_; - } - /** - * repeated bytes public_key = 4; - * @return The count of publicKey. - */ - public int getPublicKeyCount() { - return publicKey_.size(); - } - /** - * repeated bytes public_key = 4; - * @param index The index of the element to return. - * @return The publicKey at the given index. - */ - public com.google.protobuf.ByteString getPublicKey(int index) { - return publicKey_.get(index); - } - - public static final int CHALLENGE_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString challenge_; - /** - *
-     * if challenge exists then server expects authentication (AuthRequest message)
-     * 
- * - * optional bytes challenge = 5; - * @return Whether the challenge field is set. - */ - @java.lang.Override - public boolean hasChallenge() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * if challenge exists then server expects authentication (AuthRequest message)
-     * 
- * - * optional bytes challenge = 5; - * @return The challenge. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChallenge() { - return challenge_; - } - - public static final int APPLICATION_NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object applicationName_; - /** - * optional string application_name = 6; - * @return Whether the applicationName field is set. - */ - @java.lang.Override - public boolean hasApplicationName() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * optional string application_name = 6; - * @return The applicationName. - */ - @java.lang.Override - public java.lang.String getApplicationName() { - java.lang.Object ref = applicationName_; - 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(); - if (bs.isValidUtf8()) { - applicationName_ = s; - } - return s; - } - } - /** - * optional string application_name = 6; - * @return The bytes for applicationName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApplicationNameBytes() { - java.lang.Object ref = applicationName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CDP_VERSION_MAJOR_FIELD_NUMBER = 7; - private int cdpVersionMajor_; - /** - * optional uint32 cdp_version_major = 7; - * @return Whether the cdpVersionMajor field is set. - */ - @java.lang.Override - public boolean hasCdpVersionMajor() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * optional uint32 cdp_version_major = 7; - * @return The cdpVersionMajor. - */ - @java.lang.Override - public int getCdpVersionMajor() { - return cdpVersionMajor_; - } - - public static final int CDP_VERSION_MINOR_FIELD_NUMBER = 8; - private int cdpVersionMinor_; - /** - * optional uint32 cdp_version_minor = 8; - * @return Whether the cdpVersionMinor field is set. - */ - @java.lang.Override - public boolean hasCdpVersionMinor() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * optional uint32 cdp_version_minor = 8; - * @return The cdpVersionMinor. - */ - @java.lang.Override - public int getCdpVersionMinor() { - return cdpVersionMinor_; - } - - public static final int CDP_VERSION_PATCH_FIELD_NUMBER = 9; - private int cdpVersionPatch_; - /** - * optional uint32 cdp_version_patch = 9; - * @return Whether the cdpVersionPatch field is set. - */ - @java.lang.Override - public boolean hasCdpVersionPatch() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - * optional uint32 cdp_version_patch = 9; - * @return The cdpVersionPatch. - */ - @java.lang.Override - public int getCdpVersionPatch() { - return cdpVersionPatch_; - } - - public static final int IDLE_LOCKOUT_PERIOD_FIELD_NUMBER = 10; - private int idleLockoutPeriod_; - /** - * optional uint32 idle_lockout_period = 10; - * @return Whether the idleLockoutPeriod field is set. - */ - @java.lang.Override - public boolean hasIdleLockoutPeriod() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - * optional uint32 idle_lockout_period = 10; - * @return The idleLockoutPeriod. - */ - @java.lang.Override - public int getIdleLockoutPeriod() { - return idleLockoutPeriod_; - } - - public static final int SYSTEM_USE_NOTIFICATION_FIELD_NUMBER = 11; - private volatile java.lang.Object systemUseNotification_; - /** - * optional string system_use_notification = 11; - * @return Whether the systemUseNotification field is set. - */ - @java.lang.Override - public boolean hasSystemUseNotification() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - * optional string system_use_notification = 11; - * @return The systemUseNotification. - */ - @java.lang.Override - public java.lang.String getSystemUseNotification() { - java.lang.Object ref = systemUseNotification_; - 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(); - if (bs.isValidUtf8()) { - systemUseNotification_ = s; - } - return s; - } - } - /** - * optional string system_use_notification = 11; - * @return The bytes for systemUseNotification. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSystemUseNotificationBytes() { - java.lang.Object ref = systemUseNotification_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - systemUseNotification_ = 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; - - if (!hasSystemName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCompatVersion()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasIncrementalVersion()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, systemName_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt32(2, compatVersion_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt32(3, incrementalVersion_); - } - for (int i = 0; i < publicKey_.size(); i++) { - output.writeBytes(4, publicKey_.get(i)); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBytes(5, challenge_); - } - if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationName_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeUInt32(7, cdpVersionMajor_); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeUInt32(8, cdpVersionMinor_); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeUInt32(9, cdpVersionPatch_); - } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeUInt32(10, idleLockoutPeriod_); - } - if (((bitField0_ & 0x00000200) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, systemUseNotification_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, systemName_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, compatVersion_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, incrementalVersion_); - } - { - int dataSize = 0; - for (int i = 0; i < publicKey_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(publicKey_.get(i)); - } - size += dataSize; - size += 1 * getPublicKeyList().size(); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, challenge_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationName_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, cdpVersionMajor_); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, cdpVersionMinor_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, cdpVersionPatch_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, idleLockoutPeriod_); - } - if (((bitField0_ & 0x00000200) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, systemUseNotification_); - } - 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 com.cdptech.cdpclient.proto.StudioAPI.Hello)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.Hello other = (com.cdptech.cdpclient.proto.StudioAPI.Hello) obj; - - if (hasSystemName() != other.hasSystemName()) return false; - if (hasSystemName()) { - if (!getSystemName() - .equals(other.getSystemName())) return false; - } - if (hasCompatVersion() != other.hasCompatVersion()) return false; - if (hasCompatVersion()) { - if (getCompatVersion() - != other.getCompatVersion()) return false; - } - if (hasIncrementalVersion() != other.hasIncrementalVersion()) return false; - if (hasIncrementalVersion()) { - if (getIncrementalVersion() - != other.getIncrementalVersion()) return false; - } - if (!getPublicKeyList() - .equals(other.getPublicKeyList())) return false; - if (hasChallenge() != other.hasChallenge()) return false; - if (hasChallenge()) { - if (!getChallenge() - .equals(other.getChallenge())) return false; - } - if (hasApplicationName() != other.hasApplicationName()) return false; - if (hasApplicationName()) { - if (!getApplicationName() - .equals(other.getApplicationName())) return false; - } - if (hasCdpVersionMajor() != other.hasCdpVersionMajor()) return false; - if (hasCdpVersionMajor()) { - if (getCdpVersionMajor() - != other.getCdpVersionMajor()) return false; - } - if (hasCdpVersionMinor() != other.hasCdpVersionMinor()) return false; - if (hasCdpVersionMinor()) { - if (getCdpVersionMinor() - != other.getCdpVersionMinor()) return false; - } - if (hasCdpVersionPatch() != other.hasCdpVersionPatch()) return false; - if (hasCdpVersionPatch()) { - if (getCdpVersionPatch() - != other.getCdpVersionPatch()) return false; - } - if (hasIdleLockoutPeriod() != other.hasIdleLockoutPeriod()) return false; - if (hasIdleLockoutPeriod()) { - if (getIdleLockoutPeriod() - != other.getIdleLockoutPeriod()) return false; - } - if (hasSystemUseNotification() != other.hasSystemUseNotification()) return false; - if (hasSystemUseNotification()) { - if (!getSystemUseNotification() - .equals(other.getSystemUseNotification())) 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 (hasSystemName()) { - hash = (37 * hash) + SYSTEM_NAME_FIELD_NUMBER; - hash = (53 * hash) + getSystemName().hashCode(); - } - if (hasCompatVersion()) { - hash = (37 * hash) + COMPAT_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getCompatVersion(); - } - if (hasIncrementalVersion()) { - hash = (37 * hash) + INCREMENTAL_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getIncrementalVersion(); - } - if (getPublicKeyCount() > 0) { - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeyList().hashCode(); - } - if (hasChallenge()) { - hash = (37 * hash) + CHALLENGE_FIELD_NUMBER; - hash = (53 * hash) + getChallenge().hashCode(); - } - if (hasApplicationName()) { - hash = (37 * hash) + APPLICATION_NAME_FIELD_NUMBER; - hash = (53 * hash) + getApplicationName().hashCode(); - } - if (hasCdpVersionMajor()) { - hash = (37 * hash) + CDP_VERSION_MAJOR_FIELD_NUMBER; - hash = (53 * hash) + getCdpVersionMajor(); - } - if (hasCdpVersionMinor()) { - hash = (37 * hash) + CDP_VERSION_MINOR_FIELD_NUMBER; - hash = (53 * hash) + getCdpVersionMinor(); - } - if (hasCdpVersionPatch()) { - hash = (37 * hash) + CDP_VERSION_PATCH_FIELD_NUMBER; - hash = (53 * hash) + getCdpVersionPatch(); - } - if (hasIdleLockoutPeriod()) { - hash = (37 * hash) + IDLE_LOCKOUT_PERIOD_FIELD_NUMBER; - hash = (53 * hash) + getIdleLockoutPeriod(); - } - if (hasSystemUseNotification()) { - hash = (37 * hash) + SYSTEM_USE_NOTIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getSystemUseNotification().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello 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 com.cdptech.cdpclient.proto.StudioAPI.Hello parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello 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 com.cdptech.cdpclient.proto.StudioAPI.Hello parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Hello 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(com.cdptech.cdpclient.proto.StudioAPI.Hello 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; - } - /** - *
-     ** Initial server connection response. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.Hello} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.Hello) - com.cdptech.cdpclient.proto.StudioAPI.HelloOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Hello_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Hello_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Hello.class, com.cdptech.cdpclient.proto.StudioAPI.Hello.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.Hello.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(); - systemName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - compatVersion_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - incrementalVersion_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - publicKey_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - challenge_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - applicationName_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - cdpVersionMajor_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - cdpVersionMinor_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - cdpVersionPatch_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - idleLockoutPeriod_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); - systemUseNotification_ = ""; - bitField0_ = (bitField0_ & ~0x00000400); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Hello_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Hello getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.Hello.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Hello build() { - com.cdptech.cdpclient.proto.StudioAPI.Hello result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Hello buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.Hello result = new com.cdptech.cdpclient.proto.StudioAPI.Hello(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.systemName_ = systemName_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.compatVersion_ = compatVersion_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.incrementalVersion_ = incrementalVersion_; - to_bitField0_ |= 0x00000004; - } - if (((bitField0_ & 0x00000008) != 0)) { - publicKey_ = java.util.Collections.unmodifiableList(publicKey_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.publicKey_ = publicKey_; - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000008; - } - result.challenge_ = challenge_; - if (((from_bitField0_ & 0x00000020) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.applicationName_ = applicationName_; - if (((from_bitField0_ & 0x00000040) != 0)) { - result.cdpVersionMajor_ = cdpVersionMajor_; - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.cdpVersionMinor_ = cdpVersionMinor_; - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.cdpVersionPatch_ = cdpVersionPatch_; - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.idleLockoutPeriod_ = idleLockoutPeriod_; - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - to_bitField0_ |= 0x00000200; - } - result.systemUseNotification_ = systemUseNotification_; - result.bitField0_ = to_bitField0_; - 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 com.cdptech.cdpclient.proto.StudioAPI.Hello) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.Hello)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.Hello other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.Hello.getDefaultInstance()) return this; - if (other.hasSystemName()) { - bitField0_ |= 0x00000001; - systemName_ = other.systemName_; - onChanged(); - } - if (other.hasCompatVersion()) { - setCompatVersion(other.getCompatVersion()); - } - if (other.hasIncrementalVersion()) { - setIncrementalVersion(other.getIncrementalVersion()); - } - if (!other.publicKey_.isEmpty()) { - if (publicKey_.isEmpty()) { - publicKey_ = other.publicKey_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePublicKeyIsMutable(); - publicKey_.addAll(other.publicKey_); - } - onChanged(); - } - if (other.hasChallenge()) { - setChallenge(other.getChallenge()); - } - if (other.hasApplicationName()) { - bitField0_ |= 0x00000020; - applicationName_ = other.applicationName_; - onChanged(); - } - if (other.hasCdpVersionMajor()) { - setCdpVersionMajor(other.getCdpVersionMajor()); - } - if (other.hasCdpVersionMinor()) { - setCdpVersionMinor(other.getCdpVersionMinor()); - } - if (other.hasCdpVersionPatch()) { - setCdpVersionPatch(other.getCdpVersionPatch()); - } - if (other.hasIdleLockoutPeriod()) { - setIdleLockoutPeriod(other.getIdleLockoutPeriod()); - } - if (other.hasSystemUseNotification()) { - bitField0_ |= 0x00000400; - systemUseNotification_ = other.systemUseNotification_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasSystemName()) { - return false; - } - if (!hasCompatVersion()) { - return false; - } - if (!hasIncrementalVersion()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.Hello parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.Hello) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object systemName_ = ""; - /** - * required string system_name = 1; - * @return Whether the systemName field is set. - */ - public boolean hasSystemName() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required string system_name = 1; - * @return The systemName. - */ - public java.lang.String getSystemName() { - java.lang.Object ref = systemName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - systemName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string system_name = 1; - * @return The bytes for systemName. - */ - public com.google.protobuf.ByteString - getSystemNameBytes() { - java.lang.Object ref = systemName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - systemName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string system_name = 1; - * @param value The systemName to set. - * @return This builder for chaining. - */ - public Builder setSystemName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - systemName_ = value; - onChanged(); - return this; - } - /** - * required string system_name = 1; - * @return This builder for chaining. - */ - public Builder clearSystemName() { - bitField0_ = (bitField0_ & ~0x00000001); - systemName_ = getDefaultInstance().getSystemName(); - onChanged(); - return this; - } - /** - * required string system_name = 1; - * @param value The bytes for systemName to set. - * @return This builder for chaining. - */ - public Builder setSystemNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - systemName_ = value; - onChanged(); - return this; - } - - private int compatVersion_ = 1; - /** - * required uint32 compat_version = 2 [default = 1]; - * @return Whether the compatVersion field is set. - */ - @java.lang.Override - public boolean hasCompatVersion() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * required uint32 compat_version = 2 [default = 1]; - * @return The compatVersion. - */ - @java.lang.Override - public int getCompatVersion() { - return compatVersion_; - } - /** - * required uint32 compat_version = 2 [default = 1]; - * @param value The compatVersion to set. - * @return This builder for chaining. - */ - public Builder setCompatVersion(int value) { - bitField0_ |= 0x00000002; - compatVersion_ = value; - onChanged(); - return this; - } - /** - * required uint32 compat_version = 2 [default = 1]; - * @return This builder for chaining. - */ - public Builder clearCompatVersion() { - bitField0_ = (bitField0_ & ~0x00000002); - compatVersion_ = 1; - onChanged(); - return this; - } - - private int incrementalVersion_ ; - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return Whether the incrementalVersion field is set. - */ - @java.lang.Override - public boolean hasIncrementalVersion() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return The incrementalVersion. - */ - @java.lang.Override - public int getIncrementalVersion() { - return incrementalVersion_; - } - /** - * required uint32 incremental_version = 3 [default = 0]; - * @param value The incrementalVersion to set. - * @return This builder for chaining. - */ - public Builder setIncrementalVersion(int value) { - bitField0_ |= 0x00000004; - incrementalVersion_ = value; - onChanged(); - return this; - } - /** - * required uint32 incremental_version = 3 [default = 0]; - * @return This builder for chaining. - */ - public Builder clearIncrementalVersion() { - bitField0_ = (bitField0_ & ~0x00000004); - incrementalVersion_ = 0; - onChanged(); - return this; - } - - private java.util.List publicKey_ = java.util.Collections.emptyList(); - private void ensurePublicKeyIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - publicKey_ = new java.util.ArrayList(publicKey_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated bytes public_key = 4; - * @return A list containing the publicKey. - */ - public java.util.List - getPublicKeyList() { - return ((bitField0_ & 0x00000008) != 0) ? - java.util.Collections.unmodifiableList(publicKey_) : publicKey_; - } - /** - * repeated bytes public_key = 4; - * @return The count of publicKey. - */ - public int getPublicKeyCount() { - return publicKey_.size(); - } - /** - * repeated bytes public_key = 4; - * @param index The index of the element to return. - * @return The publicKey at the given index. - */ - public com.google.protobuf.ByteString getPublicKey(int index) { - return publicKey_.get(index); - } - /** - * repeated bytes public_key = 4; - * @param index The index to set the value at. - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeyIsMutable(); - publicKey_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bytes public_key = 4; - * @param value The publicKey to add. - * @return This builder for chaining. - */ - public Builder addPublicKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeyIsMutable(); - publicKey_.add(value); - onChanged(); - return this; - } - /** - * repeated bytes public_key = 4; - * @param values The publicKey to add. - * @return This builder for chaining. - */ - public Builder addAllPublicKey( - java.lang.Iterable values) { - ensurePublicKeyIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, publicKey_); - onChanged(); - return this; - } - /** - * repeated bytes public_key = 4; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - publicKey_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString challenge_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * if challenge exists then server expects authentication (AuthRequest message)
-       * 
- * - * optional bytes challenge = 5; - * @return Whether the challenge field is set. - */ - @java.lang.Override - public boolean hasChallenge() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * if challenge exists then server expects authentication (AuthRequest message)
-       * 
- * - * optional bytes challenge = 5; - * @return The challenge. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChallenge() { - return challenge_; - } - /** - *
-       * if challenge exists then server expects authentication (AuthRequest message)
-       * 
- * - * optional bytes challenge = 5; - * @param value The challenge to set. - * @return This builder for chaining. - */ - public Builder setChallenge(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - challenge_ = value; - onChanged(); - return this; - } - /** - *
-       * if challenge exists then server expects authentication (AuthRequest message)
-       * 
- * - * optional bytes challenge = 5; - * @return This builder for chaining. - */ - public Builder clearChallenge() { - bitField0_ = (bitField0_ & ~0x00000010); - challenge_ = getDefaultInstance().getChallenge(); - onChanged(); - return this; - } - - private java.lang.Object applicationName_ = ""; - /** - * optional string application_name = 6; - * @return Whether the applicationName field is set. - */ - public boolean hasApplicationName() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * optional string application_name = 6; - * @return The applicationName. - */ - public java.lang.String getApplicationName() { - java.lang.Object ref = applicationName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - applicationName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string application_name = 6; - * @return The bytes for applicationName. - */ - public com.google.protobuf.ByteString - getApplicationNameBytes() { - java.lang.Object ref = applicationName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string application_name = 6; - * @param value The applicationName to set. - * @return This builder for chaining. - */ - public Builder setApplicationName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - applicationName_ = value; - onChanged(); - return this; - } - /** - * optional string application_name = 6; - * @return This builder for chaining. - */ - public Builder clearApplicationName() { - bitField0_ = (bitField0_ & ~0x00000020); - applicationName_ = getDefaultInstance().getApplicationName(); - onChanged(); - return this; - } - /** - * optional string application_name = 6; - * @param value The bytes for applicationName to set. - * @return This builder for chaining. - */ - public Builder setApplicationNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - applicationName_ = value; - onChanged(); - return this; - } - - private int cdpVersionMajor_ ; - /** - * optional uint32 cdp_version_major = 7; - * @return Whether the cdpVersionMajor field is set. - */ - @java.lang.Override - public boolean hasCdpVersionMajor() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * optional uint32 cdp_version_major = 7; - * @return The cdpVersionMajor. - */ - @java.lang.Override - public int getCdpVersionMajor() { - return cdpVersionMajor_; - } - /** - * optional uint32 cdp_version_major = 7; - * @param value The cdpVersionMajor to set. - * @return This builder for chaining. - */ - public Builder setCdpVersionMajor(int value) { - bitField0_ |= 0x00000040; - cdpVersionMajor_ = value; - onChanged(); - return this; - } - /** - * optional uint32 cdp_version_major = 7; - * @return This builder for chaining. - */ - public Builder clearCdpVersionMajor() { - bitField0_ = (bitField0_ & ~0x00000040); - cdpVersionMajor_ = 0; - onChanged(); - return this; - } - - private int cdpVersionMinor_ ; - /** - * optional uint32 cdp_version_minor = 8; - * @return Whether the cdpVersionMinor field is set. - */ - @java.lang.Override - public boolean hasCdpVersionMinor() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - * optional uint32 cdp_version_minor = 8; - * @return The cdpVersionMinor. - */ - @java.lang.Override - public int getCdpVersionMinor() { - return cdpVersionMinor_; - } - /** - * optional uint32 cdp_version_minor = 8; - * @param value The cdpVersionMinor to set. - * @return This builder for chaining. - */ - public Builder setCdpVersionMinor(int value) { - bitField0_ |= 0x00000080; - cdpVersionMinor_ = value; - onChanged(); - return this; - } - /** - * optional uint32 cdp_version_minor = 8; - * @return This builder for chaining. - */ - public Builder clearCdpVersionMinor() { - bitField0_ = (bitField0_ & ~0x00000080); - cdpVersionMinor_ = 0; - onChanged(); - return this; - } - - private int cdpVersionPatch_ ; - /** - * optional uint32 cdp_version_patch = 9; - * @return Whether the cdpVersionPatch field is set. - */ - @java.lang.Override - public boolean hasCdpVersionPatch() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - * optional uint32 cdp_version_patch = 9; - * @return The cdpVersionPatch. - */ - @java.lang.Override - public int getCdpVersionPatch() { - return cdpVersionPatch_; - } - /** - * optional uint32 cdp_version_patch = 9; - * @param value The cdpVersionPatch to set. - * @return This builder for chaining. - */ - public Builder setCdpVersionPatch(int value) { - bitField0_ |= 0x00000100; - cdpVersionPatch_ = value; - onChanged(); - return this; - } - /** - * optional uint32 cdp_version_patch = 9; - * @return This builder for chaining. - */ - public Builder clearCdpVersionPatch() { - bitField0_ = (bitField0_ & ~0x00000100); - cdpVersionPatch_ = 0; - onChanged(); - return this; - } - - private int idleLockoutPeriod_ ; - /** - * optional uint32 idle_lockout_period = 10; - * @return Whether the idleLockoutPeriod field is set. - */ - @java.lang.Override - public boolean hasIdleLockoutPeriod() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - * optional uint32 idle_lockout_period = 10; - * @return The idleLockoutPeriod. - */ - @java.lang.Override - public int getIdleLockoutPeriod() { - return idleLockoutPeriod_; - } - /** - * optional uint32 idle_lockout_period = 10; - * @param value The idleLockoutPeriod to set. - * @return This builder for chaining. - */ - public Builder setIdleLockoutPeriod(int value) { - bitField0_ |= 0x00000200; - idleLockoutPeriod_ = value; - onChanged(); - return this; - } - /** - * optional uint32 idle_lockout_period = 10; - * @return This builder for chaining. - */ - public Builder clearIdleLockoutPeriod() { - bitField0_ = (bitField0_ & ~0x00000200); - idleLockoutPeriod_ = 0; - onChanged(); - return this; - } - - private java.lang.Object systemUseNotification_ = ""; - /** - * optional string system_use_notification = 11; - * @return Whether the systemUseNotification field is set. - */ - public boolean hasSystemUseNotification() { - return ((bitField0_ & 0x00000400) != 0); - } - /** - * optional string system_use_notification = 11; - * @return The systemUseNotification. - */ - public java.lang.String getSystemUseNotification() { - java.lang.Object ref = systemUseNotification_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - systemUseNotification_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string system_use_notification = 11; - * @return The bytes for systemUseNotification. - */ - public com.google.protobuf.ByteString - getSystemUseNotificationBytes() { - java.lang.Object ref = systemUseNotification_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - systemUseNotification_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string system_use_notification = 11; - * @param value The systemUseNotification to set. - * @return This builder for chaining. - */ - public Builder setSystemUseNotification( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - systemUseNotification_ = value; - onChanged(); - return this; - } - /** - * optional string system_use_notification = 11; - * @return This builder for chaining. - */ - public Builder clearSystemUseNotification() { - bitField0_ = (bitField0_ & ~0x00000400); - systemUseNotification_ = getDefaultInstance().getSystemUseNotification(); - onChanged(); - return this; - } - /** - * optional string system_use_notification = 11; - * @param value The bytes for systemUseNotification to set. - * @return This builder for chaining. - */ - public Builder setSystemUseNotificationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - systemUseNotification_ = 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:StudioAPI.Proto.Hello) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.Hello) - private static final com.cdptech.cdpclient.proto.StudioAPI.Hello DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.Hello(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Hello getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Hello parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Hello(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 com.cdptech.cdpclient.proto.StudioAPI.Hello getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AuthRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.AuthRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * case-insensitive (can be sent in any casing)
-     * 
- * - * optional string user_id = 1; - * @return Whether the userId field is set. - */ - boolean hasUserId(); - /** - *
-     * case-insensitive (can be sent in any casing)
-     * 
- * - * optional string user_id = 1; - * @return The userId. - */ - java.lang.String getUserId(); - /** - *
-     * case-insensitive (can be sent in any casing)
-     * 
- * - * optional string user_id = 1; - * @return The bytes for userId. - */ - com.google.protobuf.ByteString - getUserIdBytes(); - - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - java.util.List - getChallengeResponseList(); - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse getChallengeResponse(int index); - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - int getChallengeResponseCount(); - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - java.util.List - getChallengeResponseOrBuilderList(); - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder getChallengeResponseOrBuilder( - int index); - } - /** - *
-   ** Server expects this response if it sent a auth_required true. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.AuthRequest} - */ - public static final class AuthRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.AuthRequest) - AuthRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuthRequest.newBuilder() to construct. - private AuthRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AuthRequest() { - userId_ = ""; - challengeResponse_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AuthRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AuthRequest( - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - userId_ = bs; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - challengeResponse_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - challengeResponse_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.PARSER, extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - challengeResponse_ = java.util.Collections.unmodifiableList(challengeResponse_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.class, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder.class); - } - - public interface ChallengeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.AuthRequest.ChallengeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string type = 1; - * @return Whether the type field is set. - */ - boolean hasType(); - /** - * optional string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - * optional string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-       * data corresponding to the type, eg. hash(challenge + password)
-       * 
- * - * optional bytes response = 2; - * @return Whether the response field is set. - */ - boolean hasResponse(); - /** - *
-       * data corresponding to the type, eg. hash(challenge + password)
-       * 
- * - * optional bytes response = 2; - * @return The response. - */ - com.google.protobuf.ByteString getResponse(); - } - /** - * Protobuf type {@code StudioAPI.Proto.AuthRequest.ChallengeResponse} - */ - public static final class ChallengeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.AuthRequest.ChallengeResponse) - ChallengeResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ChallengeResponse.newBuilder() to construct. - private ChallengeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ChallengeResponse() { - type_ = ""; - response_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ChallengeResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ChallengeResponse( - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - type_ = bs; - break; - } - case 18: { - bitField0_ |= 0x00000002; - response_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.class, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder.class); - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; - /** - * optional string type = 1; - * @return Whether the type field is set. - */ - @java.lang.Override - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string type = 1; - * @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(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } - } - /** - * optional string type = 1; - * @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 RESPONSE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString response_; - /** - *
-       * data corresponding to the type, eg. hash(challenge + password)
-       * 
- * - * optional bytes response = 2; - * @return Whether the response field is set. - */ - @java.lang.Override - public boolean hasResponse() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * data corresponding to the type, eg. hash(challenge + password)
-       * 
- * - * optional bytes response = 2; - * @return The response. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResponse() { - return response_; - } - - 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBytes(2, response_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, response_); - } - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse other = (com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse) obj; - - if (hasType() != other.hasType()) return false; - if (hasType()) { - if (!getType() - .equals(other.getType())) return false; - } - if (hasResponse() != other.hasResponse()) return false; - if (hasResponse()) { - if (!getResponse() - .equals(other.getResponse())) 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 (hasType()) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - } - if (hasResponse()) { - hash = (37 * hash) + RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse 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(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse 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 StudioAPI.Proto.AuthRequest.ChallengeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.AuthRequest.ChallengeResponse) - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.class, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.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_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - response_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse build() { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse result = new com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.response_ = response_; - result.bitField0_ = to_bitField0_; - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.getDefaultInstance()) return this; - if (other.hasType()) { - bitField0_ |= 0x00000001; - type_ = other.type_; - onChanged(); - } - if (other.hasResponse()) { - setResponse(other.getResponse()); - } - 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 { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - * optional string type = 1; - * @return Whether the type field is set. - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string type = 1; - * @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(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type = 1; - * @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; - } - } - /** - * optional string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - /** - * optional string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * optional string type = 1; - * @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(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString response_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-         * data corresponding to the type, eg. hash(challenge + password)
-         * 
- * - * optional bytes response = 2; - * @return Whether the response field is set. - */ - @java.lang.Override - public boolean hasResponse() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-         * data corresponding to the type, eg. hash(challenge + password)
-         * 
- * - * optional bytes response = 2; - * @return The response. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResponse() { - return response_; - } - /** - *
-         * data corresponding to the type, eg. hash(challenge + password)
-         * 
- * - * optional bytes response = 2; - * @param value The response to set. - * @return This builder for chaining. - */ - public Builder setResponse(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - response_ = value; - onChanged(); - return this; - } - /** - *
-         * data corresponding to the type, eg. hash(challenge + password)
-         * 
- * - * optional bytes response = 2; - * @return This builder for chaining. - */ - public Builder clearResponse() { - bitField0_ = (bitField0_ & ~0x00000002); - response_ = getDefaultInstance().getResponse(); - 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:StudioAPI.Proto.AuthRequest.ChallengeResponse) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.AuthRequest.ChallengeResponse) - private static final com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChallengeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ChallengeResponse(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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int USER_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object userId_; - /** - *
-     * case-insensitive (can be sent in any casing)
-     * 
- * - * optional string user_id = 1; - * @return Whether the userId field is set. - */ - @java.lang.Override - public boolean hasUserId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * case-insensitive (can be sent in any casing)
-     * 
- * - * optional string user_id = 1; - * @return The userId. - */ - @java.lang.Override - public java.lang.String getUserId() { - java.lang.Object ref = userId_; - 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(); - if (bs.isValidUtf8()) { - userId_ = s; - } - return s; - } - } - /** - *
-     * case-insensitive (can be sent in any casing)
-     * 
- * - * optional string user_id = 1; - * @return The bytes for userId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserIdBytes() { - java.lang.Object ref = userId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CHALLENGE_RESPONSE_FIELD_NUMBER = 2; - private java.util.List challengeResponse_; - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - @java.lang.Override - public java.util.List getChallengeResponseList() { - return challengeResponse_; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - @java.lang.Override - public java.util.List - getChallengeResponseOrBuilderList() { - return challengeResponse_; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - @java.lang.Override - public int getChallengeResponseCount() { - return challengeResponse_.size(); - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse getChallengeResponse(int index) { - return challengeResponse_.get(index); - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder getChallengeResponseOrBuilder( - int index) { - return challengeResponse_.get(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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userId_); - } - for (int i = 0; i < challengeResponse_.size(); i++) { - output.writeMessage(2, challengeResponse_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userId_); - } - for (int i = 0; i < challengeResponse_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, challengeResponse_.get(i)); - } - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest other = (com.cdptech.cdpclient.proto.StudioAPI.AuthRequest) obj; - - if (hasUserId() != other.hasUserId()) return false; - if (hasUserId()) { - if (!getUserId() - .equals(other.getUserId())) return false; - } - if (!getChallengeResponseList() - .equals(other.getChallengeResponseList())) 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 (hasUserId()) { - hash = (37 * hash) + USER_ID_FIELD_NUMBER; - hash = (53 * hash) + getUserId().hashCode(); - } - if (getChallengeResponseCount() > 0) { - hash = (37 * hash) + CHALLENGE_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getChallengeResponseList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest 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(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest 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; - } - /** - *
-     ** Server expects this response if it sent a auth_required true. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.AuthRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.AuthRequest) - com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.class, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getChallengeResponseFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - userId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (challengeResponseBuilder_ == null) { - challengeResponse_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - challengeResponseBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthRequest_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest build() { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest result = new com.cdptech.cdpclient.proto.StudioAPI.AuthRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.userId_ = userId_; - if (challengeResponseBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - challengeResponse_ = java.util.Collections.unmodifiableList(challengeResponse_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.challengeResponse_ = challengeResponse_; - } else { - result.challengeResponse_ = challengeResponseBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.AuthRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance()) return this; - if (other.hasUserId()) { - bitField0_ |= 0x00000001; - userId_ = other.userId_; - onChanged(); - } - if (challengeResponseBuilder_ == null) { - if (!other.challengeResponse_.isEmpty()) { - if (challengeResponse_.isEmpty()) { - challengeResponse_ = other.challengeResponse_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureChallengeResponseIsMutable(); - challengeResponse_.addAll(other.challengeResponse_); - } - onChanged(); - } - } else { - if (!other.challengeResponse_.isEmpty()) { - if (challengeResponseBuilder_.isEmpty()) { - challengeResponseBuilder_.dispose(); - challengeResponseBuilder_ = null; - challengeResponse_ = other.challengeResponse_; - bitField0_ = (bitField0_ & ~0x00000002); - challengeResponseBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getChallengeResponseFieldBuilder() : null; - } else { - challengeResponseBuilder_.addAllMessages(other.challengeResponse_); - } - } - } - 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 { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.AuthRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object userId_ = ""; - /** - *
-       * case-insensitive (can be sent in any casing)
-       * 
- * - * optional string user_id = 1; - * @return Whether the userId field is set. - */ - public boolean hasUserId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * case-insensitive (can be sent in any casing)
-       * 
- * - * optional string user_id = 1; - * @return The userId. - */ - public java.lang.String getUserId() { - java.lang.Object ref = userId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - userId_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * case-insensitive (can be sent in any casing)
-       * 
- * - * optional string user_id = 1; - * @return The bytes for userId. - */ - public com.google.protobuf.ByteString - getUserIdBytes() { - java.lang.Object ref = userId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * case-insensitive (can be sent in any casing)
-       * 
- * - * optional string user_id = 1; - * @param value The userId to set. - * @return This builder for chaining. - */ - public Builder setUserId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - userId_ = value; - onChanged(); - return this; - } - /** - *
-       * case-insensitive (can be sent in any casing)
-       * 
- * - * optional string user_id = 1; - * @return This builder for chaining. - */ - public Builder clearUserId() { - bitField0_ = (bitField0_ & ~0x00000001); - userId_ = getDefaultInstance().getUserId(); - onChanged(); - return this; - } - /** - *
-       * case-insensitive (can be sent in any casing)
-       * 
- * - * optional string user_id = 1; - * @param value The bytes for userId to set. - * @return This builder for chaining. - */ - public Builder setUserIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - userId_ = value; - onChanged(); - return this; - } - - private java.util.List challengeResponse_ = - java.util.Collections.emptyList(); - private void ensureChallengeResponseIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - challengeResponse_ = new java.util.ArrayList(challengeResponse_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder> challengeResponseBuilder_; - - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public java.util.List getChallengeResponseList() { - if (challengeResponseBuilder_ == null) { - return java.util.Collections.unmodifiableList(challengeResponse_); - } else { - return challengeResponseBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public int getChallengeResponseCount() { - if (challengeResponseBuilder_ == null) { - return challengeResponse_.size(); - } else { - return challengeResponseBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse getChallengeResponse(int index) { - if (challengeResponseBuilder_ == null) { - return challengeResponse_.get(index); - } else { - return challengeResponseBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder setChallengeResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse value) { - if (challengeResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChallengeResponseIsMutable(); - challengeResponse_.set(index, value); - onChanged(); - } else { - challengeResponseBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder setChallengeResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder builderForValue) { - if (challengeResponseBuilder_ == null) { - ensureChallengeResponseIsMutable(); - challengeResponse_.set(index, builderForValue.build()); - onChanged(); - } else { - challengeResponseBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder addChallengeResponse(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse value) { - if (challengeResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChallengeResponseIsMutable(); - challengeResponse_.add(value); - onChanged(); - } else { - challengeResponseBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder addChallengeResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse value) { - if (challengeResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChallengeResponseIsMutable(); - challengeResponse_.add(index, value); - onChanged(); - } else { - challengeResponseBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder addChallengeResponse( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder builderForValue) { - if (challengeResponseBuilder_ == null) { - ensureChallengeResponseIsMutable(); - challengeResponse_.add(builderForValue.build()); - onChanged(); - } else { - challengeResponseBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder addChallengeResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder builderForValue) { - if (challengeResponseBuilder_ == null) { - ensureChallengeResponseIsMutable(); - challengeResponse_.add(index, builderForValue.build()); - onChanged(); - } else { - challengeResponseBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder addAllChallengeResponse( - java.lang.Iterable values) { - if (challengeResponseBuilder_ == null) { - ensureChallengeResponseIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, challengeResponse_); - onChanged(); - } else { - challengeResponseBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder clearChallengeResponse() { - if (challengeResponseBuilder_ == null) { - challengeResponse_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - challengeResponseBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public Builder removeChallengeResponse(int index) { - if (challengeResponseBuilder_ == null) { - ensureChallengeResponseIsMutable(); - challengeResponse_.remove(index); - onChanged(); - } else { - challengeResponseBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder getChallengeResponseBuilder( - int index) { - return getChallengeResponseFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder getChallengeResponseOrBuilder( - int index) { - if (challengeResponseBuilder_ == null) { - return challengeResponse_.get(index); } else { - return challengeResponseBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public java.util.List - getChallengeResponseOrBuilderList() { - if (challengeResponseBuilder_ != null) { - return challengeResponseBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(challengeResponse_); - } - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder addChallengeResponseBuilder() { - return getChallengeResponseFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder addChallengeResponseBuilder( - int index) { - return getChallengeResponseFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.AuthRequest.ChallengeResponse challenge_response = 2; - */ - public java.util.List - getChallengeResponseBuilderList() { - return getChallengeResponseFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder> - getChallengeResponseFieldBuilder() { - if (challengeResponseBuilder_ == null) { - challengeResponseBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponse.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.ChallengeResponseOrBuilder>( - challengeResponse_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - challengeResponse_ = null; - } - return challengeResponseBuilder_; - } - @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:StudioAPI.Proto.AuthRequest) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.AuthRequest) - private static final com.cdptech.cdpclient.proto.StudioAPI.AuthRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.AuthRequest(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AuthRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuthRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthRequest(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 com.cdptech.cdpclient.proto.StudioAPI.AuthRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AdditionalChallengeResponseRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.AdditionalChallengeResponseRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string type = 1; - * @return Whether the type field is set. - */ - boolean hasType(); - /** - * optional string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - * optional string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * optional string prompt = 2; - * @return Whether the prompt field is set. - */ - boolean hasPrompt(); - /** - * optional string prompt = 2; - * @return The prompt. - */ - java.lang.String getPrompt(); - /** - * optional string prompt = 2; - * @return The bytes for prompt. - */ - com.google.protobuf.ByteString - getPromptBytes(); - - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - java.util.List - getParameterList(); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter getParameter(int index); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - int getParameterCount(); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - java.util.List - getParameterOrBuilderList(); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder getParameterOrBuilder( - int index); - } - /** - * Protobuf type {@code StudioAPI.Proto.AdditionalChallengeResponseRequired} - */ - public static final class AdditionalChallengeResponseRequired extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.AdditionalChallengeResponseRequired) - AdditionalChallengeResponseRequiredOrBuilder { - private static final long serialVersionUID = 0L; - // Use AdditionalChallengeResponseRequired.newBuilder() to construct. - private AdditionalChallengeResponseRequired(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AdditionalChallengeResponseRequired() { - type_ = ""; - prompt_ = ""; - parameter_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AdditionalChallengeResponseRequired(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AdditionalChallengeResponseRequired( - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - type_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - prompt_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - parameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - parameter_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.PARSER, extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - parameter_ = java.util.Collections.unmodifiableList(parameter_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.class, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder.class); - } - - public interface ParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * @return Whether the name field is set. - */ - boolean hasName(); - /** - * optional string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - * optional string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string value = 2; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * optional string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - * optional string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - } - /** - * Protobuf type {@code StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter} - */ - public static final class Parameter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter) - ParameterOrBuilder { - private static final long serialVersionUID = 0L; - // Use Parameter.newBuilder() to construct. - private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Parameter() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Parameter(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Parameter( - 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: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - name_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - value_ = bs; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.class, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * @return Whether the name field is set. - */ - @java.lang.Override - public boolean hasName() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional 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(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - * optional 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 VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - * optional string value = 2; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - 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(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } - } - /** - * optional string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter other = (com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter) obj; - - if (hasName() != other.hasName()) return false; - if (hasName()) { - if (!getName() - .equals(other.getName())) return false; - } - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) 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 (hasName()) { - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - } - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter 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(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter 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 StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter) - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.class, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.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_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter build() { - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter result = new com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.getDefaultInstance()) return this; - if (other.hasName()) { - bitField0_ |= 0x00000001; - name_ = other.name_; - onChanged(); - } - if (other.hasValue()) { - bitField0_ |= 0x00000002; - value_ = other.value_; - 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 { - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * @return Whether the name field is set. - */ - public boolean hasName() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional 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(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional 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; - } - } - /** - * optional 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(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional 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(); - } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - * optional string value = 2; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - /** - * optional string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * optional string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = 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:StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter) - private static final com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Parameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Parameter(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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; - /** - * optional string type = 1; - * @return Whether the type field is set. - */ - @java.lang.Override - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string type = 1; - * @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(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } - } - /** - * optional string type = 1; - * @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 PROMPT_FIELD_NUMBER = 2; - private volatile java.lang.Object prompt_; - /** - * optional string prompt = 2; - * @return Whether the prompt field is set. - */ - @java.lang.Override - public boolean hasPrompt() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string prompt = 2; - * @return The prompt. - */ - @java.lang.Override - public java.lang.String getPrompt() { - java.lang.Object ref = prompt_; - 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(); - if (bs.isValidUtf8()) { - prompt_ = s; - } - return s; - } - } - /** - * optional string prompt = 2; - * @return The bytes for prompt. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPromptBytes() { - java.lang.Object ref = prompt_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - prompt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAMETER_FIELD_NUMBER = 3; - private java.util.List parameter_; - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - @java.lang.Override - public java.util.List getParameterList() { - return parameter_; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - @java.lang.Override - public java.util.List - getParameterOrBuilderList() { - return parameter_; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - @java.lang.Override - public int getParameterCount() { - return parameter_.size(); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter getParameter(int index) { - return parameter_.get(index); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder getParameterOrBuilder( - int index) { - return parameter_.get(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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, prompt_); - } - for (int i = 0; i < parameter_.size(); i++) { - output.writeMessage(3, parameter_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, prompt_); - } - for (int i = 0; i < parameter_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, parameter_.get(i)); - } - 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired other = (com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired) obj; - - if (hasType() != other.hasType()) return false; - if (hasType()) { - if (!getType() - .equals(other.getType())) return false; - } - if (hasPrompt() != other.hasPrompt()) return false; - if (hasPrompt()) { - if (!getPrompt() - .equals(other.getPrompt())) return false; - } - if (!getParameterList() - .equals(other.getParameterList())) 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 (hasType()) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - } - if (hasPrompt()) { - hash = (37 * hash) + PROMPT_FIELD_NUMBER; - hash = (53 * hash) + getPrompt().hashCode(); - } - if (getParameterCount() > 0) { - hash = (37 * hash) + PARAMETER_FIELD_NUMBER; - hash = (53 * hash) + getParameterList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired 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(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired 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 StudioAPI.Proto.AdditionalChallengeResponseRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.AdditionalChallengeResponseRequired) - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.class, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getParameterFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - prompt_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (parameterBuilder_ == null) { - parameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - parameterBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired build() { - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired result = new com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.prompt_ = prompt_; - if (parameterBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - parameter_ = java.util.Collections.unmodifiableList(parameter_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.parameter_ = parameter_; - } else { - result.parameter_ = parameterBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.getDefaultInstance()) return this; - if (other.hasType()) { - bitField0_ |= 0x00000001; - type_ = other.type_; - onChanged(); - } - if (other.hasPrompt()) { - bitField0_ |= 0x00000002; - prompt_ = other.prompt_; - onChanged(); - } - if (parameterBuilder_ == null) { - if (!other.parameter_.isEmpty()) { - if (parameter_.isEmpty()) { - parameter_ = other.parameter_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureParameterIsMutable(); - parameter_.addAll(other.parameter_); - } - onChanged(); - } - } else { - if (!other.parameter_.isEmpty()) { - if (parameterBuilder_.isEmpty()) { - parameterBuilder_.dispose(); - parameterBuilder_ = null; - parameter_ = other.parameter_; - bitField0_ = (bitField0_ & ~0x00000004); - parameterBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getParameterFieldBuilder() : null; - } else { - parameterBuilder_.addAllMessages(other.parameter_); - } - } - } - 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 { - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object type_ = ""; - /** - * optional string type = 1; - * @return Whether the type field is set. - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string type = 1; - * @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(); - if (bs.isValidUtf8()) { - type_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type = 1; - * @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; - } - } - /** - * optional string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - /** - * optional string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * optional string type = 1; - * @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(); - } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - - private java.lang.Object prompt_ = ""; - /** - * optional string prompt = 2; - * @return Whether the prompt field is set. - */ - public boolean hasPrompt() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string prompt = 2; - * @return The prompt. - */ - public java.lang.String getPrompt() { - java.lang.Object ref = prompt_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - prompt_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string prompt = 2; - * @return The bytes for prompt. - */ - public com.google.protobuf.ByteString - getPromptBytes() { - java.lang.Object ref = prompt_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - prompt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string prompt = 2; - * @param value The prompt to set. - * @return This builder for chaining. - */ - public Builder setPrompt( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - prompt_ = value; - onChanged(); - return this; - } - /** - * optional string prompt = 2; - * @return This builder for chaining. - */ - public Builder clearPrompt() { - bitField0_ = (bitField0_ & ~0x00000002); - prompt_ = getDefaultInstance().getPrompt(); - onChanged(); - return this; - } - /** - * optional string prompt = 2; - * @param value The bytes for prompt to set. - * @return This builder for chaining. - */ - public Builder setPromptBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - prompt_ = value; - onChanged(); - return this; - } - - private java.util.List parameter_ = - java.util.Collections.emptyList(); - private void ensureParameterIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - parameter_ = new java.util.ArrayList(parameter_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder> parameterBuilder_; - - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public java.util.List getParameterList() { - if (parameterBuilder_ == null) { - return java.util.Collections.unmodifiableList(parameter_); - } else { - return parameterBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public int getParameterCount() { - if (parameterBuilder_ == null) { - return parameter_.size(); - } else { - return parameterBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter getParameter(int index) { - if (parameterBuilder_ == null) { - return parameter_.get(index); - } else { - return parameterBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder setParameter( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter value) { - if (parameterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterIsMutable(); - parameter_.set(index, value); - onChanged(); - } else { - parameterBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder setParameter( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder builderForValue) { - if (parameterBuilder_ == null) { - ensureParameterIsMutable(); - parameter_.set(index, builderForValue.build()); - onChanged(); - } else { - parameterBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder addParameter(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter value) { - if (parameterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterIsMutable(); - parameter_.add(value); - onChanged(); - } else { - parameterBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder addParameter( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter value) { - if (parameterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterIsMutable(); - parameter_.add(index, value); - onChanged(); - } else { - parameterBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder addParameter( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder builderForValue) { - if (parameterBuilder_ == null) { - ensureParameterIsMutable(); - parameter_.add(builderForValue.build()); - onChanged(); - } else { - parameterBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder addParameter( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder builderForValue) { - if (parameterBuilder_ == null) { - ensureParameterIsMutable(); - parameter_.add(index, builderForValue.build()); - onChanged(); - } else { - parameterBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder addAllParameter( - java.lang.Iterable values) { - if (parameterBuilder_ == null) { - ensureParameterIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, parameter_); - onChanged(); - } else { - parameterBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder clearParameter() { - if (parameterBuilder_ == null) { - parameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - parameterBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public Builder removeParameter(int index) { - if (parameterBuilder_ == null) { - ensureParameterIsMutable(); - parameter_.remove(index); - onChanged(); - } else { - parameterBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder getParameterBuilder( - int index) { - return getParameterFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder getParameterOrBuilder( - int index) { - if (parameterBuilder_ == null) { - return parameter_.get(index); } else { - return parameterBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public java.util.List - getParameterOrBuilderList() { - if (parameterBuilder_ != null) { - return parameterBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(parameter_); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder addParameterBuilder() { - return getParameterFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder addParameterBuilder( - int index) { - return getParameterFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired.Parameter parameter = 3; - */ - public java.util.List - getParameterBuilderList() { - return getParameterFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder> - getParameterFieldBuilder() { - if (parameterBuilder_ == null) { - parameterBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Parameter.Builder, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.ParameterOrBuilder>( - parameter_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - parameter_ = null; - } - return parameterBuilder_; - } - @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:StudioAPI.Proto.AdditionalChallengeResponseRequired) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.AdditionalChallengeResponseRequired) - private static final com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AdditionalChallengeResponseRequired parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AdditionalChallengeResponseRequired(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 com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AuthResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.AuthResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return Whether the resultCode field is set. - */ - boolean hasResultCode(); - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return The resultCode. - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode getResultCode(); - - /** - * optional string result_text = 2; - * @return Whether the resultText field is set. - */ - boolean hasResultText(); - /** - * optional string result_text = 2; - * @return The resultText. - */ - java.lang.String getResultText(); - /** - * optional string result_text = 2; - * @return The bytes for resultText. - */ - com.google.protobuf.ByteString - getResultTextBytes(); - - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - java.util.List - getAdditionalChallengeResponseRequiredList(); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired getAdditionalChallengeResponseRequired(int index); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - int getAdditionalChallengeResponseRequiredCount(); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - java.util.List - getAdditionalChallengeResponseRequiredOrBuilderList(); - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder getAdditionalChallengeResponseRequiredOrBuilder( - int index); - } - /** - *
-   ** Sent by server as a response to a AuthRequest. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.AuthResponse} - */ - public static final class AuthResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.AuthResponse) - AuthResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuthResponse.newBuilder() to construct. - private AuthResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AuthResponse() { - resultCode_ = 0; - resultText_ = ""; - additionalChallengeResponseRequired_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AuthResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AuthResponse( - 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 8: { - int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode value = com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - resultCode_ = rawValue; - } - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - resultText_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - additionalChallengeResponseRequired_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - additionalChallengeResponseRequired_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.PARSER, extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - additionalChallengeResponseRequired_ = java.util.Collections.unmodifiableList(additionalChallengeResponseRequired_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.class, com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder.class); - } - - /** - * Protobuf enum {@code StudioAPI.Proto.AuthResponse.AuthResultCode} - */ - public enum AuthResultCode - implements com.google.protobuf.ProtocolMessageEnum { - /** - * eUnknown = 0; - */ - eUnknown(0), - /** - * eGranted = 1; - */ - eGranted(1), - /** - *
-       * expiry timestamp is provided in result_text
-       * 
- * - * eGrantedPasswordWillExpireSoon = 2; - */ - eGrantedPasswordWillExpireSoon(2), - /** - *
-       * AuthRequest with additional response with new username + password hash is required
-       * 
- * - * eNewPasswordRequired = 10; - */ - eNewPasswordRequired(10), - /** - *
-       * challenge response sent was invalid
-       * 
- * - * eInvalidChallengeResponse = 11; - */ - eInvalidChallengeResponse(11), - /** - *
-       * additional challenge responses based on additional credential types are required
-       * 
- * - * eAdditionalResponseRequired = 12; - */ - eAdditionalResponseRequired(12), - /** - *
-       * authentication is temporarily blocked because of too many failed attempts
-       * 
- * - * eTemporarilyBlocked = 13; - */ - eTemporarilyBlocked(13), - /** - *
-       * server requires re-authentication (e.g. because of being idle), implementation
-       * 
- * - * eReauthenticationRequired = 14; - */ - eReauthenticationRequired(14), - ; - - /** - * eUnknown = 0; - */ - public static final int eUnknown_VALUE = 0; - /** - * eGranted = 1; - */ - public static final int eGranted_VALUE = 1; - /** - *
-       * expiry timestamp is provided in result_text
-       * 
- * - * eGrantedPasswordWillExpireSoon = 2; - */ - public static final int eGrantedPasswordWillExpireSoon_VALUE = 2; - /** - *
-       * AuthRequest with additional response with new username + password hash is required
-       * 
- * - * eNewPasswordRequired = 10; - */ - public static final int eNewPasswordRequired_VALUE = 10; - /** - *
-       * challenge response sent was invalid
-       * 
- * - * eInvalidChallengeResponse = 11; - */ - public static final int eInvalidChallengeResponse_VALUE = 11; - /** - *
-       * additional challenge responses based on additional credential types are required
-       * 
- * - * eAdditionalResponseRequired = 12; - */ - public static final int eAdditionalResponseRequired_VALUE = 12; - /** - *
-       * authentication is temporarily blocked because of too many failed attempts
-       * 
- * - * eTemporarilyBlocked = 13; - */ - public static final int eTemporarilyBlocked_VALUE = 13; - /** - *
-       * server requires re-authentication (e.g. because of being idle), implementation
-       * 
- * - * eReauthenticationRequired = 14; - */ - public static final int eReauthenticationRequired_VALUE = 14; - - - public final int getNumber() { - 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 AuthResultCode 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 AuthResultCode forNumber(int value) { - switch (value) { - case 0: return eUnknown; - case 1: return eGranted; - case 2: return eGrantedPasswordWillExpireSoon; - case 10: return eNewPasswordRequired; - case 11: return eInvalidChallengeResponse; - case 12: return eAdditionalResponseRequired; - case 13: return eTemporarilyBlocked; - case 14: return eReauthenticationRequired; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AuthResultCode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AuthResultCode findValueByNumber(int number) { - return AuthResultCode.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDescriptor().getEnumTypes().get(0); - } - - private static final AuthResultCode[] VALUES = values(); - - public static AuthResultCode valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AuthResultCode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:StudioAPI.Proto.AuthResponse.AuthResultCode) - } - - private int bitField0_; - public static final int RESULT_CODE_FIELD_NUMBER = 1; - private int resultCode_; - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return Whether the resultCode field is set. - */ - @java.lang.Override public boolean hasResultCode() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return The resultCode. - */ - @java.lang.Override public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode getResultCode() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode result = com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode.valueOf(resultCode_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode.eUnknown : result; - } - - public static final int RESULT_TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object resultText_; - /** - * optional string result_text = 2; - * @return Whether the resultText field is set. - */ - @java.lang.Override - public boolean hasResultText() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string result_text = 2; - * @return The resultText. - */ - @java.lang.Override - public java.lang.String getResultText() { - java.lang.Object ref = resultText_; - 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(); - if (bs.isValidUtf8()) { - resultText_ = s; - } - return s; - } - } - /** - * optional string result_text = 2; - * @return The bytes for resultText. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResultTextBytes() { - java.lang.Object ref = resultText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resultText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDITIONAL_CHALLENGE_RESPONSE_REQUIRED_FIELD_NUMBER = 3; - private java.util.List additionalChallengeResponseRequired_; - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - @java.lang.Override - public java.util.List getAdditionalChallengeResponseRequiredList() { - return additionalChallengeResponseRequired_; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - @java.lang.Override - public java.util.List - getAdditionalChallengeResponseRequiredOrBuilderList() { - return additionalChallengeResponseRequired_; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - @java.lang.Override - public int getAdditionalChallengeResponseRequiredCount() { - return additionalChallengeResponseRequired_.size(); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired getAdditionalChallengeResponseRequired(int index) { - return additionalChallengeResponseRequired_.get(index); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder getAdditionalChallengeResponseRequiredOrBuilder( - int index) { - return additionalChallengeResponseRequired_.get(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 (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, resultCode_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resultText_); - } - for (int i = 0; i < additionalChallengeResponseRequired_.size(); i++) { - output.writeMessage(3, additionalChallengeResponseRequired_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, resultCode_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resultText_); - } - for (int i = 0; i < additionalChallengeResponseRequired_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, additionalChallengeResponseRequired_.get(i)); - } - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthResponse)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse other = (com.cdptech.cdpclient.proto.StudioAPI.AuthResponse) obj; - - if (hasResultCode() != other.hasResultCode()) return false; - if (hasResultCode()) { - if (resultCode_ != other.resultCode_) return false; - } - if (hasResultText() != other.hasResultText()) return false; - if (hasResultText()) { - if (!getResultText() - .equals(other.getResultText())) return false; - } - if (!getAdditionalChallengeResponseRequiredList() - .equals(other.getAdditionalChallengeResponseRequiredList())) 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 (hasResultCode()) { - hash = (37 * hash) + RESULT_CODE_FIELD_NUMBER; - hash = (53 * hash) + resultCode_; - } - if (hasResultText()) { - hash = (37 * hash) + RESULT_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getResultText().hashCode(); - } - if (getAdditionalChallengeResponseRequiredCount() > 0) { - hash = (37 * hash) + ADDITIONAL_CHALLENGE_RESPONSE_REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + getAdditionalChallengeResponseRequiredList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse 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 com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse 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 com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse 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(com.cdptech.cdpclient.proto.StudioAPI.AuthResponse 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; - } - /** - *
-     ** Sent by server as a response to a AuthRequest. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.AuthResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.AuthResponse) - com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.class, com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAdditionalChallengeResponseRequiredFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resultCode_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - resultText_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (additionalChallengeResponseRequiredBuilder_ == null) { - additionalChallengeResponseRequired_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - additionalChallengeResponseRequiredBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_AuthResponse_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse build() { - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse result = new com.cdptech.cdpclient.proto.StudioAPI.AuthResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.resultCode_ = resultCode_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.resultText_ = resultText_; - if (additionalChallengeResponseRequiredBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - additionalChallengeResponseRequired_ = java.util.Collections.unmodifiableList(additionalChallengeResponseRequired_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.additionalChallengeResponseRequired_ = additionalChallengeResponseRequired_; - } else { - result.additionalChallengeResponseRequired_ = additionalChallengeResponseRequiredBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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 com.cdptech.cdpclient.proto.StudioAPI.AuthResponse) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.AuthResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.AuthResponse other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance()) return this; - if (other.hasResultCode()) { - setResultCode(other.getResultCode()); - } - if (other.hasResultText()) { - bitField0_ |= 0x00000002; - resultText_ = other.resultText_; - onChanged(); - } - if (additionalChallengeResponseRequiredBuilder_ == null) { - if (!other.additionalChallengeResponseRequired_.isEmpty()) { - if (additionalChallengeResponseRequired_.isEmpty()) { - additionalChallengeResponseRequired_ = other.additionalChallengeResponseRequired_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.addAll(other.additionalChallengeResponseRequired_); - } - onChanged(); - } - } else { - if (!other.additionalChallengeResponseRequired_.isEmpty()) { - if (additionalChallengeResponseRequiredBuilder_.isEmpty()) { - additionalChallengeResponseRequiredBuilder_.dispose(); - additionalChallengeResponseRequiredBuilder_ = null; - additionalChallengeResponseRequired_ = other.additionalChallengeResponseRequired_; - bitField0_ = (bitField0_ & ~0x00000004); - additionalChallengeResponseRequiredBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAdditionalChallengeResponseRequiredFieldBuilder() : null; - } else { - additionalChallengeResponseRequiredBuilder_.addAllMessages(other.additionalChallengeResponseRequired_); - } - } - } - 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 { - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.AuthResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int resultCode_ = 0; - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return Whether the resultCode field is set. - */ - @java.lang.Override public boolean hasResultCode() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return The resultCode. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode getResultCode() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode result = com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode.valueOf(resultCode_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode.eUnknown : result; - } - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @param value The resultCode to set. - * @return This builder for chaining. - */ - public Builder setResultCode(com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.AuthResultCode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - resultCode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .StudioAPI.Proto.AuthResponse.AuthResultCode result_code = 1; - * @return This builder for chaining. - */ - public Builder clearResultCode() { - bitField0_ = (bitField0_ & ~0x00000001); - resultCode_ = 0; - onChanged(); - return this; - } - - private java.lang.Object resultText_ = ""; - /** - * optional string result_text = 2; - * @return Whether the resultText field is set. - */ - public boolean hasResultText() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string result_text = 2; - * @return The resultText. - */ - public java.lang.String getResultText() { - java.lang.Object ref = resultText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - resultText_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string result_text = 2; - * @return The bytes for resultText. - */ - public com.google.protobuf.ByteString - getResultTextBytes() { - java.lang.Object ref = resultText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resultText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string result_text = 2; - * @param value The resultText to set. - * @return This builder for chaining. - */ - public Builder setResultText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - resultText_ = value; - onChanged(); - return this; - } - /** - * optional string result_text = 2; - * @return This builder for chaining. - */ - public Builder clearResultText() { - bitField0_ = (bitField0_ & ~0x00000002); - resultText_ = getDefaultInstance().getResultText(); - onChanged(); - return this; - } - /** - * optional string result_text = 2; - * @param value The bytes for resultText to set. - * @return This builder for chaining. - */ - public Builder setResultTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - resultText_ = value; - onChanged(); - return this; - } - - private java.util.List additionalChallengeResponseRequired_ = - java.util.Collections.emptyList(); - private void ensureAdditionalChallengeResponseRequiredIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - additionalChallengeResponseRequired_ = new java.util.ArrayList(additionalChallengeResponseRequired_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder> additionalChallengeResponseRequiredBuilder_; - - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public java.util.List getAdditionalChallengeResponseRequiredList() { - if (additionalChallengeResponseRequiredBuilder_ == null) { - return java.util.Collections.unmodifiableList(additionalChallengeResponseRequired_); - } else { - return additionalChallengeResponseRequiredBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public int getAdditionalChallengeResponseRequiredCount() { - if (additionalChallengeResponseRequiredBuilder_ == null) { - return additionalChallengeResponseRequired_.size(); - } else { - return additionalChallengeResponseRequiredBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired getAdditionalChallengeResponseRequired(int index) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - return additionalChallengeResponseRequired_.get(index); - } else { - return additionalChallengeResponseRequiredBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder setAdditionalChallengeResponseRequired( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired value) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.set(index, value); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder setAdditionalChallengeResponseRequired( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder builderForValue) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.set(index, builderForValue.build()); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder addAdditionalChallengeResponseRequired(com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired value) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.add(value); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder addAdditionalChallengeResponseRequired( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired value) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.add(index, value); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder addAdditionalChallengeResponseRequired( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder builderForValue) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.add(builderForValue.build()); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder addAdditionalChallengeResponseRequired( - int index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder builderForValue) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.add(index, builderForValue.build()); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder addAllAdditionalChallengeResponseRequired( - java.lang.Iterable values) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - ensureAdditionalChallengeResponseRequiredIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, additionalChallengeResponseRequired_); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder clearAdditionalChallengeResponseRequired() { - if (additionalChallengeResponseRequiredBuilder_ == null) { - additionalChallengeResponseRequired_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public Builder removeAdditionalChallengeResponseRequired(int index) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - ensureAdditionalChallengeResponseRequiredIsMutable(); - additionalChallengeResponseRequired_.remove(index); - onChanged(); - } else { - additionalChallengeResponseRequiredBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder getAdditionalChallengeResponseRequiredBuilder( - int index) { - return getAdditionalChallengeResponseRequiredFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder getAdditionalChallengeResponseRequiredOrBuilder( - int index) { - if (additionalChallengeResponseRequiredBuilder_ == null) { - return additionalChallengeResponseRequired_.get(index); } else { - return additionalChallengeResponseRequiredBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public java.util.List - getAdditionalChallengeResponseRequiredOrBuilderList() { - if (additionalChallengeResponseRequiredBuilder_ != null) { - return additionalChallengeResponseRequiredBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(additionalChallengeResponseRequired_); - } - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder addAdditionalChallengeResponseRequiredBuilder() { - return getAdditionalChallengeResponseRequiredFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder addAdditionalChallengeResponseRequiredBuilder( - int index) { - return getAdditionalChallengeResponseRequiredFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.AdditionalChallengeResponseRequired additional_challenge_response_required = 3; - */ - public java.util.List - getAdditionalChallengeResponseRequiredBuilderList() { - return getAdditionalChallengeResponseRequiredFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder> - getAdditionalChallengeResponseRequiredFieldBuilder() { - if (additionalChallengeResponseRequiredBuilder_ == null) { - additionalChallengeResponseRequiredBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequired.Builder, com.cdptech.cdpclient.proto.StudioAPI.AdditionalChallengeResponseRequiredOrBuilder>( - additionalChallengeResponseRequired_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - additionalChallengeResponseRequired_ = null; - } - return additionalChallengeResponseRequiredBuilder_; - } - @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:StudioAPI.Proto.AuthResponse) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.AuthResponse) - private static final com.cdptech.cdpclient.proto.StudioAPI.AuthResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.AuthResponse(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.AuthResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuthResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthResponse(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 com.cdptech.cdpclient.proto.StudioAPI.AuthResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ContainerOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.Container) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return Whether the messageType field is set. - */ - boolean hasMessageType(); - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return The messageType. - */ - com.cdptech.cdpclient.proto.StudioAPI.Container.Type getMessageType(); - - /** - * optional .StudioAPI.Proto.Error error = 2; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - * optional .StudioAPI.Proto.Error error = 2; - * @return The error. - */ - com.cdptech.cdpclient.proto.StudioAPI.Error getError(); - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder getErrorOrBuilder(); - - /** - * repeated uint32 structure_request = 3; - * @return A list containing the structureRequest. - */ - java.util.List getStructureRequestList(); - /** - * repeated uint32 structure_request = 3; - * @return The count of structureRequest. - */ - int getStructureRequestCount(); - /** - * repeated uint32 structure_request = 3; - * @param index The index of the element to return. - * @return The structureRequest at the given index. - */ - int getStructureRequest(int index); - - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - java.util.List - getStructureResponseList(); - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - com.cdptech.cdpclient.proto.StudioAPI.Node getStructureResponse(int index); - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - int getStructureResponseCount(); - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - java.util.List - getStructureResponseOrBuilderList(); - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder getStructureResponseOrBuilder( - int index); - - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - java.util.List - getGetterRequestList(); - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest getGetterRequest(int index); - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - int getGetterRequestCount(); - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - java.util.List - getGetterRequestOrBuilderList(); - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder getGetterRequestOrBuilder( - int index); - - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - java.util.List - getGetterResponseList(); - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - com.cdptech.cdpclient.proto.StudioAPI.VariantValue getGetterResponse(int index); - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - int getGetterResponseCount(); - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - java.util.List - getGetterResponseOrBuilderList(); - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder getGetterResponseOrBuilder( - int index); - - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - java.util.List - getSetterRequestList(); - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - com.cdptech.cdpclient.proto.StudioAPI.VariantValue getSetterRequest(int index); - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - int getSetterRequestCount(); - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - java.util.List - getSetterRequestOrBuilderList(); - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder getSetterRequestOrBuilder( - int index); - - /** - *
-     * node ID's which need new structure requests
-     * 
- * - * repeated uint32 structure_change_response = 8; - * @return A list containing the structureChangeResponse. - */ - java.util.List getStructureChangeResponseList(); - /** - *
-     * node ID's which need new structure requests
-     * 
- * - * repeated uint32 structure_change_response = 8; - * @return The count of structureChangeResponse. - */ - int getStructureChangeResponseCount(); - /** - *
-     * node ID's which need new structure requests
-     * 
- * - * repeated uint32 structure_change_response = 8; - * @param index The index of the element to return. - * @return The structureChangeResponse at the given index. - */ - int getStructureChangeResponse(int index); - - /** - * optional uint64 current_time_response = 9; - * @return Whether the currentTimeResponse field is set. - */ - boolean hasCurrentTimeResponse(); - /** - * optional uint64 current_time_response = 9; - * @return The currentTimeResponse. - */ - long getCurrentTimeResponse(); - - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - java.util.List - getChildAddRequestList(); - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd getChildAddRequest(int index); - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - int getChildAddRequestCount(); - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - java.util.List - getChildAddRequestOrBuilderList(); - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder getChildAddRequestOrBuilder( - int index); - - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - java.util.List - getChildRemoveRequestList(); - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove getChildRemoveRequest(int index); - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - int getChildRemoveRequestCount(); - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - java.util.List - getChildRemoveRequestOrBuilderList(); - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder getChildRemoveRequestOrBuilder( - int index); - - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - * @return Whether the reAuthRequest field is set. - */ - boolean hasReAuthRequest(); - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - * @return The reAuthRequest. - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest getReAuthRequest(); - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder getReAuthRequestOrBuilder(); - - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - * @return Whether the reAuthResponse field is set. - */ - boolean hasReAuthResponse(); - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - * @return The reAuthResponse. - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse getReAuthResponse(); - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder getReAuthResponseOrBuilder(); - } - /** - *
-   ** Common union-style base type for all Protobuf messages in StudioAPI. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.Container} - */ - public static final class Container extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Container> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.Container) - ContainerOrBuilder { - private static final long serialVersionUID = 0L; - // Use Container.newBuilder() to construct. - private Container(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private Container() { - messageType_ = 0; - structureRequest_ = emptyIntList(); - structureResponse_ = java.util.Collections.emptyList(); - getterRequest_ = java.util.Collections.emptyList(); - getterResponse_ = java.util.Collections.emptyList(); - setterRequest_ = java.util.Collections.emptyList(); - structureChangeResponse_ = emptyIntList(); - childAddRequest_ = java.util.Collections.emptyList(); - childRemoveRequest_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Container(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Container( - 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 8: { - int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.Container.Type value = com.cdptech.cdpclient.proto.StudioAPI.Container.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - messageType_ = rawValue; - } - break; - } - case 18: { - com.cdptech.cdpclient.proto.StudioAPI.Error.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.Error.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - structureRequest_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - structureRequest_.addInt(input.readUInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - structureRequest_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - structureRequest_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - structureResponse_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - structureResponse_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.Node.PARSER, extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - getterRequest_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - getterRequest_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.PARSER, extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - getterResponse_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - getterResponse_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.VariantValue.PARSER, extensionRegistry)); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - setterRequest_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - setterRequest_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.VariantValue.PARSER, extensionRegistry)); - break; - } - case 64: { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - structureChangeResponse_ = newIntList(); - mutable_bitField0_ |= 0x00000080; - } - structureChangeResponse_.addInt(input.readUInt32()); - break; - } - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000080) != 0) && input.getBytesUntilLimit() > 0) { - structureChangeResponse_ = newIntList(); - mutable_bitField0_ |= 0x00000080; - } - while (input.getBytesUntilLimit() > 0) { - structureChangeResponse_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case 72: { - bitField0_ |= 0x00000004; - currentTimeResponse_ = input.readUInt64(); - break; - } - case 82: { - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - childAddRequest_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - childAddRequest_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.PARSER, extensionRegistry)); - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - childRemoveRequest_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - childRemoveRequest_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.PARSER, extensionRegistry)); - break; - } - case 98: { - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = reAuthRequest_.toBuilder(); - } - reAuthRequest_ = input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reAuthRequest_); - reAuthRequest_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 106: { - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = reAuthResponse_.toBuilder(); - } - reAuthResponse_ = input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reAuthResponse_); - reAuthResponse_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - structureRequest_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - structureResponse_ = java.util.Collections.unmodifiableList(structureResponse_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - getterRequest_ = java.util.Collections.unmodifiableList(getterRequest_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - getterResponse_ = java.util.Collections.unmodifiableList(getterResponse_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - setterRequest_ = java.util.Collections.unmodifiableList(setterRequest_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - structureChangeResponse_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - childAddRequest_ = java.util.Collections.unmodifiableList(childAddRequest_); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - childRemoveRequest_ = java.util.Collections.unmodifiableList(childRemoveRequest_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Container_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Container_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Container.class, com.cdptech.cdpclient.proto.StudioAPI.Container.Builder.class); - } - - /** - * Protobuf enum {@code StudioAPI.Proto.Container.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - * eRemoteError = 0; - */ - eRemoteError(0), - /** - * eStructureRequest = 1; - */ - eStructureRequest(1), - /** - * eStructureResponse = 2; - */ - eStructureResponse(2), - /** - * eGetterRequest = 3; - */ - eGetterRequest(3), - /** - * eGetterResponse = 4; - */ - eGetterResponse(4), - /** - * eSetterRequest = 5; - */ - eSetterRequest(5), - /** - * eStructureChangeResponse = 6; - */ - eStructureChangeResponse(6), - /** - * eCurrentTimeRequest = 7; - */ - eCurrentTimeRequest(7), - /** - * eCurrentTimeResponse = 8; - */ - eCurrentTimeResponse(8), - /** - * eChildAddRequest = 9; - */ - eChildAddRequest(9), - /** - * eChildRemoveRequest = 10; - */ - eChildRemoveRequest(10), - /** - * eReauthRequest = 11; - */ - eReauthRequest(11), - /** - * eReauthResponse = 12; - */ - eReauthResponse(12), - /** - * eActivityNotification = 13; - */ - eActivityNotification(13), - ; - - /** - * eRemoteError = 0; - */ - public static final int eRemoteError_VALUE = 0; - /** - * eStructureRequest = 1; - */ - public static final int eStructureRequest_VALUE = 1; - /** - * eStructureResponse = 2; - */ - public static final int eStructureResponse_VALUE = 2; - /** - * eGetterRequest = 3; - */ - public static final int eGetterRequest_VALUE = 3; - /** - * eGetterResponse = 4; - */ - public static final int eGetterResponse_VALUE = 4; - /** - * eSetterRequest = 5; - */ - public static final int eSetterRequest_VALUE = 5; - /** - * eStructureChangeResponse = 6; - */ - public static final int eStructureChangeResponse_VALUE = 6; - /** - * eCurrentTimeRequest = 7; - */ - public static final int eCurrentTimeRequest_VALUE = 7; - /** - * eCurrentTimeResponse = 8; - */ - public static final int eCurrentTimeResponse_VALUE = 8; - /** - * eChildAddRequest = 9; - */ - public static final int eChildAddRequest_VALUE = 9; - /** - * eChildRemoveRequest = 10; - */ - public static final int eChildRemoveRequest_VALUE = 10; - /** - * eReauthRequest = 11; - */ - public static final int eReauthRequest_VALUE = 11; - /** - * eReauthResponse = 12; - */ - public static final int eReauthResponse_VALUE = 12; - /** - * eActivityNotification = 13; - */ - public static final int eActivityNotification_VALUE = 13; - - - public final int getNumber() { - 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 eRemoteError; - case 1: return eStructureRequest; - case 2: return eStructureResponse; - case 3: return eGetterRequest; - case 4: return eGetterResponse; - case 5: return eSetterRequest; - case 6: return eStructureChangeResponse; - case 7: return eCurrentTimeRequest; - case 8: return eCurrentTimeResponse; - case 9: return eChildAddRequest; - case 10: return eChildRemoveRequest; - case 11: return eReauthRequest; - case 12: return eReauthResponse; - case 13: return eActivityNotification; - 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() { - 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 com.cdptech.cdpclient.proto.StudioAPI.Container.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."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:StudioAPI.Proto.Container.Type) - } - - private int bitField0_; - public static final int MESSAGE_TYPE_FIELD_NUMBER = 1; - private int messageType_; - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return Whether the messageType field is set. - */ - @java.lang.Override public boolean hasMessageType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return The messageType. - */ - @java.lang.Override public com.cdptech.cdpclient.proto.StudioAPI.Container.Type getMessageType() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.Container.Type result = com.cdptech.cdpclient.proto.StudioAPI.Container.Type.valueOf(messageType_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.Container.Type.eRemoteError : result; - } - - public static final int ERROR_FIELD_NUMBER = 2; - private com.cdptech.cdpclient.proto.StudioAPI.Error error_; - /** - * optional .StudioAPI.Proto.Error error = 2; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .StudioAPI.Proto.Error error = 2; - * @return The error. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Error getError() { - return error_ == null ? com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance() : error_; - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder getErrorOrBuilder() { - return error_ == null ? com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance() : error_; - } - - public static final int STRUCTURE_REQUEST_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList structureRequest_; - /** - * repeated uint32 structure_request = 3; - * @return A list containing the structureRequest. - */ - @java.lang.Override - public java.util.List - getStructureRequestList() { - return structureRequest_; - } - /** - * repeated uint32 structure_request = 3; - * @return The count of structureRequest. - */ - public int getStructureRequestCount() { - return structureRequest_.size(); - } - /** - * repeated uint32 structure_request = 3; - * @param index The index of the element to return. - * @return The structureRequest at the given index. - */ - public int getStructureRequest(int index) { - return structureRequest_.getInt(index); - } - - public static final int STRUCTURE_RESPONSE_FIELD_NUMBER = 4; - private java.util.List structureResponse_; - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - @java.lang.Override - public java.util.List getStructureResponseList() { - return structureResponse_; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - @java.lang.Override - public java.util.List - getStructureResponseOrBuilderList() { - return structureResponse_; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - @java.lang.Override - public int getStructureResponseCount() { - return structureResponse_.size(); - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Node getStructureResponse(int index) { - return structureResponse_.get(index); - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder getStructureResponseOrBuilder( - int index) { - return structureResponse_.get(index); - } - - public static final int GETTER_REQUEST_FIELD_NUMBER = 5; - private java.util.List getterRequest_; - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - @java.lang.Override - public java.util.List getGetterRequestList() { - return getterRequest_; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - @java.lang.Override - public java.util.List - getGetterRequestOrBuilderList() { - return getterRequest_; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - @java.lang.Override - public int getGetterRequestCount() { - return getterRequest_.size(); - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest getGetterRequest(int index) { - return getterRequest_.get(index); - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder getGetterRequestOrBuilder( - int index) { - return getterRequest_.get(index); - } - - public static final int GETTER_RESPONSE_FIELD_NUMBER = 6; - private java.util.List getterResponse_; - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - @java.lang.Override - public java.util.List getGetterResponseList() { - return getterResponse_; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - @java.lang.Override - public java.util.List - getGetterResponseOrBuilderList() { - return getterResponse_; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - @java.lang.Override - public int getGetterResponseCount() { - return getterResponse_.size(); - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue getGetterResponse(int index) { - return getterResponse_.get(index); - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder getGetterResponseOrBuilder( - int index) { - return getterResponse_.get(index); - } - - public static final int SETTER_REQUEST_FIELD_NUMBER = 7; - private java.util.List setterRequest_; - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - @java.lang.Override - public java.util.List getSetterRequestList() { - return setterRequest_; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - @java.lang.Override - public java.util.List - getSetterRequestOrBuilderList() { - return setterRequest_; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - @java.lang.Override - public int getSetterRequestCount() { - return setterRequest_.size(); - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue getSetterRequest(int index) { - return setterRequest_.get(index); - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder getSetterRequestOrBuilder( - int index) { - return setterRequest_.get(index); - } - - public static final int STRUCTURE_CHANGE_RESPONSE_FIELD_NUMBER = 8; - private com.google.protobuf.Internal.IntList structureChangeResponse_; - /** - *
-     * node ID's which need new structure requests
-     * 
- * - * repeated uint32 structure_change_response = 8; - * @return A list containing the structureChangeResponse. - */ - @java.lang.Override - public java.util.List - getStructureChangeResponseList() { - return structureChangeResponse_; - } - /** - *
-     * node ID's which need new structure requests
-     * 
- * - * repeated uint32 structure_change_response = 8; - * @return The count of structureChangeResponse. - */ - public int getStructureChangeResponseCount() { - return structureChangeResponse_.size(); - } - /** - *
-     * node ID's which need new structure requests
-     * 
- * - * repeated uint32 structure_change_response = 8; - * @param index The index of the element to return. - * @return The structureChangeResponse at the given index. - */ - public int getStructureChangeResponse(int index) { - return structureChangeResponse_.getInt(index); - } - - public static final int CURRENT_TIME_RESPONSE_FIELD_NUMBER = 9; - private long currentTimeResponse_; - /** - * optional uint64 current_time_response = 9; - * @return Whether the currentTimeResponse field is set. - */ - @java.lang.Override - public boolean hasCurrentTimeResponse() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional uint64 current_time_response = 9; - * @return The currentTimeResponse. - */ - @java.lang.Override - public long getCurrentTimeResponse() { - return currentTimeResponse_; - } - - public static final int CHILD_ADD_REQUEST_FIELD_NUMBER = 10; - private java.util.List childAddRequest_; - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - @java.lang.Override - public java.util.List getChildAddRequestList() { - return childAddRequest_; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - @java.lang.Override - public java.util.List - getChildAddRequestOrBuilderList() { - return childAddRequest_; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - @java.lang.Override - public int getChildAddRequestCount() { - return childAddRequest_.size(); - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd getChildAddRequest(int index) { - return childAddRequest_.get(index); - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder getChildAddRequestOrBuilder( - int index) { - return childAddRequest_.get(index); - } - - public static final int CHILD_REMOVE_REQUEST_FIELD_NUMBER = 11; - private java.util.List childRemoveRequest_; - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - @java.lang.Override - public java.util.List getChildRemoveRequestList() { - return childRemoveRequest_; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - @java.lang.Override - public java.util.List - getChildRemoveRequestOrBuilderList() { - return childRemoveRequest_; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - @java.lang.Override - public int getChildRemoveRequestCount() { - return childRemoveRequest_.size(); - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove getChildRemoveRequest(int index) { - return childRemoveRequest_.get(index); - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder getChildRemoveRequestOrBuilder( - int index) { - return childRemoveRequest_.get(index); - } - - public static final int RE_AUTH_REQUEST_FIELD_NUMBER = 12; - private com.cdptech.cdpclient.proto.StudioAPI.AuthRequest reAuthRequest_; - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - * @return Whether the reAuthRequest field is set. - */ - @java.lang.Override - public boolean hasReAuthRequest() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - * @return The reAuthRequest. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest getReAuthRequest() { - return reAuthRequest_ == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance() : reAuthRequest_; - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder getReAuthRequestOrBuilder() { - return reAuthRequest_ == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance() : reAuthRequest_; - } - - public static final int RE_AUTH_RESPONSE_FIELD_NUMBER = 13; - private com.cdptech.cdpclient.proto.StudioAPI.AuthResponse reAuthResponse_; - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - * @return Whether the reAuthResponse field is set. - */ - @java.lang.Override - public boolean hasReAuthResponse() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - * @return The reAuthResponse. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse getReAuthResponse() { - return reAuthResponse_ == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance() : reAuthResponse_; - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder getReAuthResponseOrBuilder() { - return reAuthResponse_ == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance() : reAuthResponse_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasError()) { - if (!getError().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getStructureResponseCount(); i++) { - if (!getStructureResponse(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getGetterRequestCount(); i++) { - if (!getGetterRequest(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getGetterResponseCount(); i++) { - if (!getGetterResponse(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getSetterRequestCount(); i++) { - if (!getSetterRequest(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getChildAddRequestCount(); i++) { - if (!getChildAddRequest(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getChildRemoveRequestCount(); i++) { - if (!getChildRemoveRequest(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, messageType_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getError()); - } - for (int i = 0; i < structureRequest_.size(); i++) { - output.writeUInt32(3, structureRequest_.getInt(i)); - } - for (int i = 0; i < structureResponse_.size(); i++) { - output.writeMessage(4, structureResponse_.get(i)); - } - for (int i = 0; i < getterRequest_.size(); i++) { - output.writeMessage(5, getterRequest_.get(i)); - } - for (int i = 0; i < getterResponse_.size(); i++) { - output.writeMessage(6, getterResponse_.get(i)); - } - for (int i = 0; i < setterRequest_.size(); i++) { - output.writeMessage(7, setterRequest_.get(i)); - } - for (int i = 0; i < structureChangeResponse_.size(); i++) { - output.writeUInt32(8, structureChangeResponse_.getInt(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt64(9, currentTimeResponse_); - } - for (int i = 0; i < childAddRequest_.size(); i++) { - output.writeMessage(10, childAddRequest_.get(i)); - } - for (int i = 0; i < childRemoveRequest_.size(); i++) { - output.writeMessage(11, childRemoveRequest_.get(i)); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(12, getReAuthRequest()); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(13, getReAuthResponse()); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, messageType_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getError()); - } - { - int dataSize = 0; - for (int i = 0; i < structureRequest_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(structureRequest_.getInt(i)); - } - size += dataSize; - size += 1 * getStructureRequestList().size(); - } - for (int i = 0; i < structureResponse_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, structureResponse_.get(i)); - } - for (int i = 0; i < getterRequest_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getterRequest_.get(i)); - } - for (int i = 0; i < getterResponse_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getterResponse_.get(i)); - } - for (int i = 0; i < setterRequest_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, setterRequest_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < structureChangeResponse_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(structureChangeResponse_.getInt(i)); - } - size += dataSize; - size += 1 * getStructureChangeResponseList().size(); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(9, currentTimeResponse_); - } - for (int i = 0; i < childAddRequest_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, childAddRequest_.get(i)); - } - for (int i = 0; i < childRemoveRequest_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, childRemoveRequest_.get(i)); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getReAuthRequest()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getReAuthResponse()); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.Container)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.Container other = (com.cdptech.cdpclient.proto.StudioAPI.Container) obj; - - if (hasMessageType() != other.hasMessageType()) return false; - if (hasMessageType()) { - if (messageType_ != other.messageType_) return false; - } - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (!getStructureRequestList() - .equals(other.getStructureRequestList())) return false; - if (!getStructureResponseList() - .equals(other.getStructureResponseList())) return false; - if (!getGetterRequestList() - .equals(other.getGetterRequestList())) return false; - if (!getGetterResponseList() - .equals(other.getGetterResponseList())) return false; - if (!getSetterRequestList() - .equals(other.getSetterRequestList())) return false; - if (!getStructureChangeResponseList() - .equals(other.getStructureChangeResponseList())) return false; - if (hasCurrentTimeResponse() != other.hasCurrentTimeResponse()) return false; - if (hasCurrentTimeResponse()) { - if (getCurrentTimeResponse() - != other.getCurrentTimeResponse()) return false; - } - if (!getChildAddRequestList() - .equals(other.getChildAddRequestList())) return false; - if (!getChildRemoveRequestList() - .equals(other.getChildRemoveRequestList())) return false; - if (hasReAuthRequest() != other.hasReAuthRequest()) return false; - if (hasReAuthRequest()) { - if (!getReAuthRequest() - .equals(other.getReAuthRequest())) return false; - } - if (hasReAuthResponse() != other.hasReAuthResponse()) return false; - if (hasReAuthResponse()) { - if (!getReAuthResponse() - .equals(other.getReAuthResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMessageType()) { - hash = (37 * hash) + MESSAGE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + messageType_; - } - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - if (getStructureRequestCount() > 0) { - hash = (37 * hash) + STRUCTURE_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getStructureRequestList().hashCode(); - } - if (getStructureResponseCount() > 0) { - hash = (37 * hash) + STRUCTURE_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getStructureResponseList().hashCode(); - } - if (getGetterRequestCount() > 0) { - hash = (37 * hash) + GETTER_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getGetterRequestList().hashCode(); - } - if (getGetterResponseCount() > 0) { - hash = (37 * hash) + GETTER_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getGetterResponseList().hashCode(); - } - if (getSetterRequestCount() > 0) { - hash = (37 * hash) + SETTER_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getSetterRequestList().hashCode(); - } - if (getStructureChangeResponseCount() > 0) { - hash = (37 * hash) + STRUCTURE_CHANGE_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getStructureChangeResponseList().hashCode(); - } - if (hasCurrentTimeResponse()) { - hash = (37 * hash) + CURRENT_TIME_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCurrentTimeResponse()); - } - if (getChildAddRequestCount() > 0) { - hash = (37 * hash) + CHILD_ADD_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getChildAddRequestList().hashCode(); - } - if (getChildRemoveRequestCount() > 0) { - hash = (37 * hash) + CHILD_REMOVE_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getChildRemoveRequestList().hashCode(); - } - if (hasReAuthRequest()) { - hash = (37 * hash) + RE_AUTH_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getReAuthRequest().hashCode(); - } - if (hasReAuthResponse()) { - hash = (37 * hash) + RE_AUTH_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getReAuthResponse().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container 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 com.cdptech.cdpclient.proto.StudioAPI.Container parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container 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 com.cdptech.cdpclient.proto.StudioAPI.Container parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Container 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(com.cdptech.cdpclient.proto.StudioAPI.Container 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; - } - /** - *
-     ** Common union-style base type for all Protobuf messages in StudioAPI. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.Container} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.Container, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.Container) - com.cdptech.cdpclient.proto.StudioAPI.ContainerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Container_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Container_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Container.class, com.cdptech.cdpclient.proto.StudioAPI.Container.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.Container.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getErrorFieldBuilder(); - getStructureResponseFieldBuilder(); - getGetterRequestFieldBuilder(); - getGetterResponseFieldBuilder(); - getSetterRequestFieldBuilder(); - getChildAddRequestFieldBuilder(); - getChildRemoveRequestFieldBuilder(); - getReAuthRequestFieldBuilder(); - getReAuthResponseFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - messageType_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - if (errorBuilder_ == null) { - error_ = null; - } else { - errorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - structureRequest_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - if (structureResponseBuilder_ == null) { - structureResponse_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - structureResponseBuilder_.clear(); - } - if (getterRequestBuilder_ == null) { - getterRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - getterRequestBuilder_.clear(); - } - if (getterResponseBuilder_ == null) { - getterResponse_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - getterResponseBuilder_.clear(); - } - if (setterRequestBuilder_ == null) { - setterRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - setterRequestBuilder_.clear(); - } - structureChangeResponse_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - currentTimeResponse_ = 0L; - bitField0_ = (bitField0_ & ~0x00000100); - if (childAddRequestBuilder_ == null) { - childAddRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - } else { - childAddRequestBuilder_.clear(); - } - if (childRemoveRequestBuilder_ == null) { - childRemoveRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - } else { - childRemoveRequestBuilder_.clear(); - } - if (reAuthRequestBuilder_ == null) { - reAuthRequest_ = null; - } else { - reAuthRequestBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000800); - if (reAuthResponseBuilder_ == null) { - reAuthResponse_ = null; - } else { - reAuthResponseBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Container_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Container getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.Container.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Container build() { - com.cdptech.cdpclient.proto.StudioAPI.Container result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Container buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.Container result = new com.cdptech.cdpclient.proto.StudioAPI.Container(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.messageType_ = messageType_; - if (((from_bitField0_ & 0x00000002) != 0)) { - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - to_bitField0_ |= 0x00000002; - } - if (((bitField0_ & 0x00000004) != 0)) { - structureRequest_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.structureRequest_ = structureRequest_; - if (structureResponseBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - structureResponse_ = java.util.Collections.unmodifiableList(structureResponse_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.structureResponse_ = structureResponse_; - } else { - result.structureResponse_ = structureResponseBuilder_.build(); - } - if (getterRequestBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - getterRequest_ = java.util.Collections.unmodifiableList(getterRequest_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.getterRequest_ = getterRequest_; - } else { - result.getterRequest_ = getterRequestBuilder_.build(); - } - if (getterResponseBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - getterResponse_ = java.util.Collections.unmodifiableList(getterResponse_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.getterResponse_ = getterResponse_; - } else { - result.getterResponse_ = getterResponseBuilder_.build(); - } - if (setterRequestBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - setterRequest_ = java.util.Collections.unmodifiableList(setterRequest_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.setterRequest_ = setterRequest_; - } else { - result.setterRequest_ = setterRequestBuilder_.build(); - } - if (((bitField0_ & 0x00000080) != 0)) { - structureChangeResponse_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.structureChangeResponse_ = structureChangeResponse_; - if (((from_bitField0_ & 0x00000100) != 0)) { - result.currentTimeResponse_ = currentTimeResponse_; - to_bitField0_ |= 0x00000004; - } - if (childAddRequestBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - childAddRequest_ = java.util.Collections.unmodifiableList(childAddRequest_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.childAddRequest_ = childAddRequest_; - } else { - result.childAddRequest_ = childAddRequestBuilder_.build(); - } - if (childRemoveRequestBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - childRemoveRequest_ = java.util.Collections.unmodifiableList(childRemoveRequest_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.childRemoveRequest_ = childRemoveRequest_; - } else { - result.childRemoveRequest_ = childRemoveRequestBuilder_.build(); - } - if (((from_bitField0_ & 0x00000800) != 0)) { - if (reAuthRequestBuilder_ == null) { - result.reAuthRequest_ = reAuthRequest_; - } else { - result.reAuthRequest_ = reAuthRequestBuilder_.build(); - } - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - if (reAuthResponseBuilder_ == null) { - result.reAuthResponse_ = reAuthResponse_; - } else { - result.reAuthResponse_ = reAuthResponseBuilder_.build(); - } - to_bitField0_ |= 0x00000010; - } - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Container, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Container, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Container, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Container, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.Container) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.Container)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.Container other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.Container.getDefaultInstance()) return this; - if (other.hasMessageType()) { - setMessageType(other.getMessageType()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - if (!other.structureRequest_.isEmpty()) { - if (structureRequest_.isEmpty()) { - structureRequest_ = other.structureRequest_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureStructureRequestIsMutable(); - structureRequest_.addAll(other.structureRequest_); - } - onChanged(); - } - if (structureResponseBuilder_ == null) { - if (!other.structureResponse_.isEmpty()) { - if (structureResponse_.isEmpty()) { - structureResponse_ = other.structureResponse_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureStructureResponseIsMutable(); - structureResponse_.addAll(other.structureResponse_); - } - onChanged(); - } - } else { - if (!other.structureResponse_.isEmpty()) { - if (structureResponseBuilder_.isEmpty()) { - structureResponseBuilder_.dispose(); - structureResponseBuilder_ = null; - structureResponse_ = other.structureResponse_; - bitField0_ = (bitField0_ & ~0x00000008); - structureResponseBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getStructureResponseFieldBuilder() : null; - } else { - structureResponseBuilder_.addAllMessages(other.structureResponse_); - } - } - } - if (getterRequestBuilder_ == null) { - if (!other.getterRequest_.isEmpty()) { - if (getterRequest_.isEmpty()) { - getterRequest_ = other.getterRequest_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureGetterRequestIsMutable(); - getterRequest_.addAll(other.getterRequest_); - } - onChanged(); - } - } else { - if (!other.getterRequest_.isEmpty()) { - if (getterRequestBuilder_.isEmpty()) { - getterRequestBuilder_.dispose(); - getterRequestBuilder_ = null; - getterRequest_ = other.getterRequest_; - bitField0_ = (bitField0_ & ~0x00000010); - getterRequestBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGetterRequestFieldBuilder() : null; - } else { - getterRequestBuilder_.addAllMessages(other.getterRequest_); - } - } - } - if (getterResponseBuilder_ == null) { - if (!other.getterResponse_.isEmpty()) { - if (getterResponse_.isEmpty()) { - getterResponse_ = other.getterResponse_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureGetterResponseIsMutable(); - getterResponse_.addAll(other.getterResponse_); - } - onChanged(); - } - } else { - if (!other.getterResponse_.isEmpty()) { - if (getterResponseBuilder_.isEmpty()) { - getterResponseBuilder_.dispose(); - getterResponseBuilder_ = null; - getterResponse_ = other.getterResponse_; - bitField0_ = (bitField0_ & ~0x00000020); - getterResponseBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGetterResponseFieldBuilder() : null; - } else { - getterResponseBuilder_.addAllMessages(other.getterResponse_); - } - } - } - if (setterRequestBuilder_ == null) { - if (!other.setterRequest_.isEmpty()) { - if (setterRequest_.isEmpty()) { - setterRequest_ = other.setterRequest_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureSetterRequestIsMutable(); - setterRequest_.addAll(other.setterRequest_); - } - onChanged(); - } - } else { - if (!other.setterRequest_.isEmpty()) { - if (setterRequestBuilder_.isEmpty()) { - setterRequestBuilder_.dispose(); - setterRequestBuilder_ = null; - setterRequest_ = other.setterRequest_; - bitField0_ = (bitField0_ & ~0x00000040); - setterRequestBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSetterRequestFieldBuilder() : null; - } else { - setterRequestBuilder_.addAllMessages(other.setterRequest_); - } - } - } - if (!other.structureChangeResponse_.isEmpty()) { - if (structureChangeResponse_.isEmpty()) { - structureChangeResponse_ = other.structureChangeResponse_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureStructureChangeResponseIsMutable(); - structureChangeResponse_.addAll(other.structureChangeResponse_); - } - onChanged(); - } - if (other.hasCurrentTimeResponse()) { - setCurrentTimeResponse(other.getCurrentTimeResponse()); - } - if (childAddRequestBuilder_ == null) { - if (!other.childAddRequest_.isEmpty()) { - if (childAddRequest_.isEmpty()) { - childAddRequest_ = other.childAddRequest_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureChildAddRequestIsMutable(); - childAddRequest_.addAll(other.childAddRequest_); - } - onChanged(); - } - } else { - if (!other.childAddRequest_.isEmpty()) { - if (childAddRequestBuilder_.isEmpty()) { - childAddRequestBuilder_.dispose(); - childAddRequestBuilder_ = null; - childAddRequest_ = other.childAddRequest_; - bitField0_ = (bitField0_ & ~0x00000200); - childAddRequestBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getChildAddRequestFieldBuilder() : null; - } else { - childAddRequestBuilder_.addAllMessages(other.childAddRequest_); - } - } - } - if (childRemoveRequestBuilder_ == null) { - if (!other.childRemoveRequest_.isEmpty()) { - if (childRemoveRequest_.isEmpty()) { - childRemoveRequest_ = other.childRemoveRequest_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.addAll(other.childRemoveRequest_); - } - onChanged(); - } - } else { - if (!other.childRemoveRequest_.isEmpty()) { - if (childRemoveRequestBuilder_.isEmpty()) { - childRemoveRequestBuilder_.dispose(); - childRemoveRequestBuilder_ = null; - childRemoveRequest_ = other.childRemoveRequest_; - bitField0_ = (bitField0_ & ~0x00000400); - childRemoveRequestBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getChildRemoveRequestFieldBuilder() : null; - } else { - childRemoveRequestBuilder_.addAllMessages(other.childRemoveRequest_); - } - } - } - if (other.hasReAuthRequest()) { - mergeReAuthRequest(other.getReAuthRequest()); - } - if (other.hasReAuthResponse()) { - mergeReAuthResponse(other.getReAuthResponse()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (hasError()) { - if (!getError().isInitialized()) { - return false; - } - } - for (int i = 0; i < getStructureResponseCount(); i++) { - if (!getStructureResponse(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getGetterRequestCount(); i++) { - if (!getGetterRequest(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getGetterResponseCount(); i++) { - if (!getGetterResponse(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getSetterRequestCount(); i++) { - if (!getSetterRequest(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getChildAddRequestCount(); i++) { - if (!getChildAddRequest(i).isInitialized()) { - return false; - } - } - for (int i = 0; i < getChildRemoveRequestCount(); i++) { - if (!getChildRemoveRequest(i).isInitialized()) { - return false; - } - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.Container parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.Container) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int messageType_ = 0; - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return Whether the messageType field is set. - */ - @java.lang.Override public boolean hasMessageType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return The messageType. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Container.Type getMessageType() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.Container.Type result = com.cdptech.cdpclient.proto.StudioAPI.Container.Type.valueOf(messageType_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.Container.Type.eRemoteError : result; - } - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @param value The messageType to set. - * @return This builder for chaining. - */ - public Builder setMessageType(com.cdptech.cdpclient.proto.StudioAPI.Container.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - messageType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .StudioAPI.Proto.Container.Type message_type = 1; - * @return This builder for chaining. - */ - public Builder clearMessageType() { - bitField0_ = (bitField0_ & ~0x00000001); - messageType_ = 0; - onChanged(); - return this; - } - - private com.cdptech.cdpclient.proto.StudioAPI.Error error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Error, com.cdptech.cdpclient.proto.StudioAPI.Error.Builder, com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder> errorBuilder_; - /** - * optional .StudioAPI.Proto.Error error = 2; - * @return Whether the error field is set. - */ - public boolean hasError() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .StudioAPI.Proto.Error error = 2; - * @return The error. - */ - public com.cdptech.cdpclient.proto.StudioAPI.Error getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - public Builder setError(com.cdptech.cdpclient.proto.StudioAPI.Error value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - public Builder setError( - com.cdptech.cdpclient.proto.StudioAPI.Error.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - public Builder mergeError(com.cdptech.cdpclient.proto.StudioAPI.Error value) { - if (errorBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - error_ != null && - error_ != com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance()) { - error_ = - com.cdptech.cdpclient.proto.StudioAPI.Error.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - errorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Error.Builder getErrorBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance() : error_; - } - } - /** - * optional .StudioAPI.Proto.Error error = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Error, com.cdptech.cdpclient.proto.StudioAPI.Error.Builder, com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Error, com.cdptech.cdpclient.proto.StudioAPI.Error.Builder, com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - - private com.google.protobuf.Internal.IntList structureRequest_ = emptyIntList(); - private void ensureStructureRequestIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - structureRequest_ = mutableCopy(structureRequest_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated uint32 structure_request = 3; - * @return A list containing the structureRequest. - */ - public java.util.List - getStructureRequestList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(structureRequest_) : structureRequest_; - } - /** - * repeated uint32 structure_request = 3; - * @return The count of structureRequest. - */ - public int getStructureRequestCount() { - return structureRequest_.size(); - } - /** - * repeated uint32 structure_request = 3; - * @param index The index of the element to return. - * @return The structureRequest at the given index. - */ - public int getStructureRequest(int index) { - return structureRequest_.getInt(index); - } - /** - * repeated uint32 structure_request = 3; - * @param index The index to set the value at. - * @param value The structureRequest to set. - * @return This builder for chaining. - */ - public Builder setStructureRequest( - int index, int value) { - ensureStructureRequestIsMutable(); - structureRequest_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated uint32 structure_request = 3; - * @param value The structureRequest to add. - * @return This builder for chaining. - */ - public Builder addStructureRequest(int value) { - ensureStructureRequestIsMutable(); - structureRequest_.addInt(value); - onChanged(); - return this; - } - /** - * repeated uint32 structure_request = 3; - * @param values The structureRequest to add. - * @return This builder for chaining. - */ - public Builder addAllStructureRequest( - java.lang.Iterable values) { - ensureStructureRequestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, structureRequest_); - onChanged(); - return this; - } - /** - * repeated uint32 structure_request = 3; - * @return This builder for chaining. - */ - public Builder clearStructureRequest() { - structureRequest_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private java.util.List structureResponse_ = - java.util.Collections.emptyList(); - private void ensureStructureResponseIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - structureResponse_ = new java.util.ArrayList(structureResponse_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Node, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder, com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder> structureResponseBuilder_; - - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public java.util.List getStructureResponseList() { - if (structureResponseBuilder_ == null) { - return java.util.Collections.unmodifiableList(structureResponse_); - } else { - return structureResponseBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public int getStructureResponseCount() { - if (structureResponseBuilder_ == null) { - return structureResponse_.size(); - } else { - return structureResponseBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node getStructureResponse(int index) { - if (structureResponseBuilder_ == null) { - return structureResponse_.get(index); - } else { - return structureResponseBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder setStructureResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node value) { - if (structureResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStructureResponseIsMutable(); - structureResponse_.set(index, value); - onChanged(); - } else { - structureResponseBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder setStructureResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder builderForValue) { - if (structureResponseBuilder_ == null) { - ensureStructureResponseIsMutable(); - structureResponse_.set(index, builderForValue.build()); - onChanged(); - } else { - structureResponseBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder addStructureResponse(com.cdptech.cdpclient.proto.StudioAPI.Node value) { - if (structureResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStructureResponseIsMutable(); - structureResponse_.add(value); - onChanged(); - } else { - structureResponseBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder addStructureResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node value) { - if (structureResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStructureResponseIsMutable(); - structureResponse_.add(index, value); - onChanged(); - } else { - structureResponseBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder addStructureResponse( - com.cdptech.cdpclient.proto.StudioAPI.Node.Builder builderForValue) { - if (structureResponseBuilder_ == null) { - ensureStructureResponseIsMutable(); - structureResponse_.add(builderForValue.build()); - onChanged(); - } else { - structureResponseBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder addStructureResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder builderForValue) { - if (structureResponseBuilder_ == null) { - ensureStructureResponseIsMutable(); - structureResponse_.add(index, builderForValue.build()); - onChanged(); - } else { - structureResponseBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder addAllStructureResponse( - java.lang.Iterable values) { - if (structureResponseBuilder_ == null) { - ensureStructureResponseIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, structureResponse_); - onChanged(); - } else { - structureResponseBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder clearStructureResponse() { - if (structureResponseBuilder_ == null) { - structureResponse_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - structureResponseBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public Builder removeStructureResponse(int index) { - if (structureResponseBuilder_ == null) { - ensureStructureResponseIsMutable(); - structureResponse_.remove(index); - onChanged(); - } else { - structureResponseBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node.Builder getStructureResponseBuilder( - int index) { - return getStructureResponseFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder getStructureResponseOrBuilder( - int index) { - if (structureResponseBuilder_ == null) { - return structureResponse_.get(index); } else { - return structureResponseBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public java.util.List - getStructureResponseOrBuilderList() { - if (structureResponseBuilder_ != null) { - return structureResponseBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(structureResponse_); - } - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node.Builder addStructureResponseBuilder() { - return getStructureResponseFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.Node.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node.Builder addStructureResponseBuilder( - int index) { - return getStructureResponseFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.Node.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.Node structure_response = 4; - */ - public java.util.List - getStructureResponseBuilderList() { - return getStructureResponseFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Node, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder, com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder> - getStructureResponseFieldBuilder() { - if (structureResponseBuilder_ == null) { - structureResponseBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Node, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder, com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder>( - structureResponse_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - structureResponse_ = null; - } - return structureResponseBuilder_; - } - - private java.util.List getterRequest_ = - java.util.Collections.emptyList(); - private void ensureGetterRequestIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - getterRequest_ = new java.util.ArrayList(getterRequest_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder, com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder> getterRequestBuilder_; - - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public java.util.List getGetterRequestList() { - if (getterRequestBuilder_ == null) { - return java.util.Collections.unmodifiableList(getterRequest_); - } else { - return getterRequestBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public int getGetterRequestCount() { - if (getterRequestBuilder_ == null) { - return getterRequest_.size(); - } else { - return getterRequestBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest getGetterRequest(int index) { - if (getterRequestBuilder_ == null) { - return getterRequest_.get(index); - } else { - return getterRequestBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder setGetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest value) { - if (getterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGetterRequestIsMutable(); - getterRequest_.set(index, value); - onChanged(); - } else { - getterRequestBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder setGetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder builderForValue) { - if (getterRequestBuilder_ == null) { - ensureGetterRequestIsMutable(); - getterRequest_.set(index, builderForValue.build()); - onChanged(); - } else { - getterRequestBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder addGetterRequest(com.cdptech.cdpclient.proto.StudioAPI.ValueRequest value) { - if (getterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGetterRequestIsMutable(); - getterRequest_.add(value); - onChanged(); - } else { - getterRequestBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder addGetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest value) { - if (getterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGetterRequestIsMutable(); - getterRequest_.add(index, value); - onChanged(); - } else { - getterRequestBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder addGetterRequest( - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder builderForValue) { - if (getterRequestBuilder_ == null) { - ensureGetterRequestIsMutable(); - getterRequest_.add(builderForValue.build()); - onChanged(); - } else { - getterRequestBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder addGetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder builderForValue) { - if (getterRequestBuilder_ == null) { - ensureGetterRequestIsMutable(); - getterRequest_.add(index, builderForValue.build()); - onChanged(); - } else { - getterRequestBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder addAllGetterRequest( - java.lang.Iterable values) { - if (getterRequestBuilder_ == null) { - ensureGetterRequestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, getterRequest_); - onChanged(); - } else { - getterRequestBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder clearGetterRequest() { - if (getterRequestBuilder_ == null) { - getterRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - getterRequestBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public Builder removeGetterRequest(int index) { - if (getterRequestBuilder_ == null) { - ensureGetterRequestIsMutable(); - getterRequest_.remove(index); - onChanged(); - } else { - getterRequestBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder getGetterRequestBuilder( - int index) { - return getGetterRequestFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder getGetterRequestOrBuilder( - int index) { - if (getterRequestBuilder_ == null) { - return getterRequest_.get(index); } else { - return getterRequestBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public java.util.List - getGetterRequestOrBuilderList() { - if (getterRequestBuilder_ != null) { - return getterRequestBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(getterRequest_); - } - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder addGetterRequestBuilder() { - return getGetterRequestFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder addGetterRequestBuilder( - int index) { - return getGetterRequestFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.ValueRequest getter_request = 5; - */ - public java.util.List - getGetterRequestBuilderList() { - return getGetterRequestFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder, com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder> - getGetterRequestFieldBuilder() { - if (getterRequestBuilder_ == null) { - getterRequestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder, com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder>( - getterRequest_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - getterRequest_ = null; - } - return getterRequestBuilder_; - } - - private java.util.List getterResponse_ = - java.util.Collections.emptyList(); - private void ensureGetterResponseIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - getterResponse_ = new java.util.ArrayList(getterResponse_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder, com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder> getterResponseBuilder_; - - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public java.util.List getGetterResponseList() { - if (getterResponseBuilder_ == null) { - return java.util.Collections.unmodifiableList(getterResponse_); - } else { - return getterResponseBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public int getGetterResponseCount() { - if (getterResponseBuilder_ == null) { - return getterResponse_.size(); - } else { - return getterResponseBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue getGetterResponse(int index) { - if (getterResponseBuilder_ == null) { - return getterResponse_.get(index); - } else { - return getterResponseBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder setGetterResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue value) { - if (getterResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGetterResponseIsMutable(); - getterResponse_.set(index, value); - onChanged(); - } else { - getterResponseBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder setGetterResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder builderForValue) { - if (getterResponseBuilder_ == null) { - ensureGetterResponseIsMutable(); - getterResponse_.set(index, builderForValue.build()); - onChanged(); - } else { - getterResponseBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder addGetterResponse(com.cdptech.cdpclient.proto.StudioAPI.VariantValue value) { - if (getterResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGetterResponseIsMutable(); - getterResponse_.add(value); - onChanged(); - } else { - getterResponseBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder addGetterResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue value) { - if (getterResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGetterResponseIsMutable(); - getterResponse_.add(index, value); - onChanged(); - } else { - getterResponseBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder addGetterResponse( - com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder builderForValue) { - if (getterResponseBuilder_ == null) { - ensureGetterResponseIsMutable(); - getterResponse_.add(builderForValue.build()); - onChanged(); - } else { - getterResponseBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder addGetterResponse( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder builderForValue) { - if (getterResponseBuilder_ == null) { - ensureGetterResponseIsMutable(); - getterResponse_.add(index, builderForValue.build()); - onChanged(); - } else { - getterResponseBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder addAllGetterResponse( - java.lang.Iterable values) { - if (getterResponseBuilder_ == null) { - ensureGetterResponseIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, getterResponse_); - onChanged(); - } else { - getterResponseBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder clearGetterResponse() { - if (getterResponseBuilder_ == null) { - getterResponse_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - getterResponseBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public Builder removeGetterResponse(int index) { - if (getterResponseBuilder_ == null) { - ensureGetterResponseIsMutable(); - getterResponse_.remove(index); - onChanged(); - } else { - getterResponseBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder getGetterResponseBuilder( - int index) { - return getGetterResponseFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder getGetterResponseOrBuilder( - int index) { - if (getterResponseBuilder_ == null) { - return getterResponse_.get(index); } else { - return getterResponseBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public java.util.List - getGetterResponseOrBuilderList() { - if (getterResponseBuilder_ != null) { - return getterResponseBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(getterResponse_); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder addGetterResponseBuilder() { - return getGetterResponseFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.VariantValue.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder addGetterResponseBuilder( - int index) { - return getGetterResponseFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.VariantValue getter_response = 6; - */ - public java.util.List - getGetterResponseBuilderList() { - return getGetterResponseFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder, com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder> - getGetterResponseFieldBuilder() { - if (getterResponseBuilder_ == null) { - getterResponseBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder, com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder>( - getterResponse_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - getterResponse_ = null; - } - return getterResponseBuilder_; - } - - private java.util.List setterRequest_ = - java.util.Collections.emptyList(); - private void ensureSetterRequestIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - setterRequest_ = new java.util.ArrayList(setterRequest_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder, com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder> setterRequestBuilder_; - - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public java.util.List getSetterRequestList() { - if (setterRequestBuilder_ == null) { - return java.util.Collections.unmodifiableList(setterRequest_); - } else { - return setterRequestBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public int getSetterRequestCount() { - if (setterRequestBuilder_ == null) { - return setterRequest_.size(); - } else { - return setterRequestBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue getSetterRequest(int index) { - if (setterRequestBuilder_ == null) { - return setterRequest_.get(index); - } else { - return setterRequestBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder setSetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue value) { - if (setterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSetterRequestIsMutable(); - setterRequest_.set(index, value); - onChanged(); - } else { - setterRequestBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder setSetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder builderForValue) { - if (setterRequestBuilder_ == null) { - ensureSetterRequestIsMutable(); - setterRequest_.set(index, builderForValue.build()); - onChanged(); - } else { - setterRequestBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder addSetterRequest(com.cdptech.cdpclient.proto.StudioAPI.VariantValue value) { - if (setterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSetterRequestIsMutable(); - setterRequest_.add(value); - onChanged(); - } else { - setterRequestBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder addSetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue value) { - if (setterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSetterRequestIsMutable(); - setterRequest_.add(index, value); - onChanged(); - } else { - setterRequestBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder addSetterRequest( - com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder builderForValue) { - if (setterRequestBuilder_ == null) { - ensureSetterRequestIsMutable(); - setterRequest_.add(builderForValue.build()); - onChanged(); - } else { - setterRequestBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder addSetterRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder builderForValue) { - if (setterRequestBuilder_ == null) { - ensureSetterRequestIsMutable(); - setterRequest_.add(index, builderForValue.build()); - onChanged(); - } else { - setterRequestBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder addAllSetterRequest( - java.lang.Iterable values) { - if (setterRequestBuilder_ == null) { - ensureSetterRequestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, setterRequest_); - onChanged(); - } else { - setterRequestBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder clearSetterRequest() { - if (setterRequestBuilder_ == null) { - setterRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - setterRequestBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public Builder removeSetterRequest(int index) { - if (setterRequestBuilder_ == null) { - ensureSetterRequestIsMutable(); - setterRequest_.remove(index); - onChanged(); - } else { - setterRequestBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder getSetterRequestBuilder( - int index) { - return getSetterRequestFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder getSetterRequestOrBuilder( - int index) { - if (setterRequestBuilder_ == null) { - return setterRequest_.get(index); } else { - return setterRequestBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public java.util.List - getSetterRequestOrBuilderList() { - if (setterRequestBuilder_ != null) { - return setterRequestBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(setterRequest_); - } - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder addSetterRequestBuilder() { - return getSetterRequestFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.VariantValue.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder addSetterRequestBuilder( - int index) { - return getSetterRequestFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.VariantValue setter_request = 7; - */ - public java.util.List - getSetterRequestBuilderList() { - return getSetterRequestFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder, com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder> - getSetterRequestFieldBuilder() { - if (setterRequestBuilder_ == null) { - setterRequestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder, com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder>( - setterRequest_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - setterRequest_ = null; - } - return setterRequestBuilder_; - } - - private com.google.protobuf.Internal.IntList structureChangeResponse_ = emptyIntList(); - private void ensureStructureChangeResponseIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - structureChangeResponse_ = mutableCopy(structureChangeResponse_); - bitField0_ |= 0x00000080; - } - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @return A list containing the structureChangeResponse. - */ - public java.util.List - getStructureChangeResponseList() { - return ((bitField0_ & 0x00000080) != 0) ? - java.util.Collections.unmodifiableList(structureChangeResponse_) : structureChangeResponse_; - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @return The count of structureChangeResponse. - */ - public int getStructureChangeResponseCount() { - return structureChangeResponse_.size(); - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @param index The index of the element to return. - * @return The structureChangeResponse at the given index. - */ - public int getStructureChangeResponse(int index) { - return structureChangeResponse_.getInt(index); - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @param index The index to set the value at. - * @param value The structureChangeResponse to set. - * @return This builder for chaining. - */ - public Builder setStructureChangeResponse( - int index, int value) { - ensureStructureChangeResponseIsMutable(); - structureChangeResponse_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @param value The structureChangeResponse to add. - * @return This builder for chaining. - */ - public Builder addStructureChangeResponse(int value) { - ensureStructureChangeResponseIsMutable(); - structureChangeResponse_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @param values The structureChangeResponse to add. - * @return This builder for chaining. - */ - public Builder addAllStructureChangeResponse( - java.lang.Iterable values) { - ensureStructureChangeResponseIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, structureChangeResponse_); - onChanged(); - return this; - } - /** - *
-       * node ID's which need new structure requests
-       * 
- * - * repeated uint32 structure_change_response = 8; - * @return This builder for chaining. - */ - public Builder clearStructureChangeResponse() { - structureChangeResponse_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - private long currentTimeResponse_ ; - /** - * optional uint64 current_time_response = 9; - * @return Whether the currentTimeResponse field is set. - */ - @java.lang.Override - public boolean hasCurrentTimeResponse() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - * optional uint64 current_time_response = 9; - * @return The currentTimeResponse. - */ - @java.lang.Override - public long getCurrentTimeResponse() { - return currentTimeResponse_; - } - /** - * optional uint64 current_time_response = 9; - * @param value The currentTimeResponse to set. - * @return This builder for chaining. - */ - public Builder setCurrentTimeResponse(long value) { - bitField0_ |= 0x00000100; - currentTimeResponse_ = value; - onChanged(); - return this; - } - /** - * optional uint64 current_time_response = 9; - * @return This builder for chaining. - */ - public Builder clearCurrentTimeResponse() { - bitField0_ = (bitField0_ & ~0x00000100); - currentTimeResponse_ = 0L; - onChanged(); - return this; - } - - private java.util.List childAddRequest_ = - java.util.Collections.emptyList(); - private void ensureChildAddRequestIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - childAddRequest_ = new java.util.ArrayList(childAddRequest_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder, com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder> childAddRequestBuilder_; - - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public java.util.List getChildAddRequestList() { - if (childAddRequestBuilder_ == null) { - return java.util.Collections.unmodifiableList(childAddRequest_); - } else { - return childAddRequestBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public int getChildAddRequestCount() { - if (childAddRequestBuilder_ == null) { - return childAddRequest_.size(); - } else { - return childAddRequestBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd getChildAddRequest(int index) { - if (childAddRequestBuilder_ == null) { - return childAddRequest_.get(index); - } else { - return childAddRequestBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder setChildAddRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd value) { - if (childAddRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChildAddRequestIsMutable(); - childAddRequest_.set(index, value); - onChanged(); - } else { - childAddRequestBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder setChildAddRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder builderForValue) { - if (childAddRequestBuilder_ == null) { - ensureChildAddRequestIsMutable(); - childAddRequest_.set(index, builderForValue.build()); - onChanged(); - } else { - childAddRequestBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder addChildAddRequest(com.cdptech.cdpclient.proto.StudioAPI.ChildAdd value) { - if (childAddRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChildAddRequestIsMutable(); - childAddRequest_.add(value); - onChanged(); - } else { - childAddRequestBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder addChildAddRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd value) { - if (childAddRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChildAddRequestIsMutable(); - childAddRequest_.add(index, value); - onChanged(); - } else { - childAddRequestBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder addChildAddRequest( - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder builderForValue) { - if (childAddRequestBuilder_ == null) { - ensureChildAddRequestIsMutable(); - childAddRequest_.add(builderForValue.build()); - onChanged(); - } else { - childAddRequestBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder addChildAddRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder builderForValue) { - if (childAddRequestBuilder_ == null) { - ensureChildAddRequestIsMutable(); - childAddRequest_.add(index, builderForValue.build()); - onChanged(); - } else { - childAddRequestBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder addAllChildAddRequest( - java.lang.Iterable values) { - if (childAddRequestBuilder_ == null) { - ensureChildAddRequestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, childAddRequest_); - onChanged(); - } else { - childAddRequestBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder clearChildAddRequest() { - if (childAddRequestBuilder_ == null) { - childAddRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - childAddRequestBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public Builder removeChildAddRequest(int index) { - if (childAddRequestBuilder_ == null) { - ensureChildAddRequestIsMutable(); - childAddRequest_.remove(index); - onChanged(); - } else { - childAddRequestBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder getChildAddRequestBuilder( - int index) { - return getChildAddRequestFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder getChildAddRequestOrBuilder( - int index) { - if (childAddRequestBuilder_ == null) { - return childAddRequest_.get(index); } else { - return childAddRequestBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public java.util.List - getChildAddRequestOrBuilderList() { - if (childAddRequestBuilder_ != null) { - return childAddRequestBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(childAddRequest_); - } - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder addChildAddRequestBuilder() { - return getChildAddRequestFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder addChildAddRequestBuilder( - int index) { - return getChildAddRequestFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.ChildAdd child_add_request = 10; - */ - public java.util.List - getChildAddRequestBuilderList() { - return getChildAddRequestFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder, com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder> - getChildAddRequestFieldBuilder() { - if (childAddRequestBuilder_ == null) { - childAddRequestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder, com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder>( - childAddRequest_, - ((bitField0_ & 0x00000200) != 0), - getParentForChildren(), - isClean()); - childAddRequest_ = null; - } - return childAddRequestBuilder_; - } - - private java.util.List childRemoveRequest_ = - java.util.Collections.emptyList(); - private void ensureChildRemoveRequestIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - childRemoveRequest_ = new java.util.ArrayList(childRemoveRequest_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder, com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder> childRemoveRequestBuilder_; - - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public java.util.List getChildRemoveRequestList() { - if (childRemoveRequestBuilder_ == null) { - return java.util.Collections.unmodifiableList(childRemoveRequest_); - } else { - return childRemoveRequestBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public int getChildRemoveRequestCount() { - if (childRemoveRequestBuilder_ == null) { - return childRemoveRequest_.size(); - } else { - return childRemoveRequestBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove getChildRemoveRequest(int index) { - if (childRemoveRequestBuilder_ == null) { - return childRemoveRequest_.get(index); - } else { - return childRemoveRequestBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder setChildRemoveRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove value) { - if (childRemoveRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.set(index, value); - onChanged(); - } else { - childRemoveRequestBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder setChildRemoveRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder builderForValue) { - if (childRemoveRequestBuilder_ == null) { - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.set(index, builderForValue.build()); - onChanged(); - } else { - childRemoveRequestBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder addChildRemoveRequest(com.cdptech.cdpclient.proto.StudioAPI.ChildRemove value) { - if (childRemoveRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.add(value); - onChanged(); - } else { - childRemoveRequestBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder addChildRemoveRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove value) { - if (childRemoveRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.add(index, value); - onChanged(); - } else { - childRemoveRequestBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder addChildRemoveRequest( - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder builderForValue) { - if (childRemoveRequestBuilder_ == null) { - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.add(builderForValue.build()); - onChanged(); - } else { - childRemoveRequestBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder addChildRemoveRequest( - int index, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder builderForValue) { - if (childRemoveRequestBuilder_ == null) { - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.add(index, builderForValue.build()); - onChanged(); - } else { - childRemoveRequestBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder addAllChildRemoveRequest( - java.lang.Iterable values) { - if (childRemoveRequestBuilder_ == null) { - ensureChildRemoveRequestIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, childRemoveRequest_); - onChanged(); - } else { - childRemoveRequestBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder clearChildRemoveRequest() { - if (childRemoveRequestBuilder_ == null) { - childRemoveRequest_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - childRemoveRequestBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public Builder removeChildRemoveRequest(int index) { - if (childRemoveRequestBuilder_ == null) { - ensureChildRemoveRequestIsMutable(); - childRemoveRequest_.remove(index); - onChanged(); - } else { - childRemoveRequestBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder getChildRemoveRequestBuilder( - int index) { - return getChildRemoveRequestFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder getChildRemoveRequestOrBuilder( - int index) { - if (childRemoveRequestBuilder_ == null) { - return childRemoveRequest_.get(index); } else { - return childRemoveRequestBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public java.util.List - getChildRemoveRequestOrBuilderList() { - if (childRemoveRequestBuilder_ != null) { - return childRemoveRequestBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(childRemoveRequest_); - } - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder addChildRemoveRequestBuilder() { - return getChildRemoveRequestFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder addChildRemoveRequestBuilder( - int index) { - return getChildRemoveRequestFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.ChildRemove child_remove_request = 11; - */ - public java.util.List - getChildRemoveRequestBuilderList() { - return getChildRemoveRequestFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder, com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder> - getChildRemoveRequestFieldBuilder() { - if (childRemoveRequestBuilder_ == null) { - childRemoveRequestBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder, com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder>( - childRemoveRequest_, - ((bitField0_ & 0x00000400) != 0), - getParentForChildren(), - isClean()); - childRemoveRequest_ = null; - } - return childRemoveRequestBuilder_; - } - - private com.cdptech.cdpclient.proto.StudioAPI.AuthRequest reAuthRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder> reAuthRequestBuilder_; - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - * @return Whether the reAuthRequest field is set. - */ - public boolean hasReAuthRequest() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - * @return The reAuthRequest. - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest getReAuthRequest() { - if (reAuthRequestBuilder_ == null) { - return reAuthRequest_ == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance() : reAuthRequest_; - } else { - return reAuthRequestBuilder_.getMessage(); - } - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - public Builder setReAuthRequest(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest value) { - if (reAuthRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reAuthRequest_ = value; - onChanged(); - } else { - reAuthRequestBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - return this; - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - public Builder setReAuthRequest( - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder builderForValue) { - if (reAuthRequestBuilder_ == null) { - reAuthRequest_ = builderForValue.build(); - onChanged(); - } else { - reAuthRequestBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - return this; - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - public Builder mergeReAuthRequest(com.cdptech.cdpclient.proto.StudioAPI.AuthRequest value) { - if (reAuthRequestBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - reAuthRequest_ != null && - reAuthRequest_ != com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance()) { - reAuthRequest_ = - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.newBuilder(reAuthRequest_).mergeFrom(value).buildPartial(); - } else { - reAuthRequest_ = value; - } - onChanged(); - } else { - reAuthRequestBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000800; - return this; - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - public Builder clearReAuthRequest() { - if (reAuthRequestBuilder_ == null) { - reAuthRequest_ = null; - onChanged(); - } else { - reAuthRequestBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000800); - return this; - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder getReAuthRequestBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return getReAuthRequestFieldBuilder().getBuilder(); - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder getReAuthRequestOrBuilder() { - if (reAuthRequestBuilder_ != null) { - return reAuthRequestBuilder_.getMessageOrBuilder(); - } else { - return reAuthRequest_ == null ? - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.getDefaultInstance() : reAuthRequest_; - } - } - /** - * optional .StudioAPI.Proto.AuthRequest re_auth_request = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder> - getReAuthRequestFieldBuilder() { - if (reAuthRequestBuilder_ == null) { - reAuthRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthRequest, com.cdptech.cdpclient.proto.StudioAPI.AuthRequest.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthRequestOrBuilder>( - getReAuthRequest(), - getParentForChildren(), - isClean()); - reAuthRequest_ = null; - } - return reAuthRequestBuilder_; - } - - private com.cdptech.cdpclient.proto.StudioAPI.AuthResponse reAuthResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse, com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder> reAuthResponseBuilder_; - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - * @return Whether the reAuthResponse field is set. - */ - public boolean hasReAuthResponse() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - * @return The reAuthResponse. - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse getReAuthResponse() { - if (reAuthResponseBuilder_ == null) { - return reAuthResponse_ == null ? com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance() : reAuthResponse_; - } else { - return reAuthResponseBuilder_.getMessage(); - } - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - public Builder setReAuthResponse(com.cdptech.cdpclient.proto.StudioAPI.AuthResponse value) { - if (reAuthResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reAuthResponse_ = value; - onChanged(); - } else { - reAuthResponseBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - public Builder setReAuthResponse( - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder builderForValue) { - if (reAuthResponseBuilder_ == null) { - reAuthResponse_ = builderForValue.build(); - onChanged(); - } else { - reAuthResponseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - public Builder mergeReAuthResponse(com.cdptech.cdpclient.proto.StudioAPI.AuthResponse value) { - if (reAuthResponseBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) && - reAuthResponse_ != null && - reAuthResponse_ != com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance()) { - reAuthResponse_ = - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.newBuilder(reAuthResponse_).mergeFrom(value).buildPartial(); - } else { - reAuthResponse_ = value; - } - onChanged(); - } else { - reAuthResponseBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - return this; - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - public Builder clearReAuthResponse() { - if (reAuthResponseBuilder_ == null) { - reAuthResponse_ = null; - onChanged(); - } else { - reAuthResponseBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder getReAuthResponseBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getReAuthResponseFieldBuilder().getBuilder(); - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - public com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder getReAuthResponseOrBuilder() { - if (reAuthResponseBuilder_ != null) { - return reAuthResponseBuilder_.getMessageOrBuilder(); - } else { - return reAuthResponse_ == null ? - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.getDefaultInstance() : reAuthResponse_; - } - } - /** - * optional .StudioAPI.Proto.AuthResponse re_auth_response = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse, com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder> - getReAuthResponseFieldBuilder() { - if (reAuthResponseBuilder_ == null) { - reAuthResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.AuthResponse, com.cdptech.cdpclient.proto.StudioAPI.AuthResponse.Builder, com.cdptech.cdpclient.proto.StudioAPI.AuthResponseOrBuilder>( - getReAuthResponse(), - getParentForChildren(), - isClean()); - reAuthResponse_ = null; - } - return reAuthResponseBuilder_; - } - @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:StudioAPI.Proto.Container) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.Container) - private static final com.cdptech.cdpclient.proto.StudioAPI.Container DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.Container(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Container getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Container parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Container(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 com.cdptech.cdpclient.proto.StudioAPI.Container getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ErrorOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.Error) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - * required uint32 code = 1; - * @return Whether the code field is set. - */ - boolean hasCode(); - /** - * required uint32 code = 1; - * @return The code. - */ - int getCode(); - - /** - * optional string text = 2; - * @return Whether the text field is set. - */ - boolean hasText(); - /** - * optional string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - * optional string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); - - /** - * optional uint32 node_id = 3; - * @return Whether the nodeId field is set. - */ - boolean hasNodeId(); - /** - * optional uint32 node_id = 3; - * @return The nodeId. - */ - int getNodeId(); - - /** - * optional string parameter = 4; - * @return Whether the parameter field is set. - */ - boolean hasParameter(); - /** - * optional string parameter = 4; - * @return The parameter. - */ - java.lang.String getParameter(); - /** - * optional string parameter = 4; - * @return The bytes for parameter. - */ - com.google.protobuf.ByteString - getParameterBytes(); - - /** - *
-     * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional bytes challenge = 5; - * @return Whether the challenge field is set. - */ - boolean hasChallenge(); - /** - *
-     * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional bytes challenge = 5; - * @return The challenge. - */ - com.google.protobuf.ByteString getChallenge(); - - /** - *
-     * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional uint32 idle_lockout_period = 6; - * @return Whether the idleLockoutPeriod field is set. - */ - boolean hasIdleLockoutPeriod(); - /** - *
-     * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional uint32 idle_lockout_period = 6; - * @return The idleLockoutPeriod. - */ - int getIdleLockoutPeriod(); - } - /** - *
-   ** Error message type. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.Error} - */ - public static final class Error extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Error> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.Error) - ErrorOrBuilder { - private static final long serialVersionUID = 0L; - // Use Error.newBuilder() to construct. - private Error(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private Error() { - text_ = ""; - parameter_ = ""; - challenge_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Error(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Error( - 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 8: { - bitField0_ |= 0x00000001; - code_ = input.readUInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - text_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - nodeId_ = input.readUInt32(); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000008; - parameter_ = bs; - break; - } - case 42: { - bitField0_ |= 0x00000010; - challenge_ = input.readBytes(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - idleLockoutPeriod_ = input.readUInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Error_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Error_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Error.class, com.cdptech.cdpclient.proto.StudioAPI.Error.Builder.class); - } - - private int bitField0_; - public static final int CODE_FIELD_NUMBER = 1; - private int code_; - /** - * required uint32 code = 1; - * @return Whether the code field is set. - */ - @java.lang.Override - public boolean hasCode() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required uint32 code = 1; - * @return The code. - */ - @java.lang.Override - public int getCode() { - return code_; - } - - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - * optional string text = 2; - * @return Whether the text field is set. - */ - @java.lang.Override - public boolean hasText() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - if (bs.isValidUtf8()) { - text_ = s; - } - return s; - } - } - /** - * optional string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NODE_ID_FIELD_NUMBER = 3; - private int nodeId_; - /** - * optional uint32 node_id = 3; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional uint32 node_id = 3; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - - public static final int PARAMETER_FIELD_NUMBER = 4; - private volatile java.lang.Object parameter_; - /** - * optional string parameter = 4; - * @return Whether the parameter field is set. - */ - @java.lang.Override - public boolean hasParameter() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional string parameter = 4; - * @return The parameter. - */ - @java.lang.Override - public java.lang.String getParameter() { - java.lang.Object ref = parameter_; - 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(); - if (bs.isValidUtf8()) { - parameter_ = s; - } - return s; - } - } - /** - * optional string parameter = 4; - * @return The bytes for parameter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParameterBytes() { - java.lang.Object ref = parameter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parameter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CHALLENGE_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString challenge_; - /** - *
-     * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional bytes challenge = 5; - * @return Whether the challenge field is set. - */ - @java.lang.Override - public boolean hasChallenge() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional bytes challenge = 5; - * @return The challenge. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChallenge() { - return challenge_; - } - - public static final int IDLE_LOCKOUT_PERIOD_FIELD_NUMBER = 6; - private int idleLockoutPeriod_; - /** - *
-     * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional uint32 idle_lockout_period = 6; - * @return Whether the idleLockoutPeriod field is set. - */ - @java.lang.Override - public boolean hasIdleLockoutPeriod() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-     * 
- * - * optional uint32 idle_lockout_period = 6; - * @return The idleLockoutPeriod. - */ - @java.lang.Override - public int getIdleLockoutPeriod() { - return idleLockoutPeriod_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasCode()) { - memoizedIsInitialized = 0; - return false; - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, code_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt32(3, nodeId_); - } - if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parameter_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeBytes(5, challenge_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeUInt32(6, idleLockoutPeriod_); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, code_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, nodeId_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parameter_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, challenge_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, idleLockoutPeriod_); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.Error)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.Error other = (com.cdptech.cdpclient.proto.StudioAPI.Error) obj; - - if (hasCode() != other.hasCode()) return false; - if (hasCode()) { - if (getCode() - != other.getCode()) return false; - } - if (hasText() != other.hasText()) return false; - if (hasText()) { - if (!getText() - .equals(other.getText())) return false; - } - if (hasNodeId() != other.hasNodeId()) return false; - if (hasNodeId()) { - if (getNodeId() - != other.getNodeId()) return false; - } - if (hasParameter() != other.hasParameter()) return false; - if (hasParameter()) { - if (!getParameter() - .equals(other.getParameter())) return false; - } - if (hasChallenge() != other.hasChallenge()) return false; - if (hasChallenge()) { - if (!getChallenge() - .equals(other.getChallenge())) return false; - } - if (hasIdleLockoutPeriod() != other.hasIdleLockoutPeriod()) return false; - if (hasIdleLockoutPeriod()) { - if (getIdleLockoutPeriod() - != other.getIdleLockoutPeriod()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCode()) { - hash = (37 * hash) + CODE_FIELD_NUMBER; - hash = (53 * hash) + getCode(); - } - if (hasText()) { - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - } - if (hasNodeId()) { - hash = (37 * hash) + NODE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNodeId(); - } - if (hasParameter()) { - hash = (37 * hash) + PARAMETER_FIELD_NUMBER; - hash = (53 * hash) + getParameter().hashCode(); - } - if (hasChallenge()) { - hash = (37 * hash) + CHALLENGE_FIELD_NUMBER; - hash = (53 * hash) + getChallenge().hashCode(); - } - if (hasIdleLockoutPeriod()) { - hash = (37 * hash) + IDLE_LOCKOUT_PERIOD_FIELD_NUMBER; - hash = (53 * hash) + getIdleLockoutPeriod(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error 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 com.cdptech.cdpclient.proto.StudioAPI.Error parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error 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 com.cdptech.cdpclient.proto.StudioAPI.Error parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Error 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(com.cdptech.cdpclient.proto.StudioAPI.Error 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; - } - /** - *
-     ** Error message type. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.Error} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.Error, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.Error) - com.cdptech.cdpclient.proto.StudioAPI.ErrorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Error_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Error_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Error.class, com.cdptech.cdpclient.proto.StudioAPI.Error.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.Error.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(); - code_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - text_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - nodeId_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - parameter_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - challenge_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - idleLockoutPeriod_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Error_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Error getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Error build() { - com.cdptech.cdpclient.proto.StudioAPI.Error result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Error buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.Error result = new com.cdptech.cdpclient.proto.StudioAPI.Error(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.code_ = code_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.text_ = text_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.nodeId_ = nodeId_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - to_bitField0_ |= 0x00000008; - } - result.parameter_ = parameter_; - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.challenge_ = challenge_; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.idleLockoutPeriod_ = idleLockoutPeriod_; - to_bitField0_ |= 0x00000020; - } - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Error, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Error, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Error, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Error, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.Error) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.Error)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.Error other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.Error.getDefaultInstance()) return this; - if (other.hasCode()) { - setCode(other.getCode()); - } - if (other.hasText()) { - bitField0_ |= 0x00000002; - text_ = other.text_; - onChanged(); - } - if (other.hasNodeId()) { - setNodeId(other.getNodeId()); - } - if (other.hasParameter()) { - bitField0_ |= 0x00000008; - parameter_ = other.parameter_; - onChanged(); - } - if (other.hasChallenge()) { - setChallenge(other.getChallenge()); - } - if (other.hasIdleLockoutPeriod()) { - setIdleLockoutPeriod(other.getIdleLockoutPeriod()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasCode()) { - return false; - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.Error parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.Error) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int code_ ; - /** - * required uint32 code = 1; - * @return Whether the code field is set. - */ - @java.lang.Override - public boolean hasCode() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required uint32 code = 1; - * @return The code. - */ - @java.lang.Override - public int getCode() { - return code_; - } - /** - * required uint32 code = 1; - * @param value The code to set. - * @return This builder for chaining. - */ - public Builder setCode(int value) { - bitField0_ |= 0x00000001; - code_ = value; - onChanged(); - return this; - } - /** - * required uint32 code = 1; - * @return This builder for chaining. - */ - public Builder clearCode() { - bitField0_ = (bitField0_ & ~0x00000001); - code_ = 0; - onChanged(); - return this; - } - - private java.lang.Object text_ = ""; - /** - * optional string text = 2; - * @return Whether the text field is set. - */ - public boolean hasText() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - text_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - text_ = value; - onChanged(); - return this; - } - /** - * optional string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - bitField0_ = (bitField0_ & ~0x00000002); - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - * optional string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - text_ = value; - onChanged(); - return this; - } - - private int nodeId_ ; - /** - * optional uint32 node_id = 3; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional uint32 node_id = 3; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - /** - * optional uint32 node_id = 3; - * @param value The nodeId to set. - * @return This builder for chaining. - */ - public Builder setNodeId(int value) { - bitField0_ |= 0x00000004; - nodeId_ = value; - onChanged(); - return this; - } - /** - * optional uint32 node_id = 3; - * @return This builder for chaining. - */ - public Builder clearNodeId() { - bitField0_ = (bitField0_ & ~0x00000004); - nodeId_ = 0; - onChanged(); - return this; - } - - private java.lang.Object parameter_ = ""; - /** - * optional string parameter = 4; - * @return Whether the parameter field is set. - */ - public boolean hasParameter() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional string parameter = 4; - * @return The parameter. - */ - public java.lang.String getParameter() { - java.lang.Object ref = parameter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - parameter_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string parameter = 4; - * @return The bytes for parameter. - */ - public com.google.protobuf.ByteString - getParameterBytes() { - java.lang.Object ref = parameter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parameter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string parameter = 4; - * @param value The parameter to set. - * @return This builder for chaining. - */ - public Builder setParameter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - parameter_ = value; - onChanged(); - return this; - } - /** - * optional string parameter = 4; - * @return This builder for chaining. - */ - public Builder clearParameter() { - bitField0_ = (bitField0_ & ~0x00000008); - parameter_ = getDefaultInstance().getParameter(); - onChanged(); - return this; - } - /** - * optional string parameter = 4; - * @param value The bytes for parameter to set. - * @return This builder for chaining. - */ - public Builder setParameterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - parameter_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString challenge_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional bytes challenge = 5; - * @return Whether the challenge field is set. - */ - @java.lang.Override - public boolean hasChallenge() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional bytes challenge = 5; - * @return The challenge. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChallenge() { - return challenge_; - } - /** - *
-       * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional bytes challenge = 5; - * @param value The challenge to set. - * @return This builder for chaining. - */ - public Builder setChallenge(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - challenge_ = value; - onChanged(); - return this; - } - /** - *
-       * new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional bytes challenge = 5; - * @return This builder for chaining. - */ - public Builder clearChallenge() { - bitField0_ = (bitField0_ & ~0x00000010); - challenge_ = getDefaultInstance().getChallenge(); - onChanged(); - return this; - } - - private int idleLockoutPeriod_ ; - /** - *
-       * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional uint32 idle_lockout_period = 6; - * @return Whether the idleLockoutPeriod field is set. - */ - @java.lang.Override - public boolean hasIdleLockoutPeriod() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional uint32 idle_lockout_period = 6; - * @return The idleLockoutPeriod. - */ - @java.lang.Override - public int getIdleLockoutPeriod() { - return idleLockoutPeriod_; - } - /** - *
-       * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional uint32 idle_lockout_period = 6; - * @param value The idleLockoutPeriod to set. - * @return This builder for chaining. - */ - public Builder setIdleLockoutPeriod(int value) { - bitField0_ |= 0x00000020; - idleLockoutPeriod_ = value; - onChanged(); - return this; - } - /** - *
-       * updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED
-       * 
- * - * optional uint32 idle_lockout_period = 6; - * @return This builder for chaining. - */ - public Builder clearIdleLockoutPeriod() { - bitField0_ = (bitField0_ & ~0x00000020); - idleLockoutPeriod_ = 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:StudioAPI.Proto.Error) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.Error) - private static final com.cdptech.cdpclient.proto.StudioAPI.Error DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.Error(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Error getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Error parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Error(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 com.cdptech.cdpclient.proto.StudioAPI.Error getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface InfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.Info) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - *
-     * Application wide unique ID for each instance in CDP structure
-     * 
- * - * required uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - boolean hasNodeId(); - /** - *
-     * Application wide unique ID for each instance in CDP structure
-     * 
- * - * required uint32 node_id = 1; - * @return The nodeId. - */ - int getNodeId(); - - /** - *
-     * Local short name
-     * 
- * - * required string name = 2; - * @return Whether the name field is set. - */ - boolean hasName(); - /** - *
-     * Local short name
-     * 
- * - * required string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Local short name
-     * 
- * - * required string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Direct base type, type of the class
-     * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return Whether the nodeType field is set. - */ - boolean hasNodeType(); - /** - *
-     * Direct base type, type of the class
-     * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return The nodeType. - */ - com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType getNodeType(); - - /** - *
-     * Value primitive type the node holds if node may hold a value
-     * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return Whether the valueType field is set. - */ - boolean hasValueType(); - /** - *
-     * Value primitive type the node holds if node may hold a value
-     * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return The valueType. - */ - com.cdptech.cdpclient.proto.StudioAPI.CDPValueType getValueType(); - - /** - *
-     * Real class name
-     * 
- * - * optional string type_name = 5; - * @return Whether the typeName field is set. - */ - boolean hasTypeName(); - /** - *
-     * Real class name
-     * 
- * - * optional string type_name = 5; - * @return The typeName. - */ - java.lang.String getTypeName(); - /** - *
-     * Real class name
-     * 
- * - * optional string type_name = 5; - * @return The bytes for typeName. - */ - com.google.protobuf.ByteString - getTypeNameBytes(); - - /** - *
-     * If this node signifies another CDP application,
-     * 
- * - * optional string server_addr = 6; - * @return Whether the serverAddr field is set. - */ - boolean hasServerAddr(); - /** - *
-     * If this node signifies another CDP application,
-     * 
- * - * optional string server_addr = 6; - * @return The serverAddr. - */ - java.lang.String getServerAddr(); - /** - *
-     * If this node signifies another CDP application,
-     * 
- * - * optional string server_addr = 6; - * @return The bytes for serverAddr. - */ - com.google.protobuf.ByteString - getServerAddrBytes(); - - /** - *
-     * this field will be the IP of said application's StudioAPIServer
-     * 
- * - * optional uint32 server_port = 7; - * @return Whether the serverPort field is set. - */ - boolean hasServerPort(); - /** - *
-     * this field will be the IP of said application's StudioAPIServer
-     * 
- * - * optional uint32 server_port = 7; - * @return The serverPort. - */ - int getServerPort(); - - /** - *
-     * if multiple applications are sent back from the server,
-     * 
- * - * optional bool is_local = 8; - * @return Whether the isLocal field is set. - */ - boolean hasIsLocal(); - /** - *
-     * if multiple applications are sent back from the server,
-     * 
- * - * optional bool is_local = 8; - * @return The isLocal. - */ - boolean getIsLocal(); - - /** - *
-     * this flag is set to true for the app that the data was requested from
-     * 
- * - * optional uint32 flags = 9; - * @return Whether the flags field is set. - */ - boolean hasFlags(); - /** - *
-     * this flag is set to true for the app that the data was requested from
-     * 
- * - * optional uint32 flags = 9; - * @return The flags. - */ - int getFlags(); - } - /** - *
-   ** A single CDPNode property container. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.Info} - */ - public static final class Info extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Info> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.Info) - InfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use Info.newBuilder() to construct. - private Info(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private Info() { - name_ = ""; - nodeType_ = -1; - valueType_ = 0; - typeName_ = ""; - serverAddr_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Info(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Info( - 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 8: { - bitField0_ |= 0x00000001; - nodeId_ = input.readUInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - name_ = bs; - break; - } - case 24: { - int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType value = com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - nodeType_ = rawValue; - } - break; - } - case 32: { - int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.CDPValueType value = com.cdptech.cdpclient.proto.StudioAPI.CDPValueType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - valueType_ = rawValue; - } - break; - } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - typeName_ = bs; - break; - } - case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000020; - serverAddr_ = bs; - break; - } - case 56: { - bitField0_ |= 0x00000040; - serverPort_ = input.readUInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000080; - isLocal_ = input.readBool(); - break; - } - case 72: { - bitField0_ |= 0x00000100; - flags_ = input.readUInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Info_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Info.class, com.cdptech.cdpclient.proto.StudioAPI.Info.Builder.class); - } - - /** - * Protobuf enum {@code StudioAPI.Proto.Info.Flags} - */ - public enum Flags - implements com.google.protobuf.ProtocolMessageEnum { - /** - * eNone = 0; - */ - eNone(0), - /** - * eNodeIsLeaf = 1; - */ - eNodeIsLeaf(1), - /** - * eValueIsPersistent = 2; - */ - eValueIsPersistent(2), - /** - * eValueIsReadOnly = 4; - */ - eValueIsReadOnly(4), - /** - * eNodeIsRemovable = 8; - */ - eNodeIsRemovable(8), - /** - * eNodeCanAddChildren = 16; - */ - eNodeCanAddChildren(16), - /** - * eNodeIsRenamable = 32; - */ - eNodeIsRenamable(32), - /** - * eNodeIsInternal = 64; - */ - eNodeIsInternal(64), - /** - * eNodeIsImportant = 128; - */ - eNodeIsImportant(128), - ; - - /** - * eNone = 0; - */ - public static final int eNone_VALUE = 0; - /** - * eNodeIsLeaf = 1; - */ - public static final int eNodeIsLeaf_VALUE = 1; - /** - * eValueIsPersistent = 2; - */ - public static final int eValueIsPersistent_VALUE = 2; - /** - * eValueIsReadOnly = 4; - */ - public static final int eValueIsReadOnly_VALUE = 4; - /** - * eNodeIsRemovable = 8; - */ - public static final int eNodeIsRemovable_VALUE = 8; - /** - * eNodeCanAddChildren = 16; - */ - public static final int eNodeCanAddChildren_VALUE = 16; - /** - * eNodeIsRenamable = 32; - */ - public static final int eNodeIsRenamable_VALUE = 32; - /** - * eNodeIsInternal = 64; - */ - public static final int eNodeIsInternal_VALUE = 64; - /** - * eNodeIsImportant = 128; - */ - public static final int eNodeIsImportant_VALUE = 128; - - - public final int getNumber() { - 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 Flags 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 Flags forNumber(int value) { - switch (value) { - case 0: return eNone; - case 1: return eNodeIsLeaf; - case 2: return eValueIsPersistent; - case 4: return eValueIsReadOnly; - case 8: return eNodeIsRemovable; - case 16: return eNodeCanAddChildren; - case 32: return eNodeIsRenamable; - case 64: return eNodeIsInternal; - case 128: return eNodeIsImportant; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Flags> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Flags findValueByNumber(int number) { - return Flags.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - 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 com.cdptech.cdpclient.proto.StudioAPI.Info.getDescriptor().getEnumTypes().get(0); - } - - private static final Flags[] VALUES = values(); - - public static Flags valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Flags(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:StudioAPI.Proto.Info.Flags) - } - - private int bitField0_; - public static final int NODE_ID_FIELD_NUMBER = 1; - private int nodeId_; - /** - *
-     * Application wide unique ID for each instance in CDP structure
-     * 
- * - * required uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Application wide unique ID for each instance in CDP structure
-     * 
- * - * required uint32 node_id = 1; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - *
-     * Local short name
-     * 
- * - * required string name = 2; - * @return Whether the name field is set. - */ - @java.lang.Override - public boolean hasName() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Local short name
-     * 
- * - * required string name = 2; - * @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(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - /** - *
-     * Local short name
-     * 
- * - * required string name = 2; - * @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 NODE_TYPE_FIELD_NUMBER = 3; - private int nodeType_; - /** - *
-     * Direct base type, type of the class
-     * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return Whether the nodeType field is set. - */ - @java.lang.Override public boolean hasNodeType() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Direct base type, type of the class
-     * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return The nodeType. - */ - @java.lang.Override public com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType getNodeType() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType result = com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType.valueOf(nodeType_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType.CDP_UNDEFINED : result; - } - - public static final int VALUE_TYPE_FIELD_NUMBER = 4; - private int valueType_; - /** - *
-     * Value primitive type the node holds if node may hold a value
-     * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return Whether the valueType field is set. - */ - @java.lang.Override public boolean hasValueType() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Value primitive type the node holds if node may hold a value
-     * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return The valueType. - */ - @java.lang.Override public com.cdptech.cdpclient.proto.StudioAPI.CDPValueType getValueType() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.CDPValueType result = com.cdptech.cdpclient.proto.StudioAPI.CDPValueType.valueOf(valueType_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.CDPValueType.eUNDEFINED : result; - } - - public static final int TYPE_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object typeName_; - /** - *
-     * Real class name
-     * 
- * - * optional string type_name = 5; - * @return Whether the typeName field is set. - */ - @java.lang.Override - public boolean hasTypeName() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Real class name
-     * 
- * - * optional string type_name = 5; - * @return The typeName. - */ - @java.lang.Override - public java.lang.String getTypeName() { - java.lang.Object ref = typeName_; - 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(); - if (bs.isValidUtf8()) { - typeName_ = s; - } - return s; - } - } - /** - *
-     * Real class name
-     * 
- * - * optional string type_name = 5; - * @return The bytes for typeName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeNameBytes() { - java.lang.Object ref = typeName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVER_ADDR_FIELD_NUMBER = 6; - private volatile java.lang.Object serverAddr_; - /** - *
-     * If this node signifies another CDP application,
-     * 
- * - * optional string server_addr = 6; - * @return Whether the serverAddr field is set. - */ - @java.lang.Override - public boolean hasServerAddr() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * If this node signifies another CDP application,
-     * 
- * - * optional string server_addr = 6; - * @return The serverAddr. - */ - @java.lang.Override - public java.lang.String getServerAddr() { - java.lang.Object ref = serverAddr_; - 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(); - if (bs.isValidUtf8()) { - serverAddr_ = s; - } - return s; - } - } - /** - *
-     * If this node signifies another CDP application,
-     * 
- * - * optional string server_addr = 6; - * @return The bytes for serverAddr. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getServerAddrBytes() { - java.lang.Object ref = serverAddr_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - serverAddr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVER_PORT_FIELD_NUMBER = 7; - private int serverPort_; - /** - *
-     * this field will be the IP of said application's StudioAPIServer
-     * 
- * - * optional uint32 server_port = 7; - * @return Whether the serverPort field is set. - */ - @java.lang.Override - public boolean hasServerPort() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * this field will be the IP of said application's StudioAPIServer
-     * 
- * - * optional uint32 server_port = 7; - * @return The serverPort. - */ - @java.lang.Override - public int getServerPort() { - return serverPort_; - } - - public static final int IS_LOCAL_FIELD_NUMBER = 8; - private boolean isLocal_; - /** - *
-     * if multiple applications are sent back from the server,
-     * 
- * - * optional bool is_local = 8; - * @return Whether the isLocal field is set. - */ - @java.lang.Override - public boolean hasIsLocal() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * if multiple applications are sent back from the server,
-     * 
- * - * optional bool is_local = 8; - * @return The isLocal. - */ - @java.lang.Override - public boolean getIsLocal() { - return isLocal_; - } - - public static final int FLAGS_FIELD_NUMBER = 9; - private int flags_; - /** - *
-     * this flag is set to true for the app that the data was requested from
-     * 
- * - * optional uint32 flags = 9; - * @return Whether the flags field is set. - */ - @java.lang.Override - public boolean hasFlags() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * this flag is set to true for the app that the data was requested from
-     * 
- * - * optional uint32 flags = 9; - * @return The flags. - */ - @java.lang.Override - public int getFlags() { - return flags_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasNodeId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasNodeType()) { - memoizedIsInitialized = 0; - return false; - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, nodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeEnum(3, nodeType_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeEnum(4, valueType_); - } - if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, typeName_); - } - if (((bitField0_ & 0x00000020) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, serverAddr_); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeUInt32(7, serverPort_); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeBool(8, isLocal_); - } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeUInt32(9, flags_); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, nodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, nodeType_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, valueType_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, typeName_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, serverAddr_); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, serverPort_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, isLocal_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, flags_); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.Info)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.Info other = (com.cdptech.cdpclient.proto.StudioAPI.Info) obj; - - if (hasNodeId() != other.hasNodeId()) return false; - if (hasNodeId()) { - if (getNodeId() - != other.getNodeId()) return false; - } - if (hasName() != other.hasName()) return false; - if (hasName()) { - if (!getName() - .equals(other.getName())) return false; - } - if (hasNodeType() != other.hasNodeType()) return false; - if (hasNodeType()) { - if (nodeType_ != other.nodeType_) return false; - } - if (hasValueType() != other.hasValueType()) return false; - if (hasValueType()) { - if (valueType_ != other.valueType_) return false; - } - if (hasTypeName() != other.hasTypeName()) return false; - if (hasTypeName()) { - if (!getTypeName() - .equals(other.getTypeName())) return false; - } - if (hasServerAddr() != other.hasServerAddr()) return false; - if (hasServerAddr()) { - if (!getServerAddr() - .equals(other.getServerAddr())) return false; - } - if (hasServerPort() != other.hasServerPort()) return false; - if (hasServerPort()) { - if (getServerPort() - != other.getServerPort()) return false; - } - if (hasIsLocal() != other.hasIsLocal()) return false; - if (hasIsLocal()) { - if (getIsLocal() - != other.getIsLocal()) return false; - } - if (hasFlags() != other.hasFlags()) return false; - if (hasFlags()) { - if (getFlags() - != other.getFlags()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNodeId()) { - hash = (37 * hash) + NODE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNodeId(); - } - if (hasName()) { - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - } - if (hasNodeType()) { - hash = (37 * hash) + NODE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + nodeType_; - } - if (hasValueType()) { - hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + valueType_; - } - if (hasTypeName()) { - hash = (37 * hash) + TYPE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getTypeName().hashCode(); - } - if (hasServerAddr()) { - hash = (37 * hash) + SERVER_ADDR_FIELD_NUMBER; - hash = (53 * hash) + getServerAddr().hashCode(); - } - if (hasServerPort()) { - hash = (37 * hash) + SERVER_PORT_FIELD_NUMBER; - hash = (53 * hash) + getServerPort(); - } - if (hasIsLocal()) { - hash = (37 * hash) + IS_LOCAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsLocal()); - } - if (hasFlags()) { - hash = (37 * hash) + FLAGS_FIELD_NUMBER; - hash = (53 * hash) + getFlags(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info 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 com.cdptech.cdpclient.proto.StudioAPI.Info parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info 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 com.cdptech.cdpclient.proto.StudioAPI.Info parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Info 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(com.cdptech.cdpclient.proto.StudioAPI.Info 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; - } - /** - *
-     ** A single CDPNode property container. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.Info} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.Info, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.Info) - com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Info_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Info.class, com.cdptech.cdpclient.proto.StudioAPI.Info.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.Info.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(); - nodeId_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - nodeType_ = -1; - bitField0_ = (bitField0_ & ~0x00000004); - valueType_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - typeName_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - serverAddr_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - serverPort_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - isLocal_ = false; - bitField0_ = (bitField0_ & ~0x00000080); - flags_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Info_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Info getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Info build() { - com.cdptech.cdpclient.proto.StudioAPI.Info result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Info buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.Info result = new com.cdptech.cdpclient.proto.StudioAPI.Info(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.nodeId_ = nodeId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000004) != 0)) { - to_bitField0_ |= 0x00000004; - } - result.nodeType_ = nodeType_; - if (((from_bitField0_ & 0x00000008) != 0)) { - to_bitField0_ |= 0x00000008; - } - result.valueType_ = valueType_; - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.typeName_ = typeName_; - if (((from_bitField0_ & 0x00000020) != 0)) { - to_bitField0_ |= 0x00000020; - } - result.serverAddr_ = serverAddr_; - if (((from_bitField0_ & 0x00000040) != 0)) { - result.serverPort_ = serverPort_; - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.isLocal_ = isLocal_; - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.flags_ = flags_; - to_bitField0_ |= 0x00000100; - } - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Info, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Info, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Info, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Info, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.Info) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.Info)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.Info other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance()) return this; - if (other.hasNodeId()) { - setNodeId(other.getNodeId()); - } - if (other.hasName()) { - bitField0_ |= 0x00000002; - name_ = other.name_; - onChanged(); - } - if (other.hasNodeType()) { - setNodeType(other.getNodeType()); - } - if (other.hasValueType()) { - setValueType(other.getValueType()); - } - if (other.hasTypeName()) { - bitField0_ |= 0x00000010; - typeName_ = other.typeName_; - onChanged(); - } - if (other.hasServerAddr()) { - bitField0_ |= 0x00000020; - serverAddr_ = other.serverAddr_; - onChanged(); - } - if (other.hasServerPort()) { - setServerPort(other.getServerPort()); - } - if (other.hasIsLocal()) { - setIsLocal(other.getIsLocal()); - } - if (other.hasFlags()) { - setFlags(other.getFlags()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasNodeId()) { - return false; - } - if (!hasName()) { - return false; - } - if (!hasNodeType()) { - return false; - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.Info parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.Info) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int nodeId_ ; - /** - *
-       * Application wide unique ID for each instance in CDP structure
-       * 
- * - * required uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * Application wide unique ID for each instance in CDP structure
-       * 
- * - * required uint32 node_id = 1; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - /** - *
-       * Application wide unique ID for each instance in CDP structure
-       * 
- * - * required uint32 node_id = 1; - * @param value The nodeId to set. - * @return This builder for chaining. - */ - public Builder setNodeId(int value) { - bitField0_ |= 0x00000001; - nodeId_ = value; - onChanged(); - return this; - } - /** - *
-       * Application wide unique ID for each instance in CDP structure
-       * 
- * - * required uint32 node_id = 1; - * @return This builder for chaining. - */ - public Builder clearNodeId() { - bitField0_ = (bitField0_ & ~0x00000001); - nodeId_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Local short name
-       * 
- * - * required string name = 2; - * @return Whether the name field is set. - */ - public boolean hasName() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * Local short name
-       * 
- * - * required string name = 2; - * @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(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Local short name
-       * 
- * - * required string name = 2; - * @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; - } - } - /** - *
-       * Local short name
-       * 
- * - * required string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Local short name
-       * 
- * - * required string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000002); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Local short name
-       * 
- * - * required string name = 2; - * @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(); - } - bitField0_ |= 0x00000002; - name_ = value; - onChanged(); - return this; - } - - private int nodeType_ = -1; - /** - *
-       * Direct base type, type of the class
-       * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return Whether the nodeType field is set. - */ - @java.lang.Override public boolean hasNodeType() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * Direct base type, type of the class
-       * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return The nodeType. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType getNodeType() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType result = com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType.valueOf(nodeType_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType.CDP_UNDEFINED : result; - } - /** - *
-       * Direct base type, type of the class
-       * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @param value The nodeType to set. - * @return This builder for chaining. - */ - public Builder setNodeType(com.cdptech.cdpclient.proto.StudioAPI.CDPNodeType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - nodeType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Direct base type, type of the class
-       * 
- * - * required .StudioAPI.Proto.CDPNodeType node_type = 3; - * @return This builder for chaining. - */ - public Builder clearNodeType() { - bitField0_ = (bitField0_ & ~0x00000004); - nodeType_ = -1; - onChanged(); - return this; - } - - private int valueType_ = 0; - /** - *
-       * Value primitive type the node holds if node may hold a value
-       * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return Whether the valueType field is set. - */ - @java.lang.Override public boolean hasValueType() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * Value primitive type the node holds if node may hold a value
-       * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return The valueType. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.CDPValueType getValueType() { - @SuppressWarnings("deprecation") - com.cdptech.cdpclient.proto.StudioAPI.CDPValueType result = com.cdptech.cdpclient.proto.StudioAPI.CDPValueType.valueOf(valueType_); - return result == null ? com.cdptech.cdpclient.proto.StudioAPI.CDPValueType.eUNDEFINED : result; - } - /** - *
-       * Value primitive type the node holds if node may hold a value
-       * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @param value The valueType to set. - * @return This builder for chaining. - */ - public Builder setValueType(com.cdptech.cdpclient.proto.StudioAPI.CDPValueType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - valueType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Value primitive type the node holds if node may hold a value
-       * 
- * - * optional .StudioAPI.Proto.CDPValueType value_type = 4; - * @return This builder for chaining. - */ - public Builder clearValueType() { - bitField0_ = (bitField0_ & ~0x00000008); - valueType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object typeName_ = ""; - /** - *
-       * Real class name
-       * 
- * - * optional string type_name = 5; - * @return Whether the typeName field is set. - */ - public boolean hasTypeName() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-       * Real class name
-       * 
- * - * optional string type_name = 5; - * @return The typeName. - */ - public java.lang.String getTypeName() { - java.lang.Object ref = typeName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - typeName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Real class name
-       * 
- * - * optional string type_name = 5; - * @return The bytes for typeName. - */ - public com.google.protobuf.ByteString - getTypeNameBytes() { - java.lang.Object ref = typeName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Real class name
-       * 
- * - * optional string type_name = 5; - * @param value The typeName to set. - * @return This builder for chaining. - */ - public Builder setTypeName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - typeName_ = value; - onChanged(); - return this; - } - /** - *
-       * Real class name
-       * 
- * - * optional string type_name = 5; - * @return This builder for chaining. - */ - public Builder clearTypeName() { - bitField0_ = (bitField0_ & ~0x00000010); - typeName_ = getDefaultInstance().getTypeName(); - onChanged(); - return this; - } - /** - *
-       * Real class name
-       * 
- * - * optional string type_name = 5; - * @param value The bytes for typeName to set. - * @return This builder for chaining. - */ - public Builder setTypeNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - typeName_ = value; - onChanged(); - return this; - } - - private java.lang.Object serverAddr_ = ""; - /** - *
-       * If this node signifies another CDP application,
-       * 
- * - * optional string server_addr = 6; - * @return Whether the serverAddr field is set. - */ - public boolean hasServerAddr() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-       * If this node signifies another CDP application,
-       * 
- * - * optional string server_addr = 6; - * @return The serverAddr. - */ - public java.lang.String getServerAddr() { - java.lang.Object ref = serverAddr_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - serverAddr_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * If this node signifies another CDP application,
-       * 
- * - * optional string server_addr = 6; - * @return The bytes for serverAddr. - */ - public com.google.protobuf.ByteString - getServerAddrBytes() { - java.lang.Object ref = serverAddr_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - serverAddr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * If this node signifies another CDP application,
-       * 
- * - * optional string server_addr = 6; - * @param value The serverAddr to set. - * @return This builder for chaining. - */ - public Builder setServerAddr( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - serverAddr_ = value; - onChanged(); - return this; - } - /** - *
-       * If this node signifies another CDP application,
-       * 
- * - * optional string server_addr = 6; - * @return This builder for chaining. - */ - public Builder clearServerAddr() { - bitField0_ = (bitField0_ & ~0x00000020); - serverAddr_ = getDefaultInstance().getServerAddr(); - onChanged(); - return this; - } - /** - *
-       * If this node signifies another CDP application,
-       * 
- * - * optional string server_addr = 6; - * @param value The bytes for serverAddr to set. - * @return This builder for chaining. - */ - public Builder setServerAddrBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - serverAddr_ = value; - onChanged(); - return this; - } - - private int serverPort_ ; - /** - *
-       * this field will be the IP of said application's StudioAPIServer
-       * 
- * - * optional uint32 server_port = 7; - * @return Whether the serverPort field is set. - */ - @java.lang.Override - public boolean hasServerPort() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-       * this field will be the IP of said application's StudioAPIServer
-       * 
- * - * optional uint32 server_port = 7; - * @return The serverPort. - */ - @java.lang.Override - public int getServerPort() { - return serverPort_; - } - /** - *
-       * this field will be the IP of said application's StudioAPIServer
-       * 
- * - * optional uint32 server_port = 7; - * @param value The serverPort to set. - * @return This builder for chaining. - */ - public Builder setServerPort(int value) { - bitField0_ |= 0x00000040; - serverPort_ = value; - onChanged(); - return this; - } - /** - *
-       * this field will be the IP of said application's StudioAPIServer
-       * 
- * - * optional uint32 server_port = 7; - * @return This builder for chaining. - */ - public Builder clearServerPort() { - bitField0_ = (bitField0_ & ~0x00000040); - serverPort_ = 0; - onChanged(); - return this; - } - - private boolean isLocal_ ; - /** - *
-       * if multiple applications are sent back from the server,
-       * 
- * - * optional bool is_local = 8; - * @return Whether the isLocal field is set. - */ - @java.lang.Override - public boolean hasIsLocal() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-       * if multiple applications are sent back from the server,
-       * 
- * - * optional bool is_local = 8; - * @return The isLocal. - */ - @java.lang.Override - public boolean getIsLocal() { - return isLocal_; - } - /** - *
-       * if multiple applications are sent back from the server,
-       * 
- * - * optional bool is_local = 8; - * @param value The isLocal to set. - * @return This builder for chaining. - */ - public Builder setIsLocal(boolean value) { - bitField0_ |= 0x00000080; - isLocal_ = value; - onChanged(); - return this; - } - /** - *
-       * if multiple applications are sent back from the server,
-       * 
- * - * optional bool is_local = 8; - * @return This builder for chaining. - */ - public Builder clearIsLocal() { - bitField0_ = (bitField0_ & ~0x00000080); - isLocal_ = false; - onChanged(); - return this; - } - - private int flags_ ; - /** - *
-       * this flag is set to true for the app that the data was requested from
-       * 
- * - * optional uint32 flags = 9; - * @return Whether the flags field is set. - */ - @java.lang.Override - public boolean hasFlags() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-       * this flag is set to true for the app that the data was requested from
-       * 
- * - * optional uint32 flags = 9; - * @return The flags. - */ - @java.lang.Override - public int getFlags() { - return flags_; - } - /** - *
-       * this flag is set to true for the app that the data was requested from
-       * 
- * - * optional uint32 flags = 9; - * @param value The flags to set. - * @return This builder for chaining. - */ - public Builder setFlags(int value) { - bitField0_ |= 0x00000100; - flags_ = value; - onChanged(); - return this; - } - /** - *
-       * this flag is set to true for the app that the data was requested from
-       * 
- * - * optional uint32 flags = 9; - * @return This builder for chaining. - */ - public Builder clearFlags() { - bitField0_ = (bitField0_ & ~0x00000100); - flags_ = 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:StudioAPI.Proto.Info) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.Info) - private static final com.cdptech.cdpclient.proto.StudioAPI.Info DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.Info(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Info getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Info parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Info(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 com.cdptech.cdpclient.proto.StudioAPI.Info getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface NodeOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.Node) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - * required .StudioAPI.Proto.Info info = 1; - * @return Whether the info field is set. - */ - boolean hasInfo(); - /** - * required .StudioAPI.Proto.Info info = 1; - * @return The info. - */ - com.cdptech.cdpclient.proto.StudioAPI.Info getInfo(); - /** - * required .StudioAPI.Proto.Info info = 1; - */ - com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder getInfoOrBuilder(); - - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - java.util.List - getNodeList(); - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - com.cdptech.cdpclient.proto.StudioAPI.Node getNode(int index); - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - int getNodeCount(); - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - java.util.List - getNodeOrBuilderList(); - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder getNodeOrBuilder( - int index); - } - /** - *
-   ** CDP structure response data structure, a tree of Info properties. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.Node} - */ - public static final class Node extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Node> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.Node) - NodeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Node.newBuilder() to construct. - private Node(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private Node() { - node_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Node(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Node( - 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: { - com.cdptech.cdpclient.proto.StudioAPI.Info.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = info_.toBuilder(); - } - info_ = input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.Info.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(info_); - info_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - node_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - node_.add( - input.readMessage(com.cdptech.cdpclient.proto.StudioAPI.Node.PARSER, extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - node_ = java.util.Collections.unmodifiableList(node_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Node_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Node.class, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder.class); - } - - private int bitField0_; - public static final int INFO_FIELD_NUMBER = 1; - private com.cdptech.cdpclient.proto.StudioAPI.Info info_; - /** - * required .StudioAPI.Proto.Info info = 1; - * @return Whether the info field is set. - */ - @java.lang.Override - public boolean hasInfo() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .StudioAPI.Proto.Info info = 1; - * @return The info. - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Info getInfo() { - return info_ == null ? com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance() : info_; - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder getInfoOrBuilder() { - return info_ == null ? com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance() : info_; - } - - public static final int NODE_FIELD_NUMBER = 2; - private java.util.List node_; - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - @java.lang.Override - public java.util.List getNodeList() { - return node_; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - @java.lang.Override - public java.util.List - getNodeOrBuilderList() { - return node_; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - @java.lang.Override - public int getNodeCount() { - return node_.size(); - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Node getNode(int index) { - return node_.get(index); - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder getNodeOrBuilder( - int index) { - return node_.get(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; - - if (!hasInfo()) { - memoizedIsInitialized = 0; - return false; - } - if (!getInfo().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getNodeCount(); i++) { - if (!getNode(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getInfo()); - } - for (int i = 0; i < node_.size(); i++) { - output.writeMessage(2, node_.get(i)); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfo()); - } - for (int i = 0; i < node_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, node_.get(i)); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.Node)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.Node other = (com.cdptech.cdpclient.proto.StudioAPI.Node) obj; - - if (hasInfo() != other.hasInfo()) return false; - if (hasInfo()) { - if (!getInfo() - .equals(other.getInfo())) return false; - } - if (!getNodeList() - .equals(other.getNodeList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfo()) { - hash = (37 * hash) + INFO_FIELD_NUMBER; - hash = (53 * hash) + getInfo().hashCode(); - } - if (getNodeCount() > 0) { - hash = (37 * hash) + NODE_FIELD_NUMBER; - hash = (53 * hash) + getNodeList().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node 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 com.cdptech.cdpclient.proto.StudioAPI.Node parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node 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 com.cdptech.cdpclient.proto.StudioAPI.Node parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.Node 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(com.cdptech.cdpclient.proto.StudioAPI.Node 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; - } - /** - *
-     ** CDP structure response data structure, a tree of Info properties. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.Node} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.Node, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.Node) - com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Node_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.Node.class, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.Node.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoFieldBuilder(); - getNodeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoBuilder_ == null) { - info_ = null; - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (nodeBuilder_ == null) { - node_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - nodeBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_Node_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Node getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.Node.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Node build() { - com.cdptech.cdpclient.proto.StudioAPI.Node result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.Node buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.Node result = new com.cdptech.cdpclient.proto.StudioAPI.Node(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - if (infoBuilder_ == null) { - result.info_ = info_; - } else { - result.info_ = infoBuilder_.build(); - } - to_bitField0_ |= 0x00000001; - } - if (nodeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - node_ = java.util.Collections.unmodifiableList(node_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.node_ = node_; - } else { - result.node_ = nodeBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Node, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Node, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Node, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.Node, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.Node) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.Node)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.Node other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.Node.getDefaultInstance()) return this; - if (other.hasInfo()) { - mergeInfo(other.getInfo()); - } - if (nodeBuilder_ == null) { - if (!other.node_.isEmpty()) { - if (node_.isEmpty()) { - node_ = other.node_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNodeIsMutable(); - node_.addAll(other.node_); - } - onChanged(); - } - } else { - if (!other.node_.isEmpty()) { - if (nodeBuilder_.isEmpty()) { - nodeBuilder_.dispose(); - nodeBuilder_ = null; - node_ = other.node_; - bitField0_ = (bitField0_ & ~0x00000002); - nodeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNodeFieldBuilder() : null; - } else { - nodeBuilder_.addAllMessages(other.node_); - } - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasInfo()) { - return false; - } - if (!getInfo().isInitialized()) { - return false; - } - for (int i = 0; i < getNodeCount(); i++) { - if (!getNode(i).isInitialized()) { - return false; - } - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.Node parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.Node) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.cdptech.cdpclient.proto.StudioAPI.Info info_; - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Info, com.cdptech.cdpclient.proto.StudioAPI.Info.Builder, com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder> infoBuilder_; - /** - * required .StudioAPI.Proto.Info info = 1; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .StudioAPI.Proto.Info info = 1; - * @return The info. - */ - public com.cdptech.cdpclient.proto.StudioAPI.Info getInfo() { - if (infoBuilder_ == null) { - return info_ == null ? com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance() : info_; - } else { - return infoBuilder_.getMessage(); - } - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - public Builder setInfo(com.cdptech.cdpclient.proto.StudioAPI.Info value) { - if (infoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - info_ = value; - onChanged(); - } else { - infoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - public Builder setInfo( - com.cdptech.cdpclient.proto.StudioAPI.Info.Builder builderForValue) { - if (infoBuilder_ == null) { - info_ = builderForValue.build(); - onChanged(); - } else { - infoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - public Builder mergeInfo(com.cdptech.cdpclient.proto.StudioAPI.Info value) { - if (infoBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - info_ != null && - info_ != com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance()) { - info_ = - com.cdptech.cdpclient.proto.StudioAPI.Info.newBuilder(info_).mergeFrom(value).buildPartial(); - } else { - info_ = value; - } - onChanged(); - } else { - infoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - public Builder clearInfo() { - if (infoBuilder_ == null) { - info_ = null; - onChanged(); - } else { - infoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Info.Builder getInfoBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getInfoFieldBuilder().getBuilder(); - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - public com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder getInfoOrBuilder() { - if (infoBuilder_ != null) { - return infoBuilder_.getMessageOrBuilder(); - } else { - return info_ == null ? - com.cdptech.cdpclient.proto.StudioAPI.Info.getDefaultInstance() : info_; - } - } - /** - * required .StudioAPI.Proto.Info info = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Info, com.cdptech.cdpclient.proto.StudioAPI.Info.Builder, com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder> - getInfoFieldBuilder() { - if (infoBuilder_ == null) { - infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Info, com.cdptech.cdpclient.proto.StudioAPI.Info.Builder, com.cdptech.cdpclient.proto.StudioAPI.InfoOrBuilder>( - getInfo(), - getParentForChildren(), - isClean()); - info_ = null; - } - return infoBuilder_; - } - - private java.util.List node_ = - java.util.Collections.emptyList(); - private void ensureNodeIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - node_ = new java.util.ArrayList(node_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Node, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder, com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder> nodeBuilder_; - - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public java.util.List getNodeList() { - if (nodeBuilder_ == null) { - return java.util.Collections.unmodifiableList(node_); - } else { - return nodeBuilder_.getMessageList(); - } - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public int getNodeCount() { - if (nodeBuilder_ == null) { - return node_.size(); - } else { - return nodeBuilder_.getCount(); - } - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node getNode(int index) { - if (nodeBuilder_ == null) { - return node_.get(index); - } else { - return nodeBuilder_.getMessage(index); - } - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder setNode( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.set(index, value); - onChanged(); - } else { - nodeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder setNode( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.set(index, builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder addNode(com.cdptech.cdpclient.proto.StudioAPI.Node value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.add(value); - onChanged(); - } else { - nodeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder addNode( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.add(index, value); - onChanged(); - } else { - nodeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder addNode( - com.cdptech.cdpclient.proto.StudioAPI.Node.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.add(builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder addNode( - int index, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.add(index, builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder addAllNode( - java.lang.Iterable values) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, node_); - onChanged(); - } else { - nodeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder clearNode() { - if (nodeBuilder_ == null) { - node_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - nodeBuilder_.clear(); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public Builder removeNode(int index) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.remove(index); - onChanged(); - } else { - nodeBuilder_.remove(index); - } - return this; - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node.Builder getNodeBuilder( - int index) { - return getNodeFieldBuilder().getBuilder(index); - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder getNodeOrBuilder( - int index) { - if (nodeBuilder_ == null) { - return node_.get(index); } else { - return nodeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public java.util.List - getNodeOrBuilderList() { - if (nodeBuilder_ != null) { - return nodeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(node_); - } - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node.Builder addNodeBuilder() { - return getNodeFieldBuilder().addBuilder( - com.cdptech.cdpclient.proto.StudioAPI.Node.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public com.cdptech.cdpclient.proto.StudioAPI.Node.Builder addNodeBuilder( - int index) { - return getNodeFieldBuilder().addBuilder( - index, com.cdptech.cdpclient.proto.StudioAPI.Node.getDefaultInstance()); - } - /** - * repeated .StudioAPI.Proto.Node node = 2; - */ - public java.util.List - getNodeBuilderList() { - return getNodeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Node, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder, com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder> - getNodeFieldBuilder() { - if (nodeBuilder_ == null) { - nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.cdptech.cdpclient.proto.StudioAPI.Node, com.cdptech.cdpclient.proto.StudioAPI.Node.Builder, com.cdptech.cdpclient.proto.StudioAPI.NodeOrBuilder>( - node_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - node_ = null; - } - return nodeBuilder_; - } - @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:StudioAPI.Proto.Node) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.Node) - private static final com.cdptech.cdpclient.proto.StudioAPI.Node DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.Node(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.Node getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Node parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Node(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 com.cdptech.cdpclient.proto.StudioAPI.Node getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ChildAddOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.ChildAdd) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - *
-     * parent to add the node into
-     * 
- * - * required uint32 parent_node_id = 1; - * @return Whether the parentNodeId field is set. - */ - boolean hasParentNodeId(); - /** - *
-     * parent to add the node into
-     * 
- * - * required uint32 parent_node_id = 1; - * @return The parentNodeId. - */ - int getParentNodeId(); - - /** - *
-     * child name to be added
-     * 
- * - * required string child_name = 2; - * @return Whether the childName field is set. - */ - boolean hasChildName(); - /** - *
-     * child name to be added
-     * 
- * - * required string child_name = 2; - * @return The childName. - */ - java.lang.String getChildName(); - /** - *
-     * child name to be added
-     * 
- * - * required string child_name = 2; - * @return The bytes for childName. - */ - com.google.protobuf.ByteString - getChildNameBytes(); - - /** - *
-     * child class name
-     * 
- * - * required string child_type_name = 3; - * @return Whether the childTypeName field is set. - */ - boolean hasChildTypeName(); - /** - *
-     * child class name
-     * 
- * - * required string child_type_name = 3; - * @return The childTypeName. - */ - java.lang.String getChildTypeName(); - /** - *
-     * child class name
-     * 
- * - * required string child_type_name = 3; - * @return The bytes for childTypeName. - */ - com.google.protobuf.ByteString - getChildTypeNameBytes(); - } - /** - *
-   ** ChildAdd Request input structure 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.ChildAdd} - */ - public static final class ChildAdd extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - ChildAdd> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.ChildAdd) - ChildAddOrBuilder { - private static final long serialVersionUID = 0L; - // Use ChildAdd.newBuilder() to construct. - private ChildAdd(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private ChildAdd() { - childName_ = ""; - childTypeName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ChildAdd(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ChildAdd( - 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 8: { - bitField0_ |= 0x00000001; - parentNodeId_ = input.readUInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - childName_ = bs; - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - childTypeName_ = bs; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildAdd_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildAdd_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.class, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder.class); - } - - private int bitField0_; - public static final int PARENT_NODE_ID_FIELD_NUMBER = 1; - private int parentNodeId_; - /** - *
-     * parent to add the node into
-     * 
- * - * required uint32 parent_node_id = 1; - * @return Whether the parentNodeId field is set. - */ - @java.lang.Override - public boolean hasParentNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * parent to add the node into
-     * 
- * - * required uint32 parent_node_id = 1; - * @return The parentNodeId. - */ - @java.lang.Override - public int getParentNodeId() { - return parentNodeId_; - } - - public static final int CHILD_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object childName_; - /** - *
-     * child name to be added
-     * 
- * - * required string child_name = 2; - * @return Whether the childName field is set. - */ - @java.lang.Override - public boolean hasChildName() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * child name to be added
-     * 
- * - * required string child_name = 2; - * @return The childName. - */ - @java.lang.Override - public java.lang.String getChildName() { - java.lang.Object ref = childName_; - 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(); - if (bs.isValidUtf8()) { - childName_ = s; - } - return s; - } - } - /** - *
-     * child name to be added
-     * 
- * - * required string child_name = 2; - * @return The bytes for childName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChildNameBytes() { - java.lang.Object ref = childName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - childName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CHILD_TYPE_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object childTypeName_; - /** - *
-     * child class name
-     * 
- * - * required string child_type_name = 3; - * @return Whether the childTypeName field is set. - */ - @java.lang.Override - public boolean hasChildTypeName() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * child class name
-     * 
- * - * required string child_type_name = 3; - * @return The childTypeName. - */ - @java.lang.Override - public java.lang.String getChildTypeName() { - java.lang.Object ref = childTypeName_; - 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(); - if (bs.isValidUtf8()) { - childTypeName_ = s; - } - return s; - } - } - /** - *
-     * child class name
-     * 
- * - * required string child_type_name = 3; - * @return The bytes for childTypeName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChildTypeNameBytes() { - java.lang.Object ref = childTypeName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - childTypeName_ = 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; - - if (!hasParentNodeId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasChildName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasChildTypeName()) { - memoizedIsInitialized = 0; - return false; - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, parentNodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, childName_); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, childTypeName_); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, parentNodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, childName_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, childTypeName_); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.ChildAdd)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd other = (com.cdptech.cdpclient.proto.StudioAPI.ChildAdd) obj; - - if (hasParentNodeId() != other.hasParentNodeId()) return false; - if (hasParentNodeId()) { - if (getParentNodeId() - != other.getParentNodeId()) return false; - } - if (hasChildName() != other.hasChildName()) return false; - if (hasChildName()) { - if (!getChildName() - .equals(other.getChildName())) return false; - } - if (hasChildTypeName() != other.hasChildTypeName()) return false; - if (hasChildTypeName()) { - if (!getChildTypeName() - .equals(other.getChildTypeName())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasParentNodeId()) { - hash = (37 * hash) + PARENT_NODE_ID_FIELD_NUMBER; - hash = (53 * hash) + getParentNodeId(); - } - if (hasChildName()) { - hash = (37 * hash) + CHILD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getChildName().hashCode(); - } - if (hasChildTypeName()) { - hash = (37 * hash) + CHILD_TYPE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getChildTypeName().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd 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 com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd 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 com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd 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(com.cdptech.cdpclient.proto.StudioAPI.ChildAdd 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; - } - /** - *
-     ** ChildAdd Request input structure 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.ChildAdd} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.ChildAdd) - com.cdptech.cdpclient.proto.StudioAPI.ChildAddOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildAdd_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildAdd_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.class, com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.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(); - parentNodeId_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - childName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - childTypeName_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildAdd_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd build() { - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildAdd buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd result = new com.cdptech.cdpclient.proto.StudioAPI.ChildAdd(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parentNodeId_ = parentNodeId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.childName_ = childName_; - if (((from_bitField0_ & 0x00000004) != 0)) { - to_bitField0_ |= 0x00000004; - } - result.childTypeName_ = childTypeName_; - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.ChildAdd) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.ChildAdd)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.ChildAdd other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.ChildAdd.getDefaultInstance()) return this; - if (other.hasParentNodeId()) { - setParentNodeId(other.getParentNodeId()); - } - if (other.hasChildName()) { - bitField0_ |= 0x00000002; - childName_ = other.childName_; - onChanged(); - } - if (other.hasChildTypeName()) { - bitField0_ |= 0x00000004; - childTypeName_ = other.childTypeName_; - onChanged(); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasParentNodeId()) { - return false; - } - if (!hasChildName()) { - return false; - } - if (!hasChildTypeName()) { - return false; - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.ChildAdd parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.ChildAdd) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int parentNodeId_ ; - /** - *
-       * parent to add the node into
-       * 
- * - * required uint32 parent_node_id = 1; - * @return Whether the parentNodeId field is set. - */ - @java.lang.Override - public boolean hasParentNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * parent to add the node into
-       * 
- * - * required uint32 parent_node_id = 1; - * @return The parentNodeId. - */ - @java.lang.Override - public int getParentNodeId() { - return parentNodeId_; - } - /** - *
-       * parent to add the node into
-       * 
- * - * required uint32 parent_node_id = 1; - * @param value The parentNodeId to set. - * @return This builder for chaining. - */ - public Builder setParentNodeId(int value) { - bitField0_ |= 0x00000001; - parentNodeId_ = value; - onChanged(); - return this; - } - /** - *
-       * parent to add the node into
-       * 
- * - * required uint32 parent_node_id = 1; - * @return This builder for chaining. - */ - public Builder clearParentNodeId() { - bitField0_ = (bitField0_ & ~0x00000001); - parentNodeId_ = 0; - onChanged(); - return this; - } - - private java.lang.Object childName_ = ""; - /** - *
-       * child name to be added
-       * 
- * - * required string child_name = 2; - * @return Whether the childName field is set. - */ - public boolean hasChildName() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * child name to be added
-       * 
- * - * required string child_name = 2; - * @return The childName. - */ - public java.lang.String getChildName() { - java.lang.Object ref = childName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - childName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * child name to be added
-       * 
- * - * required string child_name = 2; - * @return The bytes for childName. - */ - public com.google.protobuf.ByteString - getChildNameBytes() { - java.lang.Object ref = childName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - childName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * child name to be added
-       * 
- * - * required string child_name = 2; - * @param value The childName to set. - * @return This builder for chaining. - */ - public Builder setChildName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - childName_ = value; - onChanged(); - return this; - } - /** - *
-       * child name to be added
-       * 
- * - * required string child_name = 2; - * @return This builder for chaining. - */ - public Builder clearChildName() { - bitField0_ = (bitField0_ & ~0x00000002); - childName_ = getDefaultInstance().getChildName(); - onChanged(); - return this; - } - /** - *
-       * child name to be added
-       * 
- * - * required string child_name = 2; - * @param value The bytes for childName to set. - * @return This builder for chaining. - */ - public Builder setChildNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - childName_ = value; - onChanged(); - return this; - } - - private java.lang.Object childTypeName_ = ""; - /** - *
-       * child class name
-       * 
- * - * required string child_type_name = 3; - * @return Whether the childTypeName field is set. - */ - public boolean hasChildTypeName() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * child class name
-       * 
- * - * required string child_type_name = 3; - * @return The childTypeName. - */ - public java.lang.String getChildTypeName() { - java.lang.Object ref = childTypeName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - childTypeName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * child class name
-       * 
- * - * required string child_type_name = 3; - * @return The bytes for childTypeName. - */ - public com.google.protobuf.ByteString - getChildTypeNameBytes() { - java.lang.Object ref = childTypeName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - childTypeName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * child class name
-       * 
- * - * required string child_type_name = 3; - * @param value The childTypeName to set. - * @return This builder for chaining. - */ - public Builder setChildTypeName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - childTypeName_ = value; - onChanged(); - return this; - } - /** - *
-       * child class name
-       * 
- * - * required string child_type_name = 3; - * @return This builder for chaining. - */ - public Builder clearChildTypeName() { - bitField0_ = (bitField0_ & ~0x00000004); - childTypeName_ = getDefaultInstance().getChildTypeName(); - onChanged(); - return this; - } - /** - *
-       * child class name
-       * 
- * - * required string child_type_name = 3; - * @param value The bytes for childTypeName to set. - * @return This builder for chaining. - */ - public Builder setChildTypeNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - childTypeName_ = 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:StudioAPI.Proto.ChildAdd) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.ChildAdd) - private static final com.cdptech.cdpclient.proto.StudioAPI.ChildAdd DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.ChildAdd(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.ChildAdd getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChildAdd parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ChildAdd(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 com.cdptech.cdpclient.proto.StudioAPI.ChildAdd getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ChildRemoveOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.ChildRemove) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - *
-     * parent to remove the node from
-     * 
- * - * required uint32 parent_node_id = 1; - * @return Whether the parentNodeId field is set. - */ - boolean hasParentNodeId(); - /** - *
-     * parent to remove the node from
-     * 
- * - * required uint32 parent_node_id = 1; - * @return The parentNodeId. - */ - int getParentNodeId(); - - /** - *
-     * child to be removed
-     * 
- * - * required string child_name = 2; - * @return Whether the childName field is set. - */ - boolean hasChildName(); - /** - *
-     * child to be removed
-     * 
- * - * required string child_name = 2; - * @return The childName. - */ - java.lang.String getChildName(); - /** - *
-     * child to be removed
-     * 
- * - * required string child_name = 2; - * @return The bytes for childName. - */ - com.google.protobuf.ByteString - getChildNameBytes(); - } - /** - *
-   ** ChildRemove Request input structure 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.ChildRemove} - */ - public static final class ChildRemove extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - ChildRemove> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.ChildRemove) - ChildRemoveOrBuilder { - private static final long serialVersionUID = 0L; - // Use ChildRemove.newBuilder() to construct. - private ChildRemove(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private ChildRemove() { - childName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ChildRemove(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ChildRemove( - 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 8: { - bitField0_ |= 0x00000001; - parentNodeId_ = input.readUInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - childName_ = bs; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildRemove_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildRemove_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.class, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder.class); - } - - private int bitField0_; - public static final int PARENT_NODE_ID_FIELD_NUMBER = 1; - private int parentNodeId_; - /** - *
-     * parent to remove the node from
-     * 
- * - * required uint32 parent_node_id = 1; - * @return Whether the parentNodeId field is set. - */ - @java.lang.Override - public boolean hasParentNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * parent to remove the node from
-     * 
- * - * required uint32 parent_node_id = 1; - * @return The parentNodeId. - */ - @java.lang.Override - public int getParentNodeId() { - return parentNodeId_; - } - - public static final int CHILD_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object childName_; - /** - *
-     * child to be removed
-     * 
- * - * required string child_name = 2; - * @return Whether the childName field is set. - */ - @java.lang.Override - public boolean hasChildName() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * child to be removed
-     * 
- * - * required string child_name = 2; - * @return The childName. - */ - @java.lang.Override - public java.lang.String getChildName() { - java.lang.Object ref = childName_; - 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(); - if (bs.isValidUtf8()) { - childName_ = s; - } - return s; - } - } - /** - *
-     * child to be removed
-     * 
- * - * required string child_name = 2; - * @return The bytes for childName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChildNameBytes() { - java.lang.Object ref = childName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - childName_ = 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; - - if (!hasParentNodeId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasChildName()) { - memoizedIsInitialized = 0; - return false; - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, parentNodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, childName_); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, parentNodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, childName_); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.ChildRemove)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove other = (com.cdptech.cdpclient.proto.StudioAPI.ChildRemove) obj; - - if (hasParentNodeId() != other.hasParentNodeId()) return false; - if (hasParentNodeId()) { - if (getParentNodeId() - != other.getParentNodeId()) return false; - } - if (hasChildName() != other.hasChildName()) return false; - if (hasChildName()) { - if (!getChildName() - .equals(other.getChildName())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasParentNodeId()) { - hash = (37 * hash) + PARENT_NODE_ID_FIELD_NUMBER; - hash = (53 * hash) + getParentNodeId(); - } - if (hasChildName()) { - hash = (37 * hash) + CHILD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getChildName().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove 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 com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove 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 com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove 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(com.cdptech.cdpclient.proto.StudioAPI.ChildRemove 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; - } - /** - *
-     ** ChildRemove Request input structure 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.ChildRemove} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.ChildRemove) - com.cdptech.cdpclient.proto.StudioAPI.ChildRemoveOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildRemove_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildRemove_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.class, com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.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(); - parentNodeId_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - childName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ChildRemove_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove build() { - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ChildRemove buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove result = new com.cdptech.cdpclient.proto.StudioAPI.ChildRemove(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parentNodeId_ = parentNodeId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.childName_ = childName_; - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.ChildRemove) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.ChildRemove)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.ChildRemove other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.ChildRemove.getDefaultInstance()) return this; - if (other.hasParentNodeId()) { - setParentNodeId(other.getParentNodeId()); - } - if (other.hasChildName()) { - bitField0_ |= 0x00000002; - childName_ = other.childName_; - onChanged(); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasParentNodeId()) { - return false; - } - if (!hasChildName()) { - return false; - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.ChildRemove parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.ChildRemove) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int parentNodeId_ ; - /** - *
-       * parent to remove the node from
-       * 
- * - * required uint32 parent_node_id = 1; - * @return Whether the parentNodeId field is set. - */ - @java.lang.Override - public boolean hasParentNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * parent to remove the node from
-       * 
- * - * required uint32 parent_node_id = 1; - * @return The parentNodeId. - */ - @java.lang.Override - public int getParentNodeId() { - return parentNodeId_; - } - /** - *
-       * parent to remove the node from
-       * 
- * - * required uint32 parent_node_id = 1; - * @param value The parentNodeId to set. - * @return This builder for chaining. - */ - public Builder setParentNodeId(int value) { - bitField0_ |= 0x00000001; - parentNodeId_ = value; - onChanged(); - return this; - } - /** - *
-       * parent to remove the node from
-       * 
- * - * required uint32 parent_node_id = 1; - * @return This builder for chaining. - */ - public Builder clearParentNodeId() { - bitField0_ = (bitField0_ & ~0x00000001); - parentNodeId_ = 0; - onChanged(); - return this; - } - - private java.lang.Object childName_ = ""; - /** - *
-       * child to be removed
-       * 
- * - * required string child_name = 2; - * @return Whether the childName field is set. - */ - public boolean hasChildName() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * child to be removed
-       * 
- * - * required string child_name = 2; - * @return The childName. - */ - public java.lang.String getChildName() { - java.lang.Object ref = childName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - childName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * child to be removed
-       * 
- * - * required string child_name = 2; - * @return The bytes for childName. - */ - public com.google.protobuf.ByteString - getChildNameBytes() { - java.lang.Object ref = childName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - childName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * child to be removed
-       * 
- * - * required string child_name = 2; - * @param value The childName to set. - * @return This builder for chaining. - */ - public Builder setChildName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - childName_ = value; - onChanged(); - return this; - } - /** - *
-       * child to be removed
-       * 
- * - * required string child_name = 2; - * @return This builder for chaining. - */ - public Builder clearChildName() { - bitField0_ = (bitField0_ & ~0x00000002); - childName_ = getDefaultInstance().getChildName(); - onChanged(); - return this; - } - /** - *
-       * child to be removed
-       * 
- * - * required string child_name = 2; - * @param value The bytes for childName to set. - * @return This builder for chaining. - */ - public Builder setChildNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - childName_ = 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:StudioAPI.Proto.ChildRemove) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.ChildRemove) - private static final com.cdptech.cdpclient.proto.StudioAPI.ChildRemove DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.ChildRemove(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.ChildRemove getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChildRemove parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ChildRemove(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 com.cdptech.cdpclient.proto.StudioAPI.ChildRemove getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface VariantValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.VariantValue) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - * optional uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - boolean hasNodeId(); - /** - * optional uint32 node_id = 1; - * @return The nodeId. - */ - int getNodeId(); - - /** - * optional double d_value = 2; - * @return Whether the dValue field is set. - */ - boolean hasDValue(); - /** - * optional double d_value = 2; - * @return The dValue. - */ - double getDValue(); - - /** - * optional float f_value = 3; - * @return Whether the fValue field is set. - */ - boolean hasFValue(); - /** - * optional float f_value = 3; - * @return The fValue. - */ - float getFValue(); - - /** - * optional uint64 ui64_value = 4; - * @return Whether the ui64Value field is set. - */ - boolean hasUi64Value(); - /** - * optional uint64 ui64_value = 4; - * @return The ui64Value. - */ - long getUi64Value(); - - /** - * optional sint64 i64_value = 5; - * @return Whether the i64Value field is set. - */ - boolean hasI64Value(); - /** - * optional sint64 i64_value = 5; - * @return The i64Value. - */ - long getI64Value(); - - /** - * optional uint32 ui_value = 6; - * @return Whether the uiValue field is set. - */ - boolean hasUiValue(); - /** - * optional uint32 ui_value = 6; - * @return The uiValue. - */ - int getUiValue(); - - /** - * optional sint32 i_value = 7; - * @return Whether the iValue field is set. - */ - boolean hasIValue(); - /** - * optional sint32 i_value = 7; - * @return The iValue. - */ - int getIValue(); - - /** - *
-     * uint used as ushort (which protobuf doesnt have)
-     * 
- * - * optional uint32 us_value = 8; - * @return Whether the usValue field is set. - */ - boolean hasUsValue(); - /** - *
-     * uint used as ushort (which protobuf doesnt have)
-     * 
- * - * optional uint32 us_value = 8; - * @return The usValue. - */ - int getUsValue(); - - /** - *
-     * int used as short
-     * 
- * - * optional sint32 s_value = 9; - * @return Whether the sValue field is set. - */ - boolean hasSValue(); - /** - *
-     * int used as short
-     * 
- * - * optional sint32 s_value = 9; - * @return The sValue. - */ - int getSValue(); - - /** - *
-     * uint used as uchar
-     * 
- * - * optional uint32 uc_value = 10; - * @return Whether the ucValue field is set. - */ - boolean hasUcValue(); - /** - *
-     * uint used as uchar
-     * 
- * - * optional uint32 uc_value = 10; - * @return The ucValue. - */ - int getUcValue(); - - /** - *
-     * int used as char
-     * 
- * - * optional sint32 c_value = 11; - * @return Whether the cValue field is set. - */ - boolean hasCValue(); - /** - *
-     * int used as char
-     * 
- * - * optional sint32 c_value = 11; - * @return The cValue. - */ - int getCValue(); - - /** - * optional bool b_value = 12; - * @return Whether the bValue field is set. - */ - boolean hasBValue(); - /** - * optional bool b_value = 12; - * @return The bValue. - */ - boolean getBValue(); - - /** - * optional string str_value = 13; - * @return Whether the strValue field is set. - */ - boolean hasStrValue(); - /** - * optional string str_value = 13; - * @return The strValue. - */ - java.lang.String getStrValue(); - /** - * optional string str_value = 13; - * @return The bytes for strValue. - */ - com.google.protobuf.ByteString - getStrValueBytes(); - - /** - *
-     * Source may provide timestamp for sent value
-     * 
- * - * optional uint64 timestamp = 14; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - *
-     * Source may provide timestamp for sent value
-     * 
- * - * optional uint64 timestamp = 14; - * @return The timestamp. - */ - long getTimestamp(); - } - /** - *
-   ** Common Variant value type for a remote node. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.VariantValue} - */ - public static final class VariantValue extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - VariantValue> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.VariantValue) - VariantValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use VariantValue.newBuilder() to construct. - private VariantValue(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private VariantValue() { - strValue_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VariantValue(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private VariantValue( - 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 8: { - bitField0_ |= 0x00000001; - nodeId_ = input.readUInt32(); - break; - } - case 17: { - bitField0_ |= 0x00000002; - dValue_ = input.readDouble(); - break; - } - case 29: { - bitField0_ |= 0x00000004; - fValue_ = input.readFloat(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - ui64Value_ = input.readUInt64(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - i64Value_ = input.readSInt64(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - uiValue_ = input.readUInt32(); - break; - } - case 56: { - bitField0_ |= 0x00000040; - iValue_ = input.readSInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000080; - usValue_ = input.readUInt32(); - break; - } - case 72: { - bitField0_ |= 0x00000100; - sValue_ = input.readSInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000200; - ucValue_ = input.readUInt32(); - break; - } - case 88: { - bitField0_ |= 0x00000400; - cValue_ = input.readSInt32(); - break; - } - case 96: { - bitField0_ |= 0x00000800; - bValue_ = input.readBool(); - break; - } - case 106: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00001000; - strValue_ = bs; - break; - } - case 112: { - bitField0_ |= 0x00002000; - timestamp_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_VariantValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_VariantValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.VariantValue.class, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder.class); - } - - private int bitField0_; - public static final int NODE_ID_FIELD_NUMBER = 1; - private int nodeId_; - /** - * optional uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional uint32 node_id = 1; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - - public static final int D_VALUE_FIELD_NUMBER = 2; - private double dValue_; - /** - * optional double d_value = 2; - * @return Whether the dValue field is set. - */ - @java.lang.Override - public boolean hasDValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional double d_value = 2; - * @return The dValue. - */ - @java.lang.Override - public double getDValue() { - return dValue_; - } - - public static final int F_VALUE_FIELD_NUMBER = 3; - private float fValue_; - /** - * optional float f_value = 3; - * @return Whether the fValue field is set. - */ - @java.lang.Override - public boolean hasFValue() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional float f_value = 3; - * @return The fValue. - */ - @java.lang.Override - public float getFValue() { - return fValue_; - } - - public static final int UI64_VALUE_FIELD_NUMBER = 4; - private long ui64Value_; - /** - * optional uint64 ui64_value = 4; - * @return Whether the ui64Value field is set. - */ - @java.lang.Override - public boolean hasUi64Value() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional uint64 ui64_value = 4; - * @return The ui64Value. - */ - @java.lang.Override - public long getUi64Value() { - return ui64Value_; - } - - public static final int I64_VALUE_FIELD_NUMBER = 5; - private long i64Value_; - /** - * optional sint64 i64_value = 5; - * @return Whether the i64Value field is set. - */ - @java.lang.Override - public boolean hasI64Value() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * optional sint64 i64_value = 5; - * @return The i64Value. - */ - @java.lang.Override - public long getI64Value() { - return i64Value_; - } - - public static final int UI_VALUE_FIELD_NUMBER = 6; - private int uiValue_; - /** - * optional uint32 ui_value = 6; - * @return Whether the uiValue field is set. - */ - @java.lang.Override - public boolean hasUiValue() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * optional uint32 ui_value = 6; - * @return The uiValue. - */ - @java.lang.Override - public int getUiValue() { - return uiValue_; - } - - public static final int I_VALUE_FIELD_NUMBER = 7; - private int iValue_; - /** - * optional sint32 i_value = 7; - * @return Whether the iValue field is set. - */ - @java.lang.Override - public boolean hasIValue() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * optional sint32 i_value = 7; - * @return The iValue. - */ - @java.lang.Override - public int getIValue() { - return iValue_; - } - - public static final int US_VALUE_FIELD_NUMBER = 8; - private int usValue_; - /** - *
-     * uint used as ushort (which protobuf doesnt have)
-     * 
- * - * optional uint32 us_value = 8; - * @return Whether the usValue field is set. - */ - @java.lang.Override - public boolean hasUsValue() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * uint used as ushort (which protobuf doesnt have)
-     * 
- * - * optional uint32 us_value = 8; - * @return The usValue. - */ - @java.lang.Override - public int getUsValue() { - return usValue_; - } - - public static final int S_VALUE_FIELD_NUMBER = 9; - private int sValue_; - /** - *
-     * int used as short
-     * 
- * - * optional sint32 s_value = 9; - * @return Whether the sValue field is set. - */ - @java.lang.Override - public boolean hasSValue() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * int used as short
-     * 
- * - * optional sint32 s_value = 9; - * @return The sValue. - */ - @java.lang.Override - public int getSValue() { - return sValue_; - } - - public static final int UC_VALUE_FIELD_NUMBER = 10; - private int ucValue_; - /** - *
-     * uint used as uchar
-     * 
- * - * optional uint32 uc_value = 10; - * @return Whether the ucValue field is set. - */ - @java.lang.Override - public boolean hasUcValue() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * uint used as uchar
-     * 
- * - * optional uint32 uc_value = 10; - * @return The ucValue. - */ - @java.lang.Override - public int getUcValue() { - return ucValue_; - } - - public static final int C_VALUE_FIELD_NUMBER = 11; - private int cValue_; - /** - *
-     * int used as char
-     * 
- * - * optional sint32 c_value = 11; - * @return Whether the cValue field is set. - */ - @java.lang.Override - public boolean hasCValue() { - return ((bitField0_ & 0x00000400) != 0); - } - /** - *
-     * int used as char
-     * 
- * - * optional sint32 c_value = 11; - * @return The cValue. - */ - @java.lang.Override - public int getCValue() { - return cValue_; - } - - public static final int B_VALUE_FIELD_NUMBER = 12; - private boolean bValue_; - /** - * optional bool b_value = 12; - * @return Whether the bValue field is set. - */ - @java.lang.Override - public boolean hasBValue() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - * optional bool b_value = 12; - * @return The bValue. - */ - @java.lang.Override - public boolean getBValue() { - return bValue_; - } - - public static final int STR_VALUE_FIELD_NUMBER = 13; - private volatile java.lang.Object strValue_; - /** - * optional string str_value = 13; - * @return Whether the strValue field is set. - */ - @java.lang.Override - public boolean hasStrValue() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * optional string str_value = 13; - * @return The strValue. - */ - @java.lang.Override - public java.lang.String getStrValue() { - java.lang.Object ref = strValue_; - 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(); - if (bs.isValidUtf8()) { - strValue_ = s; - } - return s; - } - } - /** - * optional string str_value = 13; - * @return The bytes for strValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStrValueBytes() { - java.lang.Object ref = strValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - strValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIMESTAMP_FIELD_NUMBER = 14; - private long timestamp_; - /** - *
-     * Source may provide timestamp for sent value
-     * 
- * - * optional uint64 timestamp = 14; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return ((bitField0_ & 0x00002000) != 0); - } - /** - *
-     * Source may provide timestamp for sent value
-     * 
- * - * optional uint64 timestamp = 14; - * @return The timestamp. - */ - @java.lang.Override - public long getTimestamp() { - return timestamp_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, nodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeDouble(2, dValue_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeFloat(3, fValue_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeUInt64(4, ui64Value_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeSInt64(5, i64Value_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeUInt32(6, uiValue_); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeSInt32(7, iValue_); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeUInt32(8, usValue_); - } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeSInt32(9, sValue_); - } - if (((bitField0_ & 0x00000200) != 0)) { - output.writeUInt32(10, ucValue_); - } - if (((bitField0_ & 0x00000400) != 0)) { - output.writeSInt32(11, cValue_); - } - if (((bitField0_ & 0x00000800) != 0)) { - output.writeBool(12, bValue_); - } - if (((bitField0_ & 0x00001000) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, strValue_); - } - if (((bitField0_ & 0x00002000) != 0)) { - output.writeUInt64(14, timestamp_); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, nodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, dValue_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, fValue_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(4, ui64Value_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(5, i64Value_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, uiValue_); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(7, iValue_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, usValue_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(9, sValue_); - } - if (((bitField0_ & 0x00000200) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, ucValue_); - } - if (((bitField0_ & 0x00000400) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(11, cValue_); - } - if (((bitField0_ & 0x00000800) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(12, bValue_); - } - if (((bitField0_ & 0x00001000) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, strValue_); - } - if (((bitField0_ & 0x00002000) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(14, timestamp_); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.VariantValue)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.VariantValue other = (com.cdptech.cdpclient.proto.StudioAPI.VariantValue) obj; - - if (hasNodeId() != other.hasNodeId()) return false; - if (hasNodeId()) { - if (getNodeId() - != other.getNodeId()) return false; - } - if (hasDValue() != other.hasDValue()) return false; - if (hasDValue()) { - if (java.lang.Double.doubleToLongBits(getDValue()) - != java.lang.Double.doubleToLongBits( - other.getDValue())) return false; - } - if (hasFValue() != other.hasFValue()) return false; - if (hasFValue()) { - if (java.lang.Float.floatToIntBits(getFValue()) - != java.lang.Float.floatToIntBits( - other.getFValue())) return false; - } - if (hasUi64Value() != other.hasUi64Value()) return false; - if (hasUi64Value()) { - if (getUi64Value() - != other.getUi64Value()) return false; - } - if (hasI64Value() != other.hasI64Value()) return false; - if (hasI64Value()) { - if (getI64Value() - != other.getI64Value()) return false; - } - if (hasUiValue() != other.hasUiValue()) return false; - if (hasUiValue()) { - if (getUiValue() - != other.getUiValue()) return false; - } - if (hasIValue() != other.hasIValue()) return false; - if (hasIValue()) { - if (getIValue() - != other.getIValue()) return false; - } - if (hasUsValue() != other.hasUsValue()) return false; - if (hasUsValue()) { - if (getUsValue() - != other.getUsValue()) return false; - } - if (hasSValue() != other.hasSValue()) return false; - if (hasSValue()) { - if (getSValue() - != other.getSValue()) return false; - } - if (hasUcValue() != other.hasUcValue()) return false; - if (hasUcValue()) { - if (getUcValue() - != other.getUcValue()) return false; - } - if (hasCValue() != other.hasCValue()) return false; - if (hasCValue()) { - if (getCValue() - != other.getCValue()) return false; - } - if (hasBValue() != other.hasBValue()) return false; - if (hasBValue()) { - if (getBValue() - != other.getBValue()) return false; - } - if (hasStrValue() != other.hasStrValue()) return false; - if (hasStrValue()) { - if (!getStrValue() - .equals(other.getStrValue())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (getTimestamp() - != other.getTimestamp()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNodeId()) { - hash = (37 * hash) + NODE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNodeId(); - } - if (hasDValue()) { - hash = (37 * hash) + D_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getDValue())); - } - if (hasFValue()) { - hash = (37 * hash) + F_VALUE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getFValue()); - } - if (hasUi64Value()) { - hash = (37 * hash) + UI64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUi64Value()); - } - if (hasI64Value()) { - hash = (37 * hash) + I64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getI64Value()); - } - if (hasUiValue()) { - hash = (37 * hash) + UI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getUiValue(); - } - if (hasIValue()) { - hash = (37 * hash) + I_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getIValue(); - } - if (hasUsValue()) { - hash = (37 * hash) + US_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getUsValue(); - } - if (hasSValue()) { - hash = (37 * hash) + S_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getSValue(); - } - if (hasUcValue()) { - hash = (37 * hash) + UC_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getUcValue(); - } - if (hasCValue()) { - hash = (37 * hash) + C_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getCValue(); - } - if (hasBValue()) { - hash = (37 * hash) + B_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBValue()); - } - if (hasStrValue()) { - hash = (37 * hash) + STR_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getStrValue().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTimestamp()); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue 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 com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue 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 com.cdptech.cdpclient.proto.StudioAPI.VariantValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue 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(com.cdptech.cdpclient.proto.StudioAPI.VariantValue 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; - } - /** - *
-     ** Common Variant value type for a remote node. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.VariantValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.VariantValue) - com.cdptech.cdpclient.proto.StudioAPI.VariantValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_VariantValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_VariantValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.VariantValue.class, com.cdptech.cdpclient.proto.StudioAPI.VariantValue.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.VariantValue.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(); - nodeId_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - dValue_ = 0D; - bitField0_ = (bitField0_ & ~0x00000002); - fValue_ = 0F; - bitField0_ = (bitField0_ & ~0x00000004); - ui64Value_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - i64Value_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - uiValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - iValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - usValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - sValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - ucValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); - cValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000400); - bValue_ = false; - bitField0_ = (bitField0_ & ~0x00000800); - strValue_ = ""; - bitField0_ = (bitField0_ & ~0x00001000); - timestamp_ = 0L; - bitField0_ = (bitField0_ & ~0x00002000); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_VariantValue_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.VariantValue.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue build() { - com.cdptech.cdpclient.proto.StudioAPI.VariantValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.VariantValue buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.VariantValue result = new com.cdptech.cdpclient.proto.StudioAPI.VariantValue(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.nodeId_ = nodeId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dValue_ = dValue_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.fValue_ = fValue_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.ui64Value_ = ui64Value_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.i64Value_ = i64Value_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.uiValue_ = uiValue_; - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.iValue_ = iValue_; - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.usValue_ = usValue_; - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.sValue_ = sValue_; - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.ucValue_ = ucValue_; - to_bitField0_ |= 0x00000200; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.cValue_ = cValue_; - to_bitField0_ |= 0x00000400; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.bValue_ = bValue_; - to_bitField0_ |= 0x00000800; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - to_bitField0_ |= 0x00001000; - } - result.strValue_ = strValue_; - if (((from_bitField0_ & 0x00002000) != 0)) { - result.timestamp_ = timestamp_; - to_bitField0_ |= 0x00002000; - } - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.VariantValue, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.VariantValue) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.VariantValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.VariantValue other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.VariantValue.getDefaultInstance()) return this; - if (other.hasNodeId()) { - setNodeId(other.getNodeId()); - } - if (other.hasDValue()) { - setDValue(other.getDValue()); - } - if (other.hasFValue()) { - setFValue(other.getFValue()); - } - if (other.hasUi64Value()) { - setUi64Value(other.getUi64Value()); - } - if (other.hasI64Value()) { - setI64Value(other.getI64Value()); - } - if (other.hasUiValue()) { - setUiValue(other.getUiValue()); - } - if (other.hasIValue()) { - setIValue(other.getIValue()); - } - if (other.hasUsValue()) { - setUsValue(other.getUsValue()); - } - if (other.hasSValue()) { - setSValue(other.getSValue()); - } - if (other.hasUcValue()) { - setUcValue(other.getUcValue()); - } - if (other.hasCValue()) { - setCValue(other.getCValue()); - } - if (other.hasBValue()) { - setBValue(other.getBValue()); - } - if (other.hasStrValue()) { - bitField0_ |= 0x00001000; - strValue_ = other.strValue_; - onChanged(); - } - if (other.hasTimestamp()) { - setTimestamp(other.getTimestamp()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.VariantValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.VariantValue) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int nodeId_ ; - /** - * optional uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional uint32 node_id = 1; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - /** - * optional uint32 node_id = 1; - * @param value The nodeId to set. - * @return This builder for chaining. - */ - public Builder setNodeId(int value) { - bitField0_ |= 0x00000001; - nodeId_ = value; - onChanged(); - return this; - } - /** - * optional uint32 node_id = 1; - * @return This builder for chaining. - */ - public Builder clearNodeId() { - bitField0_ = (bitField0_ & ~0x00000001); - nodeId_ = 0; - onChanged(); - return this; - } - - private double dValue_ ; - /** - * optional double d_value = 2; - * @return Whether the dValue field is set. - */ - @java.lang.Override - public boolean hasDValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional double d_value = 2; - * @return The dValue. - */ - @java.lang.Override - public double getDValue() { - return dValue_; - } - /** - * optional double d_value = 2; - * @param value The dValue to set. - * @return This builder for chaining. - */ - public Builder setDValue(double value) { - bitField0_ |= 0x00000002; - dValue_ = value; - onChanged(); - return this; - } - /** - * optional double d_value = 2; - * @return This builder for chaining. - */ - public Builder clearDValue() { - bitField0_ = (bitField0_ & ~0x00000002); - dValue_ = 0D; - onChanged(); - return this; - } - - private float fValue_ ; - /** - * optional float f_value = 3; - * @return Whether the fValue field is set. - */ - @java.lang.Override - public boolean hasFValue() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional float f_value = 3; - * @return The fValue. - */ - @java.lang.Override - public float getFValue() { - return fValue_; - } - /** - * optional float f_value = 3; - * @param value The fValue to set. - * @return This builder for chaining. - */ - public Builder setFValue(float value) { - bitField0_ |= 0x00000004; - fValue_ = value; - onChanged(); - return this; - } - /** - * optional float f_value = 3; - * @return This builder for chaining. - */ - public Builder clearFValue() { - bitField0_ = (bitField0_ & ~0x00000004); - fValue_ = 0F; - onChanged(); - return this; - } - - private long ui64Value_ ; - /** - * optional uint64 ui64_value = 4; - * @return Whether the ui64Value field is set. - */ - @java.lang.Override - public boolean hasUi64Value() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * optional uint64 ui64_value = 4; - * @return The ui64Value. - */ - @java.lang.Override - public long getUi64Value() { - return ui64Value_; - } - /** - * optional uint64 ui64_value = 4; - * @param value The ui64Value to set. - * @return This builder for chaining. - */ - public Builder setUi64Value(long value) { - bitField0_ |= 0x00000008; - ui64Value_ = value; - onChanged(); - return this; - } - /** - * optional uint64 ui64_value = 4; - * @return This builder for chaining. - */ - public Builder clearUi64Value() { - bitField0_ = (bitField0_ & ~0x00000008); - ui64Value_ = 0L; - onChanged(); - return this; - } - - private long i64Value_ ; - /** - * optional sint64 i64_value = 5; - * @return Whether the i64Value field is set. - */ - @java.lang.Override - public boolean hasI64Value() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * optional sint64 i64_value = 5; - * @return The i64Value. - */ - @java.lang.Override - public long getI64Value() { - return i64Value_; - } - /** - * optional sint64 i64_value = 5; - * @param value The i64Value to set. - * @return This builder for chaining. - */ - public Builder setI64Value(long value) { - bitField0_ |= 0x00000010; - i64Value_ = value; - onChanged(); - return this; - } - /** - * optional sint64 i64_value = 5; - * @return This builder for chaining. - */ - public Builder clearI64Value() { - bitField0_ = (bitField0_ & ~0x00000010); - i64Value_ = 0L; - onChanged(); - return this; - } - - private int uiValue_ ; - /** - * optional uint32 ui_value = 6; - * @return Whether the uiValue field is set. - */ - @java.lang.Override - public boolean hasUiValue() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * optional uint32 ui_value = 6; - * @return The uiValue. - */ - @java.lang.Override - public int getUiValue() { - return uiValue_; - } - /** - * optional uint32 ui_value = 6; - * @param value The uiValue to set. - * @return This builder for chaining. - */ - public Builder setUiValue(int value) { - bitField0_ |= 0x00000020; - uiValue_ = value; - onChanged(); - return this; - } - /** - * optional uint32 ui_value = 6; - * @return This builder for chaining. - */ - public Builder clearUiValue() { - bitField0_ = (bitField0_ & ~0x00000020); - uiValue_ = 0; - onChanged(); - return this; - } - - private int iValue_ ; - /** - * optional sint32 i_value = 7; - * @return Whether the iValue field is set. - */ - @java.lang.Override - public boolean hasIValue() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * optional sint32 i_value = 7; - * @return The iValue. - */ - @java.lang.Override - public int getIValue() { - return iValue_; - } - /** - * optional sint32 i_value = 7; - * @param value The iValue to set. - * @return This builder for chaining. - */ - public Builder setIValue(int value) { - bitField0_ |= 0x00000040; - iValue_ = value; - onChanged(); - return this; - } - /** - * optional sint32 i_value = 7; - * @return This builder for chaining. - */ - public Builder clearIValue() { - bitField0_ = (bitField0_ & ~0x00000040); - iValue_ = 0; - onChanged(); - return this; - } - - private int usValue_ ; - /** - *
-       * uint used as ushort (which protobuf doesnt have)
-       * 
- * - * optional uint32 us_value = 8; - * @return Whether the usValue field is set. - */ - @java.lang.Override - public boolean hasUsValue() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-       * uint used as ushort (which protobuf doesnt have)
-       * 
- * - * optional uint32 us_value = 8; - * @return The usValue. - */ - @java.lang.Override - public int getUsValue() { - return usValue_; - } - /** - *
-       * uint used as ushort (which protobuf doesnt have)
-       * 
- * - * optional uint32 us_value = 8; - * @param value The usValue to set. - * @return This builder for chaining. - */ - public Builder setUsValue(int value) { - bitField0_ |= 0x00000080; - usValue_ = value; - onChanged(); - return this; - } - /** - *
-       * uint used as ushort (which protobuf doesnt have)
-       * 
- * - * optional uint32 us_value = 8; - * @return This builder for chaining. - */ - public Builder clearUsValue() { - bitField0_ = (bitField0_ & ~0x00000080); - usValue_ = 0; - onChanged(); - return this; - } - - private int sValue_ ; - /** - *
-       * int used as short
-       * 
- * - * optional sint32 s_value = 9; - * @return Whether the sValue field is set. - */ - @java.lang.Override - public boolean hasSValue() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-       * int used as short
-       * 
- * - * optional sint32 s_value = 9; - * @return The sValue. - */ - @java.lang.Override - public int getSValue() { - return sValue_; - } - /** - *
-       * int used as short
-       * 
- * - * optional sint32 s_value = 9; - * @param value The sValue to set. - * @return This builder for chaining. - */ - public Builder setSValue(int value) { - bitField0_ |= 0x00000100; - sValue_ = value; - onChanged(); - return this; - } - /** - *
-       * int used as short
-       * 
- * - * optional sint32 s_value = 9; - * @return This builder for chaining. - */ - public Builder clearSValue() { - bitField0_ = (bitField0_ & ~0x00000100); - sValue_ = 0; - onChanged(); - return this; - } - - private int ucValue_ ; - /** - *
-       * uint used as uchar
-       * 
- * - * optional uint32 uc_value = 10; - * @return Whether the ucValue field is set. - */ - @java.lang.Override - public boolean hasUcValue() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-       * uint used as uchar
-       * 
- * - * optional uint32 uc_value = 10; - * @return The ucValue. - */ - @java.lang.Override - public int getUcValue() { - return ucValue_; - } - /** - *
-       * uint used as uchar
-       * 
- * - * optional uint32 uc_value = 10; - * @param value The ucValue to set. - * @return This builder for chaining. - */ - public Builder setUcValue(int value) { - bitField0_ |= 0x00000200; - ucValue_ = value; - onChanged(); - return this; - } - /** - *
-       * uint used as uchar
-       * 
- * - * optional uint32 uc_value = 10; - * @return This builder for chaining. - */ - public Builder clearUcValue() { - bitField0_ = (bitField0_ & ~0x00000200); - ucValue_ = 0; - onChanged(); - return this; - } - - private int cValue_ ; - /** - *
-       * int used as char
-       * 
- * - * optional sint32 c_value = 11; - * @return Whether the cValue field is set. - */ - @java.lang.Override - public boolean hasCValue() { - return ((bitField0_ & 0x00000400) != 0); - } - /** - *
-       * int used as char
-       * 
- * - * optional sint32 c_value = 11; - * @return The cValue. - */ - @java.lang.Override - public int getCValue() { - return cValue_; - } - /** - *
-       * int used as char
-       * 
- * - * optional sint32 c_value = 11; - * @param value The cValue to set. - * @return This builder for chaining. - */ - public Builder setCValue(int value) { - bitField0_ |= 0x00000400; - cValue_ = value; - onChanged(); - return this; - } - /** - *
-       * int used as char
-       * 
- * - * optional sint32 c_value = 11; - * @return This builder for chaining. - */ - public Builder clearCValue() { - bitField0_ = (bitField0_ & ~0x00000400); - cValue_ = 0; - onChanged(); - return this; - } - - private boolean bValue_ ; - /** - * optional bool b_value = 12; - * @return Whether the bValue field is set. - */ - @java.lang.Override - public boolean hasBValue() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - * optional bool b_value = 12; - * @return The bValue. - */ - @java.lang.Override - public boolean getBValue() { - return bValue_; - } - /** - * optional bool b_value = 12; - * @param value The bValue to set. - * @return This builder for chaining. - */ - public Builder setBValue(boolean value) { - bitField0_ |= 0x00000800; - bValue_ = value; - onChanged(); - return this; - } - /** - * optional bool b_value = 12; - * @return This builder for chaining. - */ - public Builder clearBValue() { - bitField0_ = (bitField0_ & ~0x00000800); - bValue_ = false; - onChanged(); - return this; - } - - private java.lang.Object strValue_ = ""; - /** - * optional string str_value = 13; - * @return Whether the strValue field is set. - */ - public boolean hasStrValue() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * optional string str_value = 13; - * @return The strValue. - */ - public java.lang.String getStrValue() { - java.lang.Object ref = strValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - strValue_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string str_value = 13; - * @return The bytes for strValue. - */ - public com.google.protobuf.ByteString - getStrValueBytes() { - java.lang.Object ref = strValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - strValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string str_value = 13; - * @param value The strValue to set. - * @return This builder for chaining. - */ - public Builder setStrValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; - strValue_ = value; - onChanged(); - return this; - } - /** - * optional string str_value = 13; - * @return This builder for chaining. - */ - public Builder clearStrValue() { - bitField0_ = (bitField0_ & ~0x00001000); - strValue_ = getDefaultInstance().getStrValue(); - onChanged(); - return this; - } - /** - * optional string str_value = 13; - * @param value The bytes for strValue to set. - * @return This builder for chaining. - */ - public Builder setStrValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; - strValue_ = value; - onChanged(); - return this; - } - - private long timestamp_ ; - /** - *
-       * Source may provide timestamp for sent value
-       * 
- * - * optional uint64 timestamp = 14; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return ((bitField0_ & 0x00002000) != 0); - } - /** - *
-       * Source may provide timestamp for sent value
-       * 
- * - * optional uint64 timestamp = 14; - * @return The timestamp. - */ - @java.lang.Override - public long getTimestamp() { - return timestamp_; - } - /** - *
-       * Source may provide timestamp for sent value
-       * 
- * - * optional uint64 timestamp = 14; - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp(long value) { - bitField0_ |= 0x00002000; - timestamp_ = value; - onChanged(); - return this; - } - /** - *
-       * Source may provide timestamp for sent value
-       * 
- * - * optional uint64 timestamp = 14; - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - bitField0_ = (bitField0_ & ~0x00002000); - timestamp_ = 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:StudioAPI.Proto.VariantValue) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.VariantValue) - private static final com.cdptech.cdpclient.proto.StudioAPI.VariantValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.VariantValue(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.VariantValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VariantValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VariantValue(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 com.cdptech.cdpclient.proto.StudioAPI.VariantValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:StudioAPI.Proto.ValueRequest) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { - - /** - *
-     * List of node IDs whose value are requested
-     * 
- * - * required uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - boolean hasNodeId(); - /** - *
-     * List of node IDs whose value are requested
-     * 
- * - * required uint32 node_id = 1; - * @return The nodeId. - */ - int getNodeId(); - - /** - *
-     * If present indicates that values expected no more often than provided FS rate
-     * 
- * - * optional double fs = 2; - * @return Whether the fs field is set. - */ - boolean hasFs(); - /** - *
-     * If present indicates that values expected no more often than provided FS rate
-     * 
- * - * optional double fs = 2; - * @return The fs. - */ - double getFs(); - - /** - *
-     * (server will accumulate and time-stamp values if they occur more often)
-     * 
- * - * optional bool stop = 3; - * @return Whether the stop field is set. - */ - boolean hasStop(); - /** - *
-     * (server will accumulate and time-stamp values if they occur more often)
-     * 
- * - * optional bool stop = 3; - * @return The stop. - */ - boolean getStop(); - - /** - *
-     * If non zero indicates that values should be
-     * 
- * - * optional double sample_rate = 4; - * @return Whether the sampleRate field is set. - */ - boolean hasSampleRate(); - /** - *
-     * If non zero indicates that values should be
-     * 
- * - * optional double sample_rate = 4; - * @return The sampleRate. - */ - double getSampleRate(); - } - /** - *
-   ** Single and periodic value request message. 
-   * 
- * - * Protobuf type {@code StudioAPI.Proto.ValueRequest} - */ - public static final class ValueRequest extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - ValueRequest> implements - // @@protoc_insertion_point(message_implements:StudioAPI.Proto.ValueRequest) - ValueRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValueRequest.newBuilder() to construct. - private ValueRequest(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { - super(builder); - } - private ValueRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ValueRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ValueRequest( - 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 8: { - bitField0_ |= 0x00000001; - nodeId_ = input.readUInt32(); - break; - } - case 17: { - bitField0_ |= 0x00000002; - fs_ = input.readDouble(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - stop_ = input.readBool(); - break; - } - case 33: { - bitField0_ |= 0x00000008; - sampleRate_ = input.readDouble(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.class, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder.class); - } - - private int bitField0_; - public static final int NODE_ID_FIELD_NUMBER = 1; - private int nodeId_; - /** - *
-     * List of node IDs whose value are requested
-     * 
- * - * required uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * List of node IDs whose value are requested
-     * 
- * - * required uint32 node_id = 1; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - - public static final int FS_FIELD_NUMBER = 2; - private double fs_; - /** - *
-     * If present indicates that values expected no more often than provided FS rate
-     * 
- * - * optional double fs = 2; - * @return Whether the fs field is set. - */ - @java.lang.Override - public boolean hasFs() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * If present indicates that values expected no more often than provided FS rate
-     * 
- * - * optional double fs = 2; - * @return The fs. - */ - @java.lang.Override - public double getFs() { - return fs_; - } - - public static final int STOP_FIELD_NUMBER = 3; - private boolean stop_; - /** - *
-     * (server will accumulate and time-stamp values if they occur more often)
-     * 
- * - * optional bool stop = 3; - * @return Whether the stop field is set. - */ - @java.lang.Override - public boolean hasStop() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * (server will accumulate and time-stamp values if they occur more often)
-     * 
- * - * optional bool stop = 3; - * @return The stop. - */ - @java.lang.Override - public boolean getStop() { - return stop_; - } - - public static final int SAMPLE_RATE_FIELD_NUMBER = 4; - private double sampleRate_; - /** - *
-     * If non zero indicates that values should be
-     * 
- * - * optional double sample_rate = 4; - * @return Whether the sampleRate field is set. - */ - @java.lang.Override - public boolean hasSampleRate() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * If non zero indicates that values should be
-     * 
- * - * optional double sample_rate = 4; - * @return The sampleRate. - */ - @java.lang.Override - public double getSampleRate() { - return sampleRate_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasNodeId()) { - memoizedIsInitialized = 0; - return false; - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, nodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeDouble(2, fs_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeBool(3, stop_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeDouble(4, sampleRate_); - } - extensionWriter.writeUntil(536870912, output); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, nodeId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, fs_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, stop_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(4, sampleRate_); - } - size += extensionsSerializedSize(); - 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 com.cdptech.cdpclient.proto.StudioAPI.ValueRequest)) { - return super.equals(obj); - } - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest other = (com.cdptech.cdpclient.proto.StudioAPI.ValueRequest) obj; - - if (hasNodeId() != other.hasNodeId()) return false; - if (hasNodeId()) { - if (getNodeId() - != other.getNodeId()) return false; - } - if (hasFs() != other.hasFs()) return false; - if (hasFs()) { - if (java.lang.Double.doubleToLongBits(getFs()) - != java.lang.Double.doubleToLongBits( - other.getFs())) return false; - } - if (hasStop() != other.hasStop()) return false; - if (hasStop()) { - if (getStop() - != other.getStop()) return false; - } - if (hasSampleRate() != other.hasSampleRate()) return false; - if (hasSampleRate()) { - if (java.lang.Double.doubleToLongBits(getSampleRate()) - != java.lang.Double.doubleToLongBits( - other.getSampleRate())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNodeId()) { - hash = (37 * hash) + NODE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNodeId(); - } - if (hasFs()) { - hash = (37 * hash) + FS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getFs())); - } - if (hasStop()) { - hash = (37 * hash) + STOP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getStop()); - } - if (hasSampleRate()) { - hash = (37 * hash) + SAMPLE_RATE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getSampleRate())); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest 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 com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest 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 com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest 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(com.cdptech.cdpclient.proto.StudioAPI.ValueRequest 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; - } - /** - *
-     ** Single and periodic value request message. 
-     * 
- * - * Protobuf type {@code StudioAPI.Proto.ValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, Builder> implements - // @@protoc_insertion_point(builder_implements:StudioAPI.Proto.ValueRequest) - com.cdptech.cdpclient.proto.StudioAPI.ValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.class, com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.Builder.class); - } - - // Construct using com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.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(); - nodeId_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - fs_ = 0D; - bitField0_ = (bitField0_ & ~0x00000002); - stop_ = false; - bitField0_ = (bitField0_ & ~0x00000004); - sampleRate_ = 0D; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.cdptech.cdpclient.proto.StudioAPI.internal_static_StudioAPI_Proto_ValueRequest_descriptor; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest getDefaultInstanceForType() { - return com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest build() { - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.cdptech.cdpclient.proto.StudioAPI.ValueRequest buildPartial() { - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest result = new com.cdptech.cdpclient.proto.StudioAPI.ValueRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.nodeId_ = nodeId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fs_ = fs_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.stop_ = stop_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.sampleRate_ = sampleRate_; - to_bitField0_ |= 0x00000008; - } - result.bitField0_ = to_bitField0_; - 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 setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, Type> extension, - Type value) { - return super.setExtension(extension, value); - } - @java.lang.Override - public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, java.util.List> extension, - int index, Type value) { - return super.setExtension(extension, index, value); - } - @java.lang.Override - public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, java.util.List> extension, - Type value) { - return super.addExtension(extension, value); - } - @java.lang.Override - public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest, ?> extension) { - return super.clearExtension(extension); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.cdptech.cdpclient.proto.StudioAPI.ValueRequest) { - return mergeFrom((com.cdptech.cdpclient.proto.StudioAPI.ValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.cdptech.cdpclient.proto.StudioAPI.ValueRequest other) { - if (other == com.cdptech.cdpclient.proto.StudioAPI.ValueRequest.getDefaultInstance()) return this; - if (other.hasNodeId()) { - setNodeId(other.getNodeId()); - } - if (other.hasFs()) { - setFs(other.getFs()); - } - if (other.hasStop()) { - setStop(other.getStop()); - } - if (other.hasSampleRate()) { - setSampleRate(other.getSampleRate()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasNodeId()) { - return false; - } - if (!extensionsAreInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.cdptech.cdpclient.proto.StudioAPI.ValueRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.cdptech.cdpclient.proto.StudioAPI.ValueRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int nodeId_ ; - /** - *
-       * List of node IDs whose value are requested
-       * 
- * - * required uint32 node_id = 1; - * @return Whether the nodeId field is set. - */ - @java.lang.Override - public boolean hasNodeId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * List of node IDs whose value are requested
-       * 
- * - * required uint32 node_id = 1; - * @return The nodeId. - */ - @java.lang.Override - public int getNodeId() { - return nodeId_; - } - /** - *
-       * List of node IDs whose value are requested
-       * 
- * - * required uint32 node_id = 1; - * @param value The nodeId to set. - * @return This builder for chaining. - */ - public Builder setNodeId(int value) { - bitField0_ |= 0x00000001; - nodeId_ = value; - onChanged(); - return this; - } - /** - *
-       * List of node IDs whose value are requested
-       * 
- * - * required uint32 node_id = 1; - * @return This builder for chaining. - */ - public Builder clearNodeId() { - bitField0_ = (bitField0_ & ~0x00000001); - nodeId_ = 0; - onChanged(); - return this; - } - - private double fs_ ; - /** - *
-       * If present indicates that values expected no more often than provided FS rate
-       * 
- * - * optional double fs = 2; - * @return Whether the fs field is set. - */ - @java.lang.Override - public boolean hasFs() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * If present indicates that values expected no more often than provided FS rate
-       * 
- * - * optional double fs = 2; - * @return The fs. - */ - @java.lang.Override - public double getFs() { - return fs_; - } - /** - *
-       * If present indicates that values expected no more often than provided FS rate
-       * 
- * - * optional double fs = 2; - * @param value The fs to set. - * @return This builder for chaining. - */ - public Builder setFs(double value) { - bitField0_ |= 0x00000002; - fs_ = value; - onChanged(); - return this; - } - /** - *
-       * If present indicates that values expected no more often than provided FS rate
-       * 
- * - * optional double fs = 2; - * @return This builder for chaining. - */ - public Builder clearFs() { - bitField0_ = (bitField0_ & ~0x00000002); - fs_ = 0D; - onChanged(); - return this; - } - - private boolean stop_ ; - /** - *
-       * (server will accumulate and time-stamp values if they occur more often)
-       * 
- * - * optional bool stop = 3; - * @return Whether the stop field is set. - */ - @java.lang.Override - public boolean hasStop() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-       * (server will accumulate and time-stamp values if they occur more often)
-       * 
- * - * optional bool stop = 3; - * @return The stop. - */ - @java.lang.Override - public boolean getStop() { - return stop_; - } - /** - *
-       * (server will accumulate and time-stamp values if they occur more often)
-       * 
- * - * optional bool stop = 3; - * @param value The stop to set. - * @return This builder for chaining. - */ - public Builder setStop(boolean value) { - bitField0_ |= 0x00000004; - stop_ = value; - onChanged(); - return this; - } - /** - *
-       * (server will accumulate and time-stamp values if they occur more often)
-       * 
- * - * optional bool stop = 3; - * @return This builder for chaining. - */ - public Builder clearStop() { - bitField0_ = (bitField0_ & ~0x00000004); - stop_ = false; - onChanged(); - return this; - } - - private double sampleRate_ ; - /** - *
-       * If non zero indicates that values should be
-       * 
- * - * optional double sample_rate = 4; - * @return Whether the sampleRate field is set. - */ - @java.lang.Override - public boolean hasSampleRate() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-       * If non zero indicates that values should be
-       * 
- * - * optional double sample_rate = 4; - * @return The sampleRate. - */ - @java.lang.Override - public double getSampleRate() { - return sampleRate_; - } - /** - *
-       * If non zero indicates that values should be
-       * 
- * - * optional double sample_rate = 4; - * @param value The sampleRate to set. - * @return This builder for chaining. - */ - public Builder setSampleRate(double value) { - bitField0_ |= 0x00000008; - sampleRate_ = value; - onChanged(); - return this; - } - /** - *
-       * If non zero indicates that values should be
-       * 
- * - * optional double sample_rate = 4; - * @return This builder for chaining. - */ - public Builder clearSampleRate() { - bitField0_ = (bitField0_ & ~0x00000008); - sampleRate_ = 0D; - 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:StudioAPI.Proto.ValueRequest) - } - - // @@protoc_insertion_point(class_scope:StudioAPI.Proto.ValueRequest) - private static final com.cdptech.cdpclient.proto.StudioAPI.ValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.cdptech.cdpclient.proto.StudioAPI.ValueRequest(); - } - - public static com.cdptech.cdpclient.proto.StudioAPI.ValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ValueRequest(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 com.cdptech.cdpclient.proto.StudioAPI.ValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_Hello_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_Hello_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_AuthRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_AuthRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_AuthResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_AuthResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_Container_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_Container_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_Error_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_Error_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_Info_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_Info_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_Node_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_Node_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_ChildAdd_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_ChildAdd_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_ChildRemove_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_ChildRemove_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_VariantValue_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_VariantValue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_StudioAPI_Proto_ValueRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_StudioAPI_Proto_ValueRequest_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\017studioapi.proto\022\017StudioAPI.Proto\"\247\002\n\005H" + - "ello\022\023\n\013system_name\030\001 \002(\t\022\031\n\016compat_vers" + - "ion\030\002 \002(\r:\0011\022\036\n\023incremental_version\030\003 \002(" + - "\r:\0010\022\022\n\npublic_key\030\004 \003(\014\022\021\n\tchallenge\030\005 " + - "\001(\014\022\030\n\020application_name\030\006 \001(\t\022\031\n\021cdp_ver" + - "sion_major\030\007 \001(\r\022\031\n\021cdp_version_minor\030\010 " + - "\001(\r\022\031\n\021cdp_version_patch\030\t \001(\r\022\033\n\023idle_l" + - "ockout_period\030\n \001(\r\022\037\n\027system_use_notifi" + - "cation\030\013 \001(\t\"\237\001\n\013AuthRequest\022\017\n\007user_id\030" + - "\001 \001(\t\022J\n\022challenge_response\030\002 \003(\0132..Stud" + - "ioAPI.Proto.AuthRequest.ChallengeRespons" + - "e\0323\n\021ChallengeResponse\022\014\n\004type\030\001 \001(\t\022\020\n\010" + - "response\030\002 \001(\014\"\300\001\n#AdditionalChallengeRe" + - "sponseRequired\022\014\n\004type\030\001 \001(\t\022\016\n\006prompt\030\002" + - " \001(\t\022Q\n\tparameter\030\003 \003(\0132>.StudioAPI.Prot" + - "o.AdditionalChallengeResponseRequired.Pa" + - "rameter\032(\n\tParameter\022\014\n\004name\030\001 \001(\t\022\r\n\005va" + - "lue\030\002 \001(\t\"\261\003\n\014AuthResponse\022A\n\013result_cod" + - "e\030\001 \001(\0162,.StudioAPI.Proto.AuthResponse.A" + - "uthResultCode\022\023\n\013result_text\030\002 \001(\t\022d\n&ad" + - "ditional_challenge_response_required\030\003 \003" + - "(\01324.StudioAPI.Proto.AdditionalChallenge" + - "ResponseRequired\"\342\001\n\016AuthResultCode\022\014\n\010e" + - "Unknown\020\000\022\014\n\010eGranted\020\001\022\"\n\036eGrantedPassw" + - "ordWillExpireSoon\020\002\022\030\n\024eNewPasswordRequi" + - "red\020\n\022\035\n\031eInvalidChallengeResponse\020\013\022\037\n\033" + - "eAdditionalResponseRequired\020\014\022\027\n\023eTempor" + - "arilyBlocked\020\r\022\035\n\031eReauthenticationRequi" + - "red\020\016\"\326\007\n\tContainer\0225\n\014message_type\030\001 \001(" + - "\0162\037.StudioAPI.Proto.Container.Type\022%\n\005er" + - "ror\030\002 \001(\0132\026.StudioAPI.Proto.Error\022\031\n\021str" + - "ucture_request\030\003 \003(\r\0221\n\022structure_respon" + - "se\030\004 \003(\0132\025.StudioAPI.Proto.Node\0225\n\016gette" + - "r_request\030\005 \003(\0132\035.StudioAPI.Proto.ValueR" + - "equest\0226\n\017getter_response\030\006 \003(\0132\035.Studio" + - "API.Proto.VariantValue\0225\n\016setter_request" + - "\030\007 \003(\0132\035.StudioAPI.Proto.VariantValue\022!\n" + - "\031structure_change_response\030\010 \003(\r\022\035\n\025curr" + - "ent_time_response\030\t \001(\004\0224\n\021child_add_req" + - "uest\030\n \003(\0132\031.StudioAPI.Proto.ChildAdd\022:\n" + - "\024child_remove_request\030\013 \003(\0132\034.StudioAPI." + - "Proto.ChildRemove\0225\n\017re_auth_request\030\014 \001" + - "(\0132\034.StudioAPI.Proto.AuthRequest\0227\n\020re_a" + - "uth_response\030\r \001(\0132\035.StudioAPI.Proto.Aut" + - "hResponse\"\310\002\n\004Type\022\020\n\014eRemoteError\020\000\022\025\n\021" + - "eStructureRequest\020\001\022\026\n\022eStructureRespons" + - "e\020\002\022\022\n\016eGetterRequest\020\003\022\023\n\017eGetterRespon" + - "se\020\004\022\022\n\016eSetterRequest\020\005\022\034\n\030eStructureCh" + - "angeResponse\020\006\022\027\n\023eCurrentTimeRequest\020\007\022" + - "\030\n\024eCurrentTimeResponse\020\010\022\024\n\020eChildAddRe" + - "quest\020\t\022\027\n\023eChildRemoveRequest\020\n\022\022\n\016eRea" + - "uthRequest\020\013\022\023\n\017eReauthResponse\020\014\022\031\n\025eAc" + - "tivityNotification\020\r*\010\010d\020\200\200\200\200\002\"\201\001\n\005Error" + - "\022\014\n\004code\030\001 \002(\r\022\014\n\004text\030\002 \001(\t\022\017\n\007node_id\030" + - "\003 \001(\r\022\021\n\tparameter\030\004 \001(\t\022\021\n\tchallenge\030\005 " + - "\001(\014\022\033\n\023idle_lockout_period\030\006 \001(\r*\010\010d\020\200\200\200" + - "\200\002\"\266\003\n\004Info\022\017\n\007node_id\030\001 \002(\r\022\014\n\004name\030\002 \002" + - "(\t\022/\n\tnode_type\030\003 \002(\0162\034.StudioAPI.Proto." + - "CDPNodeType\0221\n\nvalue_type\030\004 \001(\0162\035.Studio" + - "API.Proto.CDPValueType\022\021\n\ttype_name\030\005 \001(" + - "\t\022\023\n\013server_addr\030\006 \001(\t\022\023\n\013server_port\030\007 " + - "\001(\r\022\020\n\010is_local\030\010 \001(\010\022\r\n\005flags\030\t \001(\r\"\302\001\n" + - "\005Flags\022\t\n\005eNone\020\000\022\017\n\013eNodeIsLeaf\020\001\022\026\n\022eV" + - "alueIsPersistent\020\002\022\024\n\020eValueIsReadOnly\020\004" + - "\022\024\n\020eNodeIsRemovable\020\010\022\027\n\023eNodeCanAddChi" + - "ldren\020\020\022\024\n\020eNodeIsRenamable\020 \022\023\n\017eNodeIs" + - "Internal\020@\022\025\n\020eNodeIsImportant\020\200\001*\010\010d\020\200\200" + - "\200\200\002\"Z\n\004Node\022#\n\004info\030\001 \002(\0132\025.StudioAPI.Pr" + - "oto.Info\022#\n\004node\030\002 \003(\0132\025.StudioAPI.Proto" + - ".Node*\010\010d\020\200\200\200\200\002\"Y\n\010ChildAdd\022\026\n\016parent_no" + - "de_id\030\001 \002(\r\022\022\n\nchild_name\030\002 \002(\t\022\027\n\017child" + - "_type_name\030\003 \002(\t*\010\010d\020\200\200\200\200\002\"C\n\013ChildRemov" + - "e\022\026\n\016parent_node_id\030\001 \002(\r\022\022\n\nchild_name\030" + - "\002 \002(\t*\010\010d\020\200\200\200\200\002\"\222\002\n\014VariantValue\022\017\n\007node" + - "_id\030\001 \001(\r\022\017\n\007d_value\030\002 \001(\001\022\017\n\007f_value\030\003 " + - "\001(\002\022\022\n\nui64_value\030\004 \001(\004\022\021\n\ti64_value\030\005 \001" + - "(\022\022\020\n\010ui_value\030\006 \001(\r\022\017\n\007i_value\030\007 \001(\021\022\020\n" + - "\010us_value\030\010 \001(\r\022\017\n\007s_value\030\t \001(\021\022\020\n\010uc_v" + - "alue\030\n \001(\r\022\017\n\007c_value\030\013 \001(\021\022\017\n\007b_value\030\014" + - " \001(\010\022\021\n\tstr_value\030\r \001(\t\022\021\n\ttimestamp\030\016 \001" + - "(\004*\010\010d\020\200\200\200\200\002\"X\n\014ValueRequest\022\017\n\007node_id\030" + - "\001 \002(\r\022\n\n\002fs\030\002 \001(\001\022\014\n\004stop\030\003 \001(\010\022\023\n\013sampl" + - "e_rate\030\004 \001(\001*\010\010d\020\200\200\200\200\002*\325\001\n\017RemoteErrorCo" + - "de\022\032\n\026eAUTH_RESPONSE_EXPIRED\020\001\022\024\n\020eINVAL" + - "ID_REQUEST\020\n\022\037\n\033eUNSUPPORTED_CONTAINER_T" + - "YPE\020\024\022\037\n\033eVALUE_THROTTLING_OCCURRING\020\036\022\035" + - "\n\031eVALUE_THROTTLING_STOPPED\020\037\022\025\n\021eCHILD_" + - "ADD_FAILED\020(\022\030\n\024eCHILD_REMOVE_FAILED\0202*\373" + - "\001\n\013CDPNodeType\022\032\n\rCDP_UNDEFINED\020\377\377\377\377\377\377\377\377" + - "\377\001\022\016\n\nCDP_SYSTEM\020\000\022\023\n\017CDP_APPLICATION\020\001\022" + - "\021\n\rCDP_COMPONENT\020\002\022\016\n\nCDP_OBJECT\020\003\022\017\n\013CD" + - "P_MESSAGE\020\004\022\023\n\017CDP_BASE_OBJECT\020\005\022\020\n\014CDP_" + - "PROPERTY\020\006\022\017\n\013CDP_SETTING\020\007\022\014\n\010CDP_ENUM\020" + - "\010\022\020\n\014CDP_OPERATOR\020\t\022\014\n\010CDP_NODE\020\n\022\021\n\rCDP" + - "_USER_TYPE\020d*\274\001\n\014CDPValueType\022\016\n\neUNDEFI" + - "NED\020\000\022\013\n\007eDOUBLE\020\001\022\013\n\007eUINT64\020\002\022\n\n\006eINT6" + - "4\020\003\022\n\n\006eFLOAT\020\004\022\t\n\005eUINT\020\005\022\010\n\004eINT\020\006\022\013\n\007" + - "eUSHORT\020\007\022\n\n\006eSHORT\020\010\022\n\n\006eUCHAR\020\t\022\t\n\005eCH" + - "AR\020\n\022\t\n\005eBOOL\020\013\022\013\n\007eSTRING\020\014\022\r\n\teUSERTYP" + - "E\020dB*\n\033com.cdptech.cdpclient.protoB\tStud" + - "ioAPIH\003" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_StudioAPI_Proto_Hello_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_StudioAPI_Proto_Hello_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_Hello_descriptor, - new java.lang.String[] { "SystemName", "CompatVersion", "IncrementalVersion", "PublicKey", "Challenge", "ApplicationName", "CdpVersionMajor", "CdpVersionMinor", "CdpVersionPatch", "IdleLockoutPeriod", "SystemUseNotification", }); - internal_static_StudioAPI_Proto_AuthRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_StudioAPI_Proto_AuthRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_AuthRequest_descriptor, - new java.lang.String[] { "UserId", "ChallengeResponse", }); - internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_descriptor = - internal_static_StudioAPI_Proto_AuthRequest_descriptor.getNestedTypes().get(0); - internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_AuthRequest_ChallengeResponse_descriptor, - new java.lang.String[] { "Type", "Response", }); - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor, - new java.lang.String[] { "Type", "Prompt", "Parameter", }); - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_descriptor = - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_descriptor.getNestedTypes().get(0); - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_AdditionalChallengeResponseRequired_Parameter_descriptor, - new java.lang.String[] { "Name", "Value", }); - internal_static_StudioAPI_Proto_AuthResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_StudioAPI_Proto_AuthResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_AuthResponse_descriptor, - new java.lang.String[] { "ResultCode", "ResultText", "AdditionalChallengeResponseRequired", }); - internal_static_StudioAPI_Proto_Container_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_StudioAPI_Proto_Container_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_Container_descriptor, - new java.lang.String[] { "MessageType", "Error", "StructureRequest", "StructureResponse", "GetterRequest", "GetterResponse", "SetterRequest", "StructureChangeResponse", "CurrentTimeResponse", "ChildAddRequest", "ChildRemoveRequest", "ReAuthRequest", "ReAuthResponse", }); - internal_static_StudioAPI_Proto_Error_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_StudioAPI_Proto_Error_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_Error_descriptor, - new java.lang.String[] { "Code", "Text", "NodeId", "Parameter", "Challenge", "IdleLockoutPeriod", }); - internal_static_StudioAPI_Proto_Info_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_StudioAPI_Proto_Info_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_Info_descriptor, - new java.lang.String[] { "NodeId", "Name", "NodeType", "ValueType", "TypeName", "ServerAddr", "ServerPort", "IsLocal", "Flags", }); - internal_static_StudioAPI_Proto_Node_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_StudioAPI_Proto_Node_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_Node_descriptor, - new java.lang.String[] { "Info", "Node", }); - internal_static_StudioAPI_Proto_ChildAdd_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_StudioAPI_Proto_ChildAdd_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_ChildAdd_descriptor, - new java.lang.String[] { "ParentNodeId", "ChildName", "ChildTypeName", }); - internal_static_StudioAPI_Proto_ChildRemove_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_StudioAPI_Proto_ChildRemove_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_ChildRemove_descriptor, - new java.lang.String[] { "ParentNodeId", "ChildName", }); - internal_static_StudioAPI_Proto_VariantValue_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_StudioAPI_Proto_VariantValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_VariantValue_descriptor, - new java.lang.String[] { "NodeId", "DValue", "FValue", "Ui64Value", "I64Value", "UiValue", "IValue", "UsValue", "SValue", "UcValue", "CValue", "BValue", "StrValue", "Timestamp", }); - internal_static_StudioAPI_Proto_ValueRequest_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_StudioAPI_Proto_ValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_StudioAPI_Proto_ValueRequest_descriptor, - new java.lang.String[] { "NodeId", "Fs", "Stop", "SampleRate", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/proto/studioapi.proto b/src/main/proto/studioapi.proto new file mode 100644 index 0000000..a9f6194 --- /dev/null +++ b/src/main/proto/studioapi.proto @@ -0,0 +1,398 @@ +// This file describes the StudioAPI wire protocol. It can be compiled with +// the Google Protobuf protoc compiler into native C++, Java, Python etc. + +syntax = "proto2"; + +package StudioAPI.Proto; + +option optimize_for = LITE_RUNTIME; +option java_package = "com.cdptech.cdpclient.proto"; +option java_outer_classname = "StudioAPI"; + +/** Initial server connection response. */ +message Hello { + required string system_name = 1; + required uint32 compat_version = 2 [default = 4]; + required uint32 incremental_version = 3 [default = 0]; + repeated bytes public_key = 4; + optional bytes challenge = 5; // if challenge exists then server expects authentication (AuthRequest message) + optional string application_name = 6; + optional uint32 cdp_version_major = 7; + optional uint32 cdp_version_minor = 8; + optional uint32 cdp_version_patch = 9; + optional uint32 idle_lockout_period = 10; + optional string system_use_notification = 11; + message SuggestedUser { + optional string user_id = 1; + optional string first_name = 2; + optional string last_name = 3; + } + repeated SuggestedUser suggested_users = 12; +} + +/** Server expects this response if it sent a auth_required true. */ +message AuthRequest { + optional string user_id = 1; // case-insensitive (can be sent in any casing) + message ChallengeResponse { + optional string type = 1; + optional bytes response = 2; // data corresponding to the type, eg. hash(challenge + password) + } + repeated ChallengeResponse challenge_response = 2; +} + +message AdditionalChallengeResponseRequired { + optional string type = 1; + optional string prompt = 2; + message Parameter { + optional string name = 1; + optional string value = 2; + } + repeated Parameter parameter = 3; +} + +/** Sent by server as a response to a AuthRequest. */ +message AuthResponse { + enum AuthResultCode { + eCredentialsRequired = 0; + eGranted = 1; + eGrantedPasswordWillExpireSoon = 2; // expiry timestamp is provided in result_text + eNewPasswordRequired = 10; // AuthRequest with additional response with new username + password hash is required + eInvalidChallengeResponse = 11; // challenge response sent was invalid + eAdditionalResponseRequired = 12; // additional challenge responses based on additional credential types are required + eTemporarilyBlocked = 13; // authentication is temporarily blocked because of too many failed attempts + eReauthenticationRequired = 14; // server requires re-authentication (e.g. because of being idle), implementation + // should prompt the user for re-authentication (must not silently send challenge response based on cached credentials) + } + optional AuthResultCode result_code = 1; + optional string result_text = 2; + repeated AdditionalChallengeResponseRequired additional_challenge_response_required = 3; + repeated string role_assigned = 4; // role name assigned (only when AuthResultCode = eGranted or eGrantedPasswordWillExpireSoon) +} + +/** Common union-style base type for all Protobuf messages in StudioAPI. */ +message Container { + enum Type { + eRemoteError = 0; + eStructureRequest = 1; + eStructureResponse = 2; + eGetterRequest = 3; + eGetterResponse = 4; + eSetterRequest = 5; // since compat_version=3, it will be responded with eGetterResponse with actually set value + eStructureChangeResponse = 6; + eCurrentTimeRequest = 7; + eCurrentTimeResponse = 8; + eChildAddRequest = 9; + eChildRemoveRequest = 10; + eReauthRequest = 11; + eReauthResponse = 12; + eActivityNotification = 13; + eEventRequest = 14; // supported since compat_version=2 + eEventResponse = 15; // supported since compat_version=2 + eServicesRequest = 16; // supported since compat_version=4 + eServicesNotification = 17; // supported since compat_version=4 + eServiceMessage = 18; // supported since version compat_version=4 + eMetadataRequest = 19; // supported since compat_version=4 + eMetadataUpdateRequest = 20; // supported since compat_version=4 + eMetadataResponse = 21; // supported since compat_version=4, will be automatically sent also later on, on metadata changes + } + optional Type message_type = 1; + optional Error error = 2; + repeated uint32 structure_request = 3; + repeated Node structure_response = 4; + repeated ValueRequest getter_request = 5; + repeated VariantValue getter_response = 6; + repeated VariantValue setter_request = 7; + repeated uint32 structure_change_response = 8; // node ID's which need new structure request. For resilience reasons, client must respond to it with either + // structure_requests for all these node ID's or with empty structure_request with corresponding + // structure_change_response requestId(s) added, whose structure is not needed any more for the client + optional uint64 current_time_response = 9; + repeated ChildAdd child_add_request = 10; + repeated ChildRemove child_remove_request = 11; + optional AuthRequest re_auth_request = 12; + optional AuthResponse re_auth_response = 13; + repeated EventRequest event_request = 14; // supported since compat_version=2 + repeated EventInfo event_response = 15; // supported since compat_version=2 + repeated uint32 request_ids = 16 [packed=true] ; // Supported since compat_version=3. If present, it is a list of client-generated + // request id-s in same order as individual requests in the Container + // When present, server responses the same request id values back the same way + // corresponding by order to every response element in the Container. On error the + // id will be echoed back within the Error message. + // Note, that subsequent subscription value change or event Containers (except the first, + // subscription confirmation response message Container), that are not a direct + // response to any request, do not have this field set. + // Note, that zero value means that the request corresponding to that position in Container + // has no actual requestId assigned, and is packed to the list only to match the vector + // size in case when some other requests in the Container has requestId. + optional ServicesRequest services_request = 17; // supported since compat_version=4 + optional ServicesNotification services_notification = 18; // supported since compat_version=4 + repeated ServiceMessage service_message = 19; // supported since compat_version=4 + repeated MetadataRequest metadata_request = 20; // supported since compat_version=4 + repeated Metadata metadata = 21; // supported since compat_version=4, used for eMetadataUpdateRequest and eMetadataResponse + extensions 100 to max; +} + +/** Error message type. */ +message Error { + required uint32 code = 1; + optional string text = 2; + optional uint32 node_id = 3; + optional string parameter = 4; + optional bytes challenge = 5; // new challenge for re-authentication, used with code = eAUTH_RESPONSE_EXPIRED + optional uint32 idle_lockout_period = 6; // updated value for idle lockout period, used with code = eAUTH_RESPONSE_EXPIRED + extensions 100 to max; +} + +enum RemoteErrorCode { + eAUTH_RESPONSE_EXPIRED = 1; // connection is in non-authenticated state (e.g. because of session inactivity timeout) - + // full reconnect or new AuthRequest with ChallengeResponse is needed to continue + eINVALID_REQUEST = 10; + eUNSUPPORTED_CONTAINER_TYPE = 20; + eVALUE_THROTTLING_OCCURRING = 30; + eVALUE_THROTTLING_STOPPED = 31; + eCHILD_ADD_FAILED = 40; + eCHILD_REMOVE_FAILED = 50; + eNODE_NOT_FOUND = 60; + eINTERNAL_ERROR = 70; +} + +/** CDP Node base type identifier. */ +enum CDPNodeType { + CDP_UNDEFINED = -1; + CDP_SYSTEM = 0; + CDP_APPLICATION = 1; + CDP_COMPONENT = 2; + CDP_OBJECT = 3; + CDP_MESSAGE = 4; + CDP_BASE_OBJECT = 5; + CDP_PROPERTY = 6; + CDP_SETTING = 7; + CDP_ENUM = 8; + CDP_OPERATOR = 9; + CDP_NODE = 10; + CDP_USER_TYPE = 100; +} + +/** CDP Node value type identifier. */ +enum CDPValueType { + eUNDEFINED = 0; + eDOUBLE = 1; + eUINT64 = 2; + eINT64 = 3; + eFLOAT = 4; + eUINT = 5; + eINT = 6; + eUSHORT = 7; + eSHORT = 8; + eUCHAR = 9; + eCHAR = 10; + eBOOL = 11; + eSTRING = 12; + eUSERTYPE = 100; +} + +/** A single CDPNode property container. */ +message Info { + enum Flags { + eNone = 0; + eNodeIsLeaf = 1; + eValueIsPersistent = 2; + eValueIsReadOnly = 4; + eNodeIsRemovable = 8; + eNodeCanAddChildren = 16; + eNodeIsRenamable = 32; + eNodeIsInternal = 64; + eNodeIsImportant = 128; + } + required uint32 node_id = 1; // Application wide unique ID for each instance in CDP structure + required string name = 2; // Local short name + required CDPNodeType node_type = 3; // Direct base type, type of the class + optional CDPValueType value_type = 4; // Value primitive type the node holds if node may hold a value + optional string type_name = 5; // Real class name + optional string server_addr = 6; // If this node signifies another CDP application, + // this field will be the IP of said application's StudioAPIServer + optional uint32 server_port = 7; // .. and this is the port of the application's StudioAPIServer + optional bool is_local = 8; // if multiple applications are sent back from the server, + // this flag is set to true for the app that the data was requested from + optional uint32 flags = 9; + extensions 100 to max; +} + +/** CDP structure response data structure, a tree of Info properties. */ +message Node { + required Info info = 1; + repeated Node node = 2; + extensions 100 to max; +} + +/** ChildAdd Request input structure */ +message ChildAdd { + required uint32 parent_node_id = 1; // parent to add the node into + required string child_name = 2; // child name to be added + required string child_type_name = 3; // child class name + extensions 100 to max; +} + +/** ChildRemove Request input structure */ +message ChildRemove { + required uint32 parent_node_id = 1; // parent to remove the node from + required string child_name = 2; // child to be removed + extensions 100 to max; +} + +/** Common Variant value type for a remote node. */ +message VariantValue { + optional uint32 node_id = 1; + optional double d_value = 2; + optional float f_value = 3; + optional uint64 ui64_value = 4; + optional sint64 i64_value = 5; + optional uint32 ui_value = 6; + optional sint32 i_value = 7; + optional uint32 us_value = 8; // uint used as ushort (which protobuf doesnt have) + optional sint32 s_value = 9; // int used as short + optional uint32 uc_value = 10; // uint used as uchar + optional sint32 c_value = 11; // int used as char + optional bool b_value = 12; + optional string str_value = 13; + optional uint64 timestamp = 14; // Source may provide timestamp for sent value + // (UTC nanotime) + extensions 100 to max; +} + +/** Single and periodic value request message. */ +message ValueRequest { + required uint32 node_id = 1; // Node ID whose value is requested + optional double fs = 2; // If present (and stop is not present), indicates that the request is value-change subscription + // and values are expected no often than provided FS rate (server should accumulate and time-stamp values when occurred more often) + // Note, that this also causes server to send a node last known value immediately, + // on subscription start, to confirm the subscription was started. + optional bool stop = 3; // If true target must stop updates on the provided values else this is start + optional double sample_rate = 4; // If non zero indicates that values should be + // sampled with given sampling rate frequency (samples/second) + // missing or zero means all samples must be provided + optional uint32 inactivity_resend_interval = 5; // Supported since compat_version=3. If provided, then server will start to + // resend the current value, whenever the node_id had no value-changes + // during given interval (in seconds), useful for confirmation that the + // subscription is still alive and server is still able to send this node values. + extensions 100 to max; +} + +/** CDP Event request message. */ +message EventRequest { + optional uint32 node_id = 1; // Target should forward events sent by this node ID (and its children) + optional uint64 starting_from = 2; // If present, target should re-forward history of past events starting from this timestamp + optional bool stop = 3; // If true, target must stop sending any new events, else this is subscribe request for future events + optional uint32 inactivity_resend_interval = 4; // Supported since compat_version=3. If provided, then server will start + // to resend the last event (or "empty" event with code=0, and timestamp=0, + // when no event matches the request parameters), whenever the node_id (or its children) + // had no new events during given interval (in seconds), useful for confirmation + // that the subscription is still alive and server is still able to send this node events. + // Note, that this also causes server to send a last happened event immediately, + // on subscription start, to confirm the subscription was started. + extensions 100 to max; +} + +/** CDP Event info */ +message EventInfo { + repeated uint32 node_id = 1; // List of node ID's (requesters) that this event relates to (is sent by it or its children) + optional uint64 id = 2; // system unique eventId (CDP eventId + handle) + optional string sender = 3; // event sender full name + enum CodeFlags { + aAlarmSet = 1; // The alarm's Set flag/state was set. The alarm changed state to "Unack-Set" (The Unack flag was set if not already set) + eAlarmClr = 2; // The alarm's Set flag was cleared. The Unack state is unchanged. + eAlarmAck = 4; // The alarm changed state from "Unacknowledged" to "Acknowledged". The Set state is unchanged. + eReprise = 64; // A repetition/update of an event that has been reported before. Courtesy of late subscribers. + eSourceObjectUnavailable = 256; // The provider of the event has become unavailable (disconnected or similar) + eNodeBoot = 1073741824; // The provider reports that the CDPEventNode just have booted. + } + optional uint32 code = 4; // event code flags + optional uint32 status = 5; // new status of the object caused event, after the event + optional uint64 timestamp = 6; // time stamp, when this event was sent (in UTC nanotime) + message EventData { + optional string name = 1; + optional string value = 2; + } + repeated EventData data = 7; + optional string ack_handler_node_name = 8; // Node name that should be set to ack the alarm. Can be either sender child name or full name of the node. + repeated string ack_handler_param_data_names = 9; // EventData names, whose values should be posted to the ack handler node (in form of semicolon-separated list of name=value pairs) + extensions 100 to max; +} + +/** + * Generic Services Support - supported since compat_version=4. + * + * This allows users to register and handle custom services within a CDP application (using the + * `ICDPAdapter::GetCDPAdapter().GetServiceRegistry()` interface), and clients to discover + * and connect to these services. Services are application-specific, and their semantics and protocols are outside + * of the StudioAPI scope. StudioAPI only provides the discovery and connection management + * functionality. Service messages are exchanged using the ServiceMessage message type. + * + * Note, all service-related messages must be wrapped within the Container message. + */ + +/** + * A request to get the list of available services, and optionally subscribe to changes. + * Sent by the client. The server responds with a ServicesNotification message. + */ +message ServicesRequest { + optional bool subscribe = 1; // If true, target must send ServicesNotification every time the list of services changes + optional bool stop = 2; // If true, target must stop sending any new ServicesNotifications + optional uint32 inactivity_resend_interval = 3; // Supported since compat_version=4. If provided, then server will start to + // resend the current services list, whenever there were no changes + // during given interval (in seconds), useful for confirmation that the + // subscription is still alive and server is still able to send this info. +} + +/** + * A response to ServicesRequest. Sent by the server to announce the available services. + * If subscribed, the message is resent every time the list changes. + */ +message ServicesNotification { + repeated ServiceInfo services = 1; // list of available services or empty if no services are available +} + +message ServiceInfo { + optional uint64 service_id = 1; // unique ID (unique within one app). Matches ServiceMessage.service_id + optional string name = 2; // human-readable name + optional string type = 3; // service type, e.g. "websocketproxy" + map metadata = 4; // optional extra data describing the service +} + +/** The main message type for service communication */ +message ServiceMessage { + enum Kind { + eConnect = 0; // connects to a new service instance (sent by the client and the client sets the instance_id). + // Note, requiring eConnect to be sent first is optional for a service, + // services can allow sending eData directly without prior eConnect. + eConnected = 1; // response to eConnect (sent by the server and contains the same instance_id as the eConnect did) + eDisconnect = 2; // close and disconnect the service instance (can be sent by either client or server) + eData = 3; // fills payload with service-specific data (can be sent by either client or server) + eError = 4; // instance cannot be initialized or has an error (implies eDisconnect) + } + optional uint64 service_id = 1; // matches ServiceInfo.id + optional uint64 instance_id = 2 [default = 0]; // allows having multiple instances of a service + optional Kind kind = 3; // type of the message + optional bytes payload = 4; // message data - usually used with eData but any Kind may have a service-specific payload +} + + +message MetadataRequest { + required uint32 node_id = 1; // Node ID, whose metadata it is + optional bool stop = 2; // When existing it alters the metadata subscription status: + // if true, target must stop sending any new metadata, else this is subscribe start + optional uint32 inactivity_resend_interval = 3; // If provided, then server will start to resend the current metadata, + // whenever the node_id had no metadata-changes during given interval + // (in seconds), useful for confirmation that the subscription is still + // alive and server is still able to send this node metadata. +} + +/** Node Metadata entry */ +message MetadataEntry { + optional string name = 1; + optional string value = 2; +} + +message Metadata { + required uint32 node_id = 1; // Node ID, whose metadata it is + repeated MetadataEntry metadata = 2; +} diff --git a/src/test/java/com/cdptech/cdpclient/AuthenticationProtocolTest.java b/src/test/java/com/cdptech/cdpclient/AuthenticationProtocolTest.java new file mode 100644 index 0000000..244fc1a --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/AuthenticationProtocolTest.java @@ -0,0 +1,97 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import static org.junit.Assert.*; + +import com.cdptech.cdpclient.proto.StudioAPI; + +import org.junit.Before; +import org.junit.Test; + +import java.net.URI; +import java.util.Base64; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +public class AuthenticationProtocolTest { + + private CapturingTransport transport; + private AtomicInteger finishedCount; + private AuthenticationProtocol protocol; + private String publicKeyPem; + + @Before + public void setUp() throws Exception { + transport = new CapturingTransport(); + finishedCount = new AtomicInteger(); + protocol = new AuthenticationProtocol(transport, finishedCount::incrementAndGet); + + java.security.KeyPairGenerator generator = java.security.KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + publicKeyPem = "-----BEGIN PUBLIC KEY-----\n" + + Base64.getMimeEncoder().encodeToString(generator.generateKeyPair().getPublic().getEncoded()) + + "\n-----END PUBLIC KEY-----\n"; + } + + @Test + public void encryptedPasswordChallenge_reissuesAutomaticallyWithoutFinishing() throws Exception { + protocol.authenticate("challenge", credentials()); + + assertEquals(1, transport.sent.size()); + assertTrue(hasChallengeType(transport.sent.get(0), "PasswordHash")); + assertFalse(hasChallengeType(transport.sent.get(0), "EncryptedPassword")); + assertEquals("must not finish before the encrypted-password round", 0, finishedCount.get()); + + protocol.parse(encryptedPasswordRequest().toByteArray()); + + assertEquals("server's EncryptedPassword request should auto reissue", 2, transport.sent.size()); + assertEquals("reissue must not prompt the user / finish", 0, finishedCount.get()); + assertTrue(hasChallengeType(transport.sent.get(1), "PasswordHash")); + assertTrue(hasChallengeType(transport.sent.get(1), "EncryptedPassword")); + + protocol.parse(grantedResponse().toByteArray()); + + assertEquals("granted response should not send anything more", 2, transport.sent.size()); + assertEquals(1, finishedCount.get()); + } + + private Map credentials() { + Map data = new HashMap<>(); + data.put(AuthRequest.USER, "operator"); + data.put(AuthRequest.PASSWORD, "pw"); + return data; + } + + private StudioAPI.AuthResponse encryptedPasswordRequest() { + return StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eAdditionalResponseRequired) + .addAdditionalChallengeResponseRequired(StudioAPI.AdditionalChallengeResponseRequired.newBuilder() + .setType("EncryptedPassword") + .setPrompt("") // the server always sets prompt (empty for EncryptedPassword) and its presence is required + .addParameter(StudioAPI.AdditionalChallengeResponseRequired.Parameter.newBuilder() + .setName("PasswordEncryptionPublicKey") + .setValue(publicKeyPem))) + .build(); + } + + private StudioAPI.AuthResponse grantedResponse() { + return StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eGranted) + .build(); + } + + private static boolean hasChallengeType(byte[] authRequestBytes, String type) throws Exception { + StudioAPI.AuthRequest request = StudioAPI.AuthRequest.parseFrom(authRequestBytes); + for (StudioAPI.AuthRequest.ChallengeResponse cr : request.getChallengeResponseList()) { + if (type.equals(cr.getType())) { + return true; + } + } + return false; + } +} diff --git a/src/test/java/com/cdptech/cdpclient/AuthenticatorTest.java b/src/test/java/com/cdptech/cdpclient/AuthenticatorTest.java new file mode 100644 index 0000000..372cf0d --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/AuthenticatorTest.java @@ -0,0 +1,351 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import static org.junit.Assert.*; + +import com.cdptech.cdpclient.proto.StudioAPI; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import javax.crypto.Cipher; +import java.io.ByteArrayOutputStream; +import java.nio.charset.StandardCharsets; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.MessageDigest; +import java.util.Arrays; +import java.util.Base64; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +public class AuthenticatorTest { + + private static final String USER = "operator"; + private static final String PASSWORD = "s3cret-pässw0rd"; + private static final String CHALLENGE = "challenge-bytes-1234"; + + private static KeyPair rsaKeyPair; + private static String publicKeyPem; + + private Authenticator authenticator; + + @BeforeClass + public static void generateKeyPair() throws Exception { + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + rsaKeyPair = generator.generateKeyPair(); + publicKeyPem = "-----BEGIN PUBLIC KEY-----\n" + + Base64.getMimeEncoder().encodeToString(rsaKeyPair.getPublic().getEncoded()) + + "\n-----END PUBLIC KEY-----\n"; + } + + @Before + public void setUp() { + authenticator = new Authenticator(); + } + + /** Additional challenges in the response become Credentials with their parameters. */ + @Test + public void additionalChallenges_areParsedFromResponse() { + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + + List additional = authenticator.getUserAuthResult().getAdditionalCredentials(); + assertEquals(AuthRequest.AuthResultCode.ADDITIONAL_RESPONSE_REQUIRED, + authenticator.getUserAuthResult().getCode()); + assertEquals(1, additional.size()); + assertEquals("EncryptedPassword", additional.get(0).getType()); + assertEquals("", additional.get(0).getPrompt()); + assertEquals(publicKeyPem, additional.get(0).getParameters().get("PasswordEncryptionPublicKey")); + } + + @Test + public void encryptedPasswordResponse_decryptsToChallengePlusPassword() throws Exception { + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, credentials(PASSWORD)); + + byte[] cipherText = encryptedPasswordResponseBytes(request); + assertNotNull("EncryptedPassword challenge response expected", cipherText); + assertEquals(CHALLENGE + PASSWORD, decrypt(cipherText)); + // The PasswordHash response is still sent alongside the encrypted one. + assertTrue(hasChallengeResponseOfType(request, "PasswordHash")); + } + + @Test + public void encryptedPassword_chunksInputLongerThanOneRsaBlock() throws Exception { + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + String longPassword = repeat("p", 400); // challenge + password > 245 bytes -> multiple RSA blocks + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, credentials(longPassword)); + + byte[] cipherText = encryptedPasswordResponseBytes(request); + assertEquals(0, cipherText.length % 256); // 2048-bit key -> 256-byte ciphertext blocks + assertTrue("expected more than one RSA block", cipherText.length > 256); + assertEquals(CHALLENGE + longPassword, decrypt(cipherText)); + } + + @Test + public void noEncryptedPasswordResponse_whenServerDidNotRequestIt() { + // No additional challenge -> only PasswordHash, never EncryptedPassword. + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, credentials(PASSWORD)); + + assertNull(encryptedPasswordResponseBytes(request)); + assertTrue(hasChallengeResponseOfType(request, "PasswordHash")); + } + + @Test + public void clearCachedCredentials_stopsAutomaticChallengeReissue() { + // Prime a re-authentication cycle: the server requests EncryptedPassword and the credentials are cached + // so the cycle's challenge can be answered without re-prompting. + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + authenticator.createAuthMessage(CHALLENGE, credentials(PASSWORD)); // caches the attempt + assertNotNull("within the cycle the challenge is answered from the cache", + authenticator.encryptedPasswordReissueRequest(CHALLENGE)); + + authenticator.clearCachedCredentials(); // the cycle was granted + + assertNull("a later idle-lock challenge must prompt the user, not reuse cached credentials", + authenticator.encryptedPasswordReissueRequest(CHALLENGE)); + } + + @Test + public void reissue_answersFromSnapshotWhenCallerScrubsTheMap() throws Exception { + // The caller owns the credentials map and may scrub it after accept() returns. The reissue + // answers from the cached copy. + Map data = credentials(PASSWORD); + authenticator.createAuthMessage(CHALLENGE, data); + data.clear(); // caller scrubs the password + + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + StudioAPI.AuthRequest reissue = authenticator.encryptedPasswordReissueRequest(CHALLENGE); + + assertNotNull("reissue must be answered from the cached snapshot", reissue); + assertEquals(CHALLENGE + PASSWORD, decrypt(encryptedPasswordResponseBytes(reissue))); + } + + @Test + public void emptyCachedPassword_doesNotReissue() { + // An empty cached password cannot answer the EncryptedPassword challenge. Reissuing would send + // zero-response requests in a loop instead of re-prompting the user. + authenticator.createAuthMessage(CHALLENGE, credentials("")); // caches the empty-password attempt + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + + assertNull(authenticator.encryptedPasswordReissueRequest(CHALLENGE)); + } + + @Test + public void emptyPassword_sendsNoPasswordResponses() { + // An empty password sends neither PasswordHash nor EncryptedPassword. The server rejects the request + // and the client prompts again. + authenticator.updateUserAuthResult(encryptedPasswordChallengeResponse()); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, credentials("")); + + assertEquals(0, request.getChallengeResponseCount()); + } + + @Test + public void newPassword_sendsNewPasswordHashAlongsidePasswordHash() throws Exception { + // NewPasswordHash carries passwordHash(user, newPassword) directly. Only the current password is + // challenge-hashed. + Map data = credentials(PASSWORD); + data.put(AuthRequest.NEW_PASSWORD, "new-s3cret"); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, data); + + byte[] response = challengeResponseOfType(request, "NewPasswordHash"); + assertNotNull("NewPasswordHash response expected", response); + assertArrayEquals(sha256(USER + ":" + "new-s3cret"), response); + assertTrue(hasChallengeResponseOfType(request, "PasswordHash")); + } + + @Test + public void passwordHash_matchesIndependentlyComputedWireVector() throws Exception { + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, credentials(PASSWORD)); + + assertArrayEquals(expectedPasswordHashResponse(USER, PASSWORD), + challengeResponseOfType(request, "PasswordHash")); + } + + @Test + public void passwordHash_lowercasesAsciiOnly_localeIndependently() throws Exception { + Locale defaultLocale = Locale.getDefault(); + try { + Locale.setDefault(new Locale("tr", "TR")); // locale-sensitive lowercasing would map 'I' to dotless 'ı' + Map data = new HashMap<>(); + data.put(AuthRequest.USER, "IVAN"); + data.put(AuthRequest.PASSWORD, PASSWORD); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, data); + + assertArrayEquals(expectedPasswordHashResponse("ivan", PASSWORD), + challengeResponseOfType(request, "PasswordHash")); + } finally { + Locale.setDefault(defaultLocale); + } + } + + @Test + public void passwordHash_lowercasesOnlyAsciiLetters() throws Exception { + // The server-side hash lower-cases ASCII 'A'-'Z' only. Non-ASCII letters pass through unchanged. + Map data = new HashMap<>(); + data.put(AuthRequest.USER, "JÖRG"); + data.put(AuthRequest.PASSWORD, PASSWORD); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, data); + + assertArrayEquals(expectedPasswordHashResponse("jÖrg", PASSWORD), + challengeResponseOfType(request, "PasswordHash")); + } + + @Test + public void emptyNewPassword_sendsNoNewPasswordHash() { + // An empty new password would otherwise be hashed and set on the account. + Map data = credentials(PASSWORD); + data.put(AuthRequest.NEW_PASSWORD, ""); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, data); + + assertFalse(hasChallengeResponseOfType(request, "NewPasswordHash")); + } + + @Test + public void noResultCode_isDenied() { + // An AuthResponse without result_code is a denial. + authenticator.updateUserAuthResult(StudioAPI.AuthResponse.newBuilder().build()); + + assertEquals(AuthRequest.AuthResultCode.INVALID_CHALLENGE_RESPONSE, + authenticator.getUserAuthResult().getCode()); + } + + @Test + public void rolesAssigned_arePopulatedFromResponse() { + StudioAPI.AuthResponse response = StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eGranted) + .addRoleAssigned("operator") + .addRoleAssigned("admin") + .build(); + + authenticator.updateUserAuthResult(response); + + assertEquals(Arrays.asList("operator", "admin"), authenticator.getUserAuthResult().getRolesAssigned()); + } + + @Test + public void missingUserName_yieldsUsernameRequired() { + Map noUser = new HashMap<>(); + noUser.put(AuthRequest.PASSWORD, PASSWORD); + + StudioAPI.AuthRequest request = authenticator.createAuthMessage(CHALLENGE, noUser); + + assertNull("no user id -> no AuthRequest is built", request); + assertEquals(AuthRequest.AuthResultCode.USERNAME_REQUIRED, authenticator.getUserAuthResult().getCode()); + assertEquals("Username required", authenticator.getUserAuthResult().getText()); + } + + @Test + public void emptyUserName_yieldsUsernameRequired() { + Map emptyUser = credentials(PASSWORD); + emptyUser.put(AuthRequest.USER, ""); + + assertNull("an empty user id -> no AuthRequest is built", authenticator.createAuthMessage(CHALLENGE, emptyUser)); + assertEquals(AuthRequest.AuthResultCode.USERNAME_REQUIRED, authenticator.getUserAuthResult().getCode()); + } + + @Test + public void encryptedPasswordRequestWithoutKey_surfacesTheResult() { + // The server asks for EncryptedPassword with no key when it has none to offer. + authenticator.createAuthMessage(CHALLENGE, credentials(PASSWORD)); + StudioAPI.AuthResponse response = StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eCredentialsRequired) + .setResultText("LDAP auth password encryption key not available!") + .addAdditionalChallengeResponseRequired(StudioAPI.AdditionalChallengeResponseRequired.newBuilder() + .setType("EncryptedPassword") + .setPrompt("")) + .build(); + + authenticator.updateUserAuthResult(response); + + assertNull(authenticator.encryptedPasswordReissueRequest(CHALLENGE)); + assertEquals(AuthRequest.AuthResultCode.CREDENTIALS_REQUIRED, authenticator.getUserAuthResult().getCode()); + } + + private StudioAPI.AuthResponse encryptedPasswordChallengeResponse() { + return StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eAdditionalResponseRequired) + .addAdditionalChallengeResponseRequired(StudioAPI.AdditionalChallengeResponseRequired.newBuilder() + .setType("EncryptedPassword") + .setPrompt("") // the server always sets prompt (empty for EncryptedPassword) and its presence is required + .addParameter(StudioAPI.AdditionalChallengeResponseRequired.Parameter.newBuilder() + .setName("PasswordEncryptionPublicKey") + .setValue(publicKeyPem))) + .build(); + } + + private Map credentials(String password) { + Map data = new HashMap<>(); + data.put(AuthRequest.USER, USER); + data.put(AuthRequest.PASSWORD, password); + return data; + } + + private static byte[] encryptedPasswordResponseBytes(StudioAPI.AuthRequest request) { + return challengeResponseOfType(request, "EncryptedPassword"); + } + + private static byte[] challengeResponseOfType(StudioAPI.AuthRequest request, String type) { + for (StudioAPI.AuthRequest.ChallengeResponse cr : request.getChallengeResponseList()) { + if (type.equals(cr.getType())) { + return cr.getResponse().toByteArray(); + } + } + return null; + } + + private static byte[] sha256(String text) throws Exception { + return MessageDigest.getInstance("SHA-256").digest(text.getBytes(StandardCharsets.UTF_8)); + } + + /** Recomputes the expected PasswordHash wire bytes from primitives: sha256(challenge + ":" + sha256(lowercasedUser + ":" + password)). */ + private static byte[] expectedPasswordHashResponse(String lowercasedUser, String password) throws Exception { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + buffer.write(CHALLENGE.getBytes(StandardCharsets.UTF_8)); + buffer.write(':'); + buffer.write(sha256(lowercasedUser + ":" + password)); + return MessageDigest.getInstance("SHA-256").digest(buffer.toByteArray()); + } + + private static boolean hasChallengeResponseOfType(StudioAPI.AuthRequest request, String type) { + for (StudioAPI.AuthRequest.ChallengeResponse cr : request.getChallengeResponseList()) { + if (type.equals(cr.getType())) { + return true; + } + } + return false; + } + + private String decrypt(byte[] cipherText) throws Exception { + Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); + cipher.init(Cipher.DECRYPT_MODE, rsaKeyPair.getPrivate()); + ByteArrayOutputStream plain = new ByteArrayOutputStream(); + for (int offset = 0; offset < cipherText.length; offset += 256) { + plain.write(cipher.doFinal(cipherText, offset, 256)); + } + return new String(plain.toByteArray(), StandardCharsets.UTF_8); + } + + private static String repeat(String s, int times) { + StringBuilder sb = new StringBuilder(s.length() * times); + for (int i = 0; i < times; i++) { + sb.append(s); + } + return sb.toString(); + } +} diff --git a/src/test/java/com/cdptech/cdpclient/CapturingTransport.java b/src/test/java/com/cdptech/cdpclient/CapturingTransport.java new file mode 100644 index 0000000..727a9fc --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/CapturingTransport.java @@ -0,0 +1,27 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.LinkedBlockingQueue; + +/** A Transport that records sent frames instead of writing them to a socket. */ +class CapturingTransport extends Transport { + final List sent = new ArrayList<>(); + byte[] last; + + CapturingTransport() throws URISyntaxException { + super(new URI("ws://localhost:1"), new LinkedBlockingQueue<>(), e -> { }); + } + + @Override + public void send(byte[] data) { + sent.add(data); + last = data; + } +} diff --git a/src/test/java/com/cdptech/cdpclient/ClientReauthTest.java b/src/test/java/com/cdptech/cdpclient/ClientReauthTest.java new file mode 100644 index 0000000..f39058c --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/ClientReauthTest.java @@ -0,0 +1,449 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import java.lang.reflect.Field; +import java.net.URI; +import java.security.cert.Certificate; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ClientReauthTest { + + private static final Map NO_USERNAME = new HashMap<>(); + private static final Map CREDENTIALS = credentials("user", "secret"); + private static final Map WRONG = credentials("user", "wrong"); + private static final Map WRONG_AGAIN = credentials("user", "wrong2"); + + /** A username-less answer fails this client's own check during delivery, which opens one correction prompt. */ + @Test + public void reauthWithMissingUsername_opensOneCorrectionPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + + client.requestReauthentication(a.cycleStart(client)); + prompts.get(0).accept(NO_USERNAME); + + assertEquals(2, prompts.size()); + assertTrue(a.accepted.isEmpty()); + } + + /** Two connections fail on the same username-less answer. The second joins the correction prompt the first opened. */ + @Test + public void reauthWithMissingUsername_twoConnectionsShareTheCorrectionPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + assertEquals(1, prompts.size()); + + prompts.get(0).accept(NO_USERNAME); + assertEquals(2, prompts.size()); + + prompts.get(1).accept(CREDENTIALS); + assertEquals(Arrays.asList("A:secret"), a.accepted); + assertEquals(Arrays.asList("B:secret"), b.accepted); + } + + /** The correction prompt is answered at once, while the username-less answer is still being delivered to the second connection. */ + @Test + public void reauthWithMissingUsername_correctionAnsweredDuringDelivery_servesBothConnections() throws Exception { + Client client = new Client(); + List prompts = record(client, 2, CREDENTIALS); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(NO_USERNAME); + + assertEquals(2, prompts.size()); + assertEquals(Arrays.asList("A:secret"), a.accepted); + assertEquals(Arrays.asList("B:secret"), b.accepted); + } + + /** The correction prompt is rejected at once during the first delivery. Both connections are rejected. */ + @Test + public void reauthWithMissingUsername_correctionRejectedDuringDelivery_rejectsBothConnections() throws Exception { + Client client = new Client(); + List prompts = record(client, 2, null); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(NO_USERNAME); + + assertEquals(2, prompts.size()); + assertEquals(Arrays.asList("A"), a.rejected); + assertEquals(Arrays.asList("B"), b.rejected); + assertTrue(a.accepted.isEmpty() && b.accepted.isEmpty()); + } + + /** The correction prompt is answered without a username as well. A third prompt takes over and serves both connections. */ + @Test + public void reauthWithMissingUsername_correctionAnsweredWithoutUsernameAgain_thirdPromptServesBoth() throws Exception { + Client client = new Client(); + List prompts = record(client, 2, NO_USERNAME); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(NO_USERNAME); + assertEquals(3, prompts.size()); + + prompts.get(2).accept(CREDENTIALS); + assertEquals(Arrays.asList("A:secret"), a.accepted); + assertEquals(Arrays.asList("B:secret"), b.accepted); + } + + /** The server rejects the answer later. A correction prompt opens and the rejected credentials stay unsent. */ + @Test + public void reauthAnswerRejectedByServer_opensCorrectionPromptWithoutReplay() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + + client.requestReauthentication(a.cycleStart(client)); + prompts.get(0).accept(WRONG); + assertEquals(Arrays.asList("A:wrong"), a.accepted); + + client.requestReauthentication(a.serverRejection(client)); + assertEquals(2, prompts.size()); + assertEquals(Arrays.asList("A:wrong"), a.accepted); + + prompts.get(1).accept(CREDENTIALS); + assertEquals(Arrays.asList("A:wrong", "A:secret"), a.accepted); + } + + /** Two connections share the rejected answer. The second rejection joins the correction prompt the first opened. */ + @Test + public void reauthAnswerRejectedByServer_secondConnectionJoinsTheCorrectionPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(WRONG); + client.requestReauthentication(a.serverRejection(client)); + client.requestReauthentication(b.serverRejection(client)); + assertEquals(2, prompts.size()); + + prompts.get(1).accept(CREDENTIALS); + assertEquals(Arrays.asList("A:wrong", "A:secret"), a.accepted); + assertEquals(Arrays.asList("B:wrong", "B:secret"), b.accepted); + } + + /** The correction prompt is answered before the second connection's rejection arrives. That connection gets the new answer. */ + @Test + public void reauthAnswerRejectedByServer_afterCorrectionAnswered_servesTheNewAnswer() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(WRONG); + client.requestReauthentication(a.serverRejection(client)); + prompts.get(1).accept(CREDENTIALS); + client.requestReauthentication(b.serverRejection(client)); + + assertEquals(2, prompts.size()); + assertEquals(Arrays.asList("B:wrong", "B:secret"), b.accepted); + } + + /** A connection whose session locks out after the correction prompt was answered gets that answer at once. */ + @Test + public void lateJoinerAfterCorrectionAnswered_getsThatAnswer() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection c = new StubConnection("C"); + + client.requestReauthentication(a.cycleStart(client)); + prompts.get(0).accept(WRONG); + client.requestReauthentication(a.serverRejection(client)); + prompts.get(1).accept(CREDENTIALS); + + client.requestReauthentication(c.cycleStart(client)); + assertEquals(2, prompts.size()); + assertEquals(Arrays.asList("C:secret"), c.accepted); + } + + /** + * A connection that was granted since it last received an answer carries no answering prompt. Its + * later verdict opens the next prompt instead of taking the answer of the cycle that followed. + */ + @Test + public void verdictWithNoAnsweringPrompt_opensNextPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection c = new StubConnection("C"); + + client.requestReauthentication(a.cycleStart(client)); + prompts.get(0).accept(WRONG); + a.answeringPrompt = null; // the grant clears it, Connection.setUpReauthentication + expire((CompositeAuthRequest) prompts.get(0)); + client.process(); + + client.requestReauthentication(c.cycleStart(client)); + prompts.get(1).accept(CREDENTIALS); + client.requestReauthentication(a.serverRejection(client)); + + assertEquals(3, prompts.size()); + assertEquals(Arrays.asList("A:wrong"), a.accepted); + assertEquals(Arrays.asList("C:secret"), c.accepted); + } + + /** + * Two corrections follow each other before the second connection's delayed rejection arrives. That + * connection gets the newest answer, never the superseded wrong one. + */ + @Test + public void delayedRejection_afterTwoCorrections_getsTheNewestAnswer() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(WRONG); + client.requestReauthentication(a.serverRejection(client)); + prompts.get(1).accept(WRONG_AGAIN); + client.requestReauthentication(a.serverRejection(client)); + prompts.get(2).accept(CREDENTIALS); + client.requestReauthentication(b.serverRejection(client)); + + assertEquals(3, prompts.size()); + assertEquals(Arrays.asList("B:wrong", "B:secret"), b.accepted); + } + + /** A delayed rejection arriving after the answered correction prompt expired opens the next prompt instead of handing the expired answer over. */ + @Test + public void delayedRejection_afterCorrectionExpired_opensNextPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + client.requestReauthentication(b.cycleStart(client)); + prompts.get(0).accept(WRONG); + client.requestReauthentication(a.serverRejection(client)); + prompts.get(1).accept(CREDENTIALS); + expire((CompositeAuthRequest) prompts.get(1)); + client.process(); + client.requestReauthentication(b.serverRejection(client)); + + assertEquals(3, prompts.size()); + assertEquals(Arrays.asList("B:wrong"), b.accepted); + } + + /** + * The rejected connection's prompt expired and another connection has started and answered the next + * cycle's prompt. The delayed rejection takes that fresh answer instead of opening a third prompt. + */ + @Test + public void delayedRejection_afterNextPromptAnswered_takesThatAnswer() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection c = new StubConnection("C"); + + client.requestReauthentication(a.cycleStart(client)); + prompts.get(0).accept(WRONG); + expire((CompositeAuthRequest) prompts.get(0)); + client.process(); + client.requestReauthentication(c.cycleStart(client)); + prompts.get(1).accept(CREDENTIALS); + client.requestReauthentication(a.serverRejection(client)); + + assertEquals(2, prompts.size()); + assertEquals(Arrays.asList("A:wrong", "A:secret"), a.accepted); + } + + /** + * The answered prompt expired and another connection has already opened the next cycle's prompt when a + * late rejection arrives. The rejected connection joins that open prompt instead of opening a second one. + */ + @Test + public void rejectionAfterExpiryWhileNextPromptIsOpen_joinsThatPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection c = new StubConnection("C"); + + client.requestReauthentication(a.cycleStart(client)); + client.process(); + prompts.get(0).accept(WRONG); + expire((CompositeAuthRequest) prompts.get(0)); + client.process(); + client.requestReauthentication(c.cycleStart(client)); + assertEquals(2, prompts.size()); + + client.requestReauthentication(a.serverRejection(client)); + assertEquals(2, prompts.size()); + + prompts.get(1).accept(CREDENTIALS); + assertEquals(Arrays.asList("C:secret"), c.accepted); + assertEquals(Arrays.asList("A:wrong", "A:secret"), a.accepted); + } + + /** Backdates the prompt's answer to the edge of the five-second cache window. */ + /** + * The answered prompt's cache window has passed but the event loop has not run since, so the prompt is + * still the current one. A cycle start arriving now opens the next prompt instead of taking the stale answer. + */ + @Test + public void cycleStartAfterCacheExpired_opensNextPrompt() throws Exception { + Client client = new Client(); + List prompts = record(client); + StubConnection a = new StubConnection("A"); + StubConnection b = new StubConnection("B"); + + client.requestReauthentication(a.cycleStart(client)); + prompts.get(0).accept(CREDENTIALS); + expire((CompositeAuthRequest) prompts.get(0)); + client.requestReauthentication(b.cycleStart(client)); + + assertEquals(Arrays.asList(), b.accepted); + assertEquals(2, prompts.size()); + } + + private static void expire(CompositeAuthRequest prompt) throws Exception { + Field field = CompositeAuthRequest.class.getDeclaredField("readyTimestamp"); + field.setAccessible(true); + field.set(prompt, Instant.now().minusSeconds(5)); + } + + private static Map credentials(String user, String password) { + Map data = new HashMap<>(); + data.put(AuthRequest.USER, user); + data.put(AuthRequest.PASSWORD, password); + return data; + } + + /** Records every prompt the client opens. */ + private static List record(Client client) throws Exception { + return record(client, 0, null); + } + + /** + * Records every prompt and answers prompt number {@code answerAtOnce} inside the callback, with + * {@code answer}, or rejects it when {@code answer} is null. + */ + private static List record(Client client, int answerAtOnce, Map answer) throws Exception { + List prompts = new ArrayList<>(); + Field field = Client.class.getDeclaredField("listener"); + field.setAccessible(true); + field.set(client, new NotificationListener() { + @Override public void clientReady(Client c) {} + @Override public void clientClosed(Client c) {} + @Override public void credentialsRequested(AuthRequest request) { + prompts.add(request); + if (prompts.size() == answerAtOnce) { + if (answer == null) { + request.reject(); + } else { + request.accept(answer); + } + } + } + }); + return prompts; + } + + /** Stands in for one Connection: its name, what it was handed, and the prompt that last answered it. */ + private static class StubConnection { + final String name; + final List accepted = new ArrayList<>(); + final List rejected = new ArrayList<>(); + CompositeAuthRequest answeringPrompt; + + StubConnection(String name) { + this.name = name; + } + + ReauthRequest cycleStart(Client client) { + return new ReauthStub(client, this, AuthRequest.AuthResultCode.REAUTHENTICATION_REQUIRED); + } + + ReauthRequest serverRejection(Client client) { + return new ReauthStub(client, this, AuthRequest.AuthResultCode.INVALID_CHALLENGE_RESPONSE); + } + } + + /** + * Stands in for Connection.ConnectionAuthRequest. Accepting it models IOHandler.reauthenticate: a + * username-less map fails validation and the client re-requests with USERNAME_REQUIRED at once, a map + * with a username is recorded as accepted. The server's verdict on an accepted answer arrives later as + * a new request built with {@link StubConnection#serverRejection}. + */ + private static class ReauthStub implements ReauthRequest { + private final Client client; + private final StubConnection connection; + private final AuthResultCode code; + + ReauthStub(Client client, StubConnection connection, AuthResultCode code) { + this.client = client; + this.connection = connection; + this.code = code; + } + + @Override public void accept(Map data) { + String user = data.get(USER); + if (user == null || user.isEmpty()) { + client.requestReauthentication(new ReauthStub(client, connection, AuthResultCode.USERNAME_REQUIRED)); + } else { + connection.accepted.add(connection.name + ":" + data.get(PASSWORD)); + } + } + + @Override public void reject() { + connection.rejected.add(connection.name); + } + + @Override public CompositeAuthRequest getAnsweringPrompt() { + return connection.answeringPrompt; + } + + @Override public void setAnsweringPrompt(CompositeAuthRequest prompt) { + connection.answeringPrompt = prompt; + } + + @Override public UserAuthResult getAuthResult() { + UserAuthResult result = new UserAuthResult(); + result.setCode(code); + return result; + } + + @Override public String getSystemName() { return "Sys"; } + @Override public String getApplicationName() { return connection.name; } + @Override public URI getServerURI() { return null; } + @Override public CDPVersion getCDPVersion() { return null; } + @Override public Certificate[] getPeerCertificates() { return new Certificate[0]; } + @Override public long getIdleLockoutPeriod() { return 0; } + @Override public String getSystemUseNotification() { return ""; } + @Override public List getSuggestedUsers() { return new ArrayList<>(); } + } +} diff --git a/src/test/java/com/cdptech/cdpclient/CompositeAuthRequestTest.java b/src/test/java/com/cdptech/cdpclient/CompositeAuthRequestTest.java new file mode 100644 index 0000000..5e19769 --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/CompositeAuthRequestTest.java @@ -0,0 +1,115 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import java.net.URI; +import java.security.cert.Certificate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CompositeAuthRequestTest { + + @Test + public void getSuggestedUsers_comesFromTheFirstConnection() { + StubAuthRequest first = new StubAuthRequest(); + AuthRequest.SuggestedUser user = new AuthRequest.SuggestedUser(); + user.setUsername("operator"); + first.suggestedUsers = Arrays.asList(user); + + CompositeAuthRequest composite = new CompositeAuthRequest(first); + composite.add(new StubAuthRequest()); + + List result = composite.getSuggestedUsers(); + assertEquals(1, result.size()); + assertEquals("operator", result.get(0).getUsername()); + } + + @Test + public void accept_isForwardedToEveryPendingConnection() { + StubAuthRequest first = new StubAuthRequest(); + StubAuthRequest second = new StubAuthRequest(); + CompositeAuthRequest composite = new CompositeAuthRequest(first); + composite.add(second); + + composite.accept(new HashMap<>()); + + assertTrue(first.accepted); + assertTrue(second.accepted); + } + + @Test + public void connectionAddedAfterAcceptance_isAcceptedImmediately() { + CompositeAuthRequest composite = new CompositeAuthRequest(new StubAuthRequest()); + composite.accept(new HashMap<>()); + + StubAuthRequest late = new StubAuthRequest(); + composite.add(late); + + assertTrue(late.accepted); + } + + @Test + public void deliveredRequest_remembersTheAnsweringPrompt() { + StubAuthRequest first = new StubAuthRequest(); + CompositeAuthRequest composite = new CompositeAuthRequest(first); + + composite.accept(new HashMap<>()); + + assertSame(composite, first.answeringPrompt); + } + + @Test + public void reject_isForwardedToEveryPendingConnection() { + StubAuthRequest first = new StubAuthRequest(); + StubAuthRequest second = new StubAuthRequest(); + CompositeAuthRequest composite = new CompositeAuthRequest(first); + composite.add(second); + + composite.reject(); + + assertTrue(first.rejected); + assertTrue(second.rejected); + } + + @Test + public void connectionAddedAfterRejection_isRejectedImmediately() { + CompositeAuthRequest composite = new CompositeAuthRequest(new StubAuthRequest()); + composite.reject(); + + StubAuthRequest late = new StubAuthRequest(); + composite.add(late); + + assertTrue(late.rejected); + } + + /** Minimal request that records accept/reject, the answering prompt, and returns a settable suggested-user list. */ + private static class StubAuthRequest implements ReauthRequest { + boolean accepted; + boolean rejected; + CompositeAuthRequest answeringPrompt; + List suggestedUsers = new ArrayList<>(); + + @Override public String getSystemName() { return "Sys"; } + @Override public String getApplicationName() { return "App"; } + @Override public URI getServerURI() { return null; } + @Override public CDPVersion getCDPVersion() { return null; } + @Override public Certificate[] getPeerCertificates() { return new Certificate[0]; } + @Override public long getIdleLockoutPeriod() { return 0; } + @Override public String getSystemUseNotification() { return ""; } + @Override public UserAuthResult getAuthResult() { return new UserAuthResult(); } + @Override public List getSuggestedUsers() { return suggestedUsers; } + @Override public void accept(Map data) { accepted = true; } + @Override public void reject() { rejected = true; } + @Override public CompositeAuthRequest getAnsweringPrompt() { return answeringPrompt; } + @Override public void setAnsweringPrompt(CompositeAuthRequest prompt) { answeringPrompt = prompt; } + } +} diff --git a/src/test/java/com/cdptech/cdpclient/HelloProtocolTest.java b/src/test/java/com/cdptech/cdpclient/HelloProtocolTest.java new file mode 100644 index 0000000..92ffe77 --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/HelloProtocolTest.java @@ -0,0 +1,52 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import static org.junit.Assert.*; + +import com.cdptech.cdpclient.proto.StudioAPI; + +import org.junit.Test; + +import java.util.List; + +public class HelloProtocolTest { + + @Test + public void suggestedUsers_areParsedFromHello() { + StudioAPI.Hello hello = StudioAPI.Hello.newBuilder() + .setSystemName("Sys") + .setCompatVersion(3) + .setIncrementalVersion(0) + .addSuggestedUsers(StudioAPI.Hello.SuggestedUser.newBuilder() + .setUserId("operator").setFirstName("Olaf").setLastName("Nordmann")) + .addSuggestedUsers(StudioAPI.Hello.SuggestedUser.newBuilder() + .setUserId("guest")) // names unset: proto defaults are empty strings + .build(); + + HelloProtocol protocol = new HelloProtocol(() -> { }); + protocol.parse(hello.toByteArray()); + + List users = protocol.getSuggestedUsers(); + assertEquals(2, users.size()); + assertEquals("operator", users.get(0).getUsername()); + assertEquals("Olaf", users.get(0).getFirstName()); + assertEquals("Nordmann", users.get(0).getLastName()); + assertEquals("guest", users.get(1).getUsername()); + assertEquals("", users.get(1).getFirstName()); + assertEquals("", users.get(1).getLastName()); + } + + @Test + public void suggestedUsers_emptyWhenHelloCarriesNone() { + StudioAPI.Hello hello = StudioAPI.Hello.newBuilder() + .setSystemName("Sys").setCompatVersion(3).setIncrementalVersion(0).build(); + + HelloProtocol protocol = new HelloProtocol(() -> { }); + protocol.parse(hello.toByteArray()); + + assertTrue(protocol.getSuggestedUsers().isEmpty()); + } +} diff --git a/src/test/java/com/cdptech/cdpclient/IOHandlerTest.java b/src/test/java/com/cdptech/cdpclient/IOHandlerTest.java index 0491277..6328e33 100644 --- a/src/test/java/com/cdptech/cdpclient/IOHandlerTest.java +++ b/src/test/java/com/cdptech/cdpclient/IOHandlerTest.java @@ -7,10 +7,19 @@ import static org.junit.Assert.*; import com.cdptech.cdpclient.proto.StudioAPI; +import com.google.protobuf.ByteString; import org.junit.Before; import org.junit.Test; +import java.net.URI; +import java.security.KeyPairGenerator; +import java.time.Instant; +import java.util.Base64; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + public class IOHandlerTest { StudioAPI.VariantValue.Builder pbv; @@ -34,4 +43,290 @@ public void createVariant_shouldReadString() { assertEquals("test", value); } + @Test + public void parse_unsignedChar_isNumeric() { + Variant v = new Variant.Builder(StudioAPI.CDPValueType.eUCHAR).parse("255").build(); + assertEquals("eUCHAR parses the decimal 255", Integer.valueOf(255), v.getValue()); + } + + @Test + public void createVariant_appliesClockDeltaToNonZeroTimestampsOnly() { + // The clock delta applies to a non-zero remote timestamp only. + long delta = 500_000; + Variant zeroTs = IOHandler.createVariant( + StudioAPI.VariantValue.newBuilder().setNodeId(5).setDValue(1.0).setTimestamp(0).build(), delta); + assertEquals(Instant.ofEpochSecond(0, 0), zeroTs.getTimestamp()); + + Variant nonZeroTs = IOHandler.createVariant( + StudioAPI.VariantValue.newBuilder().setNodeId(5).setDValue(1.0).setTimestamp(1000).build(), delta); + assertEquals(Instant.ofEpochSecond(0, 1000 + delta), nonZeroTs.getTimestamp()); + } + + @Test + public void setRemoteValue_narrowIntTypes_sendTheirValueOnWire() throws Exception { + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + + Node us = new Node(5, StudioAPI.CDPNodeType.CDP_OBJECT, StudioAPI.CDPValueType.eUSHORT, "Us", 0); + ioHandler.setRemoteValue(us, new Variant.Builder(StudioAPI.CDPValueType.eUSHORT).parse("40000").build()); + assertEquals(40000, StudioAPI.Container.parseFrom(transport.last).getSetterRequest(0).getUsValue()); + + Node uc = new Node(6, StudioAPI.CDPNodeType.CDP_OBJECT, StudioAPI.CDPValueType.eUCHAR, "Uc", 0); + ioHandler.setRemoteValue(uc, new Variant.Builder(StudioAPI.CDPValueType.eUCHAR).parse("200").build()); + assertEquals(200, StudioAPI.Container.parseFrom(transport.last).getSetterRequest(0).getUcValue()); + + Node s = new Node(7, StudioAPI.CDPNodeType.CDP_OBJECT, StudioAPI.CDPValueType.eSHORT, "S", 0); + ioHandler.setRemoteValue(s, new Variant.Builder(StudioAPI.CDPValueType.eSHORT).parse("-30000").build()); + assertEquals(-30000, StudioAPI.Container.parseFrom(transport.last).getSetterRequest(0).getSValue()); + + Node c = new Node(8, StudioAPI.CDPNodeType.CDP_OBJECT, StudioAPI.CDPValueType.eCHAR, "C", 0); + ioHandler.setRemoteValue(c, new Variant.Builder(StudioAPI.CDPValueType.eCHAR).parse("-100").build()); + assertEquals(-100, StudioAPI.Container.parseFrom(transport.last).getSetterRequest(0).getCValue()); + } + + @Test + public void setRemoteValue_roundTripsServerReceivedNarrowInt() throws Exception { + // A narrow int received from the server is boxed as Integer by createVariant. Posting it back must not crash. + Variant received = IOHandler.createVariant( + StudioAPI.VariantValue.newBuilder().setNodeId(5).setUsValue(40000).build(), 0); + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + Node node = new Node(5, StudioAPI.CDPNodeType.CDP_OBJECT, StudioAPI.CDPValueType.eUSHORT, "Us", 0); + ioHandler.setRemoteValue(node, received); + assertEquals(40000, StudioAPI.Container.parseFrom(transport.last).getSetterRequest(0).getUsValue()); + } + + @Test + public void parse_unsignedIntAndLong_acceptFullUnsignedRange() { + // uint32/uint64 cover values above the signed maximum. They are stored with the sign bit as the top bit. + Variant ui = new Variant.Builder(StudioAPI.CDPValueType.eUINT).parse("4000000000").build(); + assertEquals(4000000000L, Integer.toUnsignedLong(ui.getValue())); + + Variant ui64 = new Variant.Builder(StudioAPI.CDPValueType.eUINT64).parse("18446744073709551615").build(); + assertEquals("18446744073709551615", Long.toUnsignedString(ui64.getValue())); + } + + @Test + public void setRemoteValue_unsignedInt_sendsFullRangeValueOnWire() throws Exception { + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + Node node = new Node(5, StudioAPI.CDPNodeType.CDP_OBJECT, StudioAPI.CDPValueType.eUINT, "Ui", 0); + ioHandler.setRemoteValue(node, new Variant.Builder(StudioAPI.CDPValueType.eUINT).parse("4000000000").build()); + assertEquals(4000000000L, + Integer.toUnsignedLong(StudioAPI.Container.parseFrom(transport.last).getSetterRequest(0).getUiValue())); + } + + @Test + public void toString_unsignedTypes_printUnsignedAndRoundTripThroughParse() { + // A top-bit-set unsigned value prints its unsigned form, and parse(toString()) reproduces the value. + Variant ui = IOHandler.createVariant( + StudioAPI.VariantValue.newBuilder().setNodeId(5).setUiValue((int) 4000000000L).build(), 0); + assertEquals("4000000000", ui.toString()); + assertEquals(ui.getValue(), + new Variant.Builder(StudioAPI.CDPValueType.eUINT).parse(ui.toString()).build().getValue()); + + Variant ui64 = IOHandler.createVariant( + StudioAPI.VariantValue.newBuilder().setNodeId(5).setUi64Value(-1L).build(), 0); + assertEquals("18446744073709551615", ui64.toString()); + assertEquals(ui64.getValue(), + new Variant.Builder(StudioAPI.CDPValueType.eUINT64).parse(ui64.toString()).build().getValue()); + } + + @Test(expected = IllegalArgumentException.class) + public void parse_negativeIntoUnsigned_throws() { + // A negative string is no valid unsigned value, so parsing rejects it. + new Variant.Builder(StudioAPI.CDPValueType.eUINT).parse("-1"); + } + + @Test + public void reauthResponse_requestingEncryptedPassword_isAnsweredAutomatically() throws Exception { + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + ioHandler.setTimeSyncEnabled(false); + ioHandler.setCredentialsRequester(result -> { }); + ioHandler.parse(authResponseExpired()); // the server demands re-auth (stores the challenge) + ioHandler.reauthenticate(credentials()); // sends the reauth request and caches the attempt + + ioHandler.parse(reauthResponseRequestingEncryptedPassword()); + + StudioAPI.Container sent = StudioAPI.Container.parseFrom(transport.last); + assertEquals(StudioAPI.Container.Type.eReauthRequest, sent.getMessageType()); + boolean carriesEncryptedPassword = false; + for (StudioAPI.AuthRequest.ChallengeResponse cr : sent.getReAuthRequest().getChallengeResponseList()) { + if ("EncryptedPassword".equals(cr.getType())) { + carriesEncryptedPassword = true; + } + } + assertTrue("the EncryptedPassword challenge is answered automatically", carriesEncryptedPassword); + } + + @Test + public void repeatedAuthExpired_raisesOnePromptPerCycle() throws Exception { + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + ioHandler.setTimeSyncEnabled(false); + AtomicInteger prompts = new AtomicInteger(); + // Count only the REAUTHENTICATION_REQUIRED deliveries, the prompts. The granted result reaches this + // requester too. + ioHandler.setCredentialsRequester(result -> { + if (result.getCode() == AuthRequest.AuthResultCode.REAUTHENTICATION_REQUIRED) { + prompts.incrementAndGet(); + } + }); + + // Several auth-expired errors within one cycle raise a single prompt: a burst arriving before the user + // answers (the server rejects each in-flight request), then another after the reauth request is sent. + ioHandler.parse(authResponseExpired()); + ioHandler.parse(authResponseExpired()); + ioHandler.reauthenticate(credentials()); + ioHandler.parse(authResponseExpired()); + assertEquals("one prompt per re-authentication cycle", 1, prompts.get()); + + // The granted response ends the cycle. A later idle lockout starts a new one and prompts again. + ioHandler.parse(reauthGranted()); + ioHandler.parse(authResponseExpired()); + assertEquals("a new lockout after the cycle is granted prompts again", 2, prompts.get()); + } + + @Test + public void passwordExpiringGrant_alsoEndsReauthCycle() throws Exception { + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + ioHandler.setTimeSyncEnabled(false); + AtomicInteger prompts = new AtomicInteger(); + ioHandler.setCredentialsRequester(result -> { + if (result.getCode() == AuthRequest.AuthResultCode.REAUTHENTICATION_REQUIRED) { + prompts.incrementAndGet(); + } + }); + + ioHandler.parse(authResponseExpired()); // prompt 1, cycle armed + ioHandler.parse(reauthGrantedPasswordExpiring()); // a password-expiry grant ends the cycle too + ioHandler.parse(authResponseExpired()); // new cycle -> prompt 2 + assertEquals("a password-expiry grant clears the cycle like a plain grant", 2, prompts.get()); + } + + @Test + public void reauthUsesLatestChallengeAfterSuppressedBurst() throws Exception { + // The server issues a fresh challenge on every eAUTH_RESPONSE_EXPIRED. A burst before the user answers + // is suppressed for prompting, and the re-auth still answers the latest challenge. + ByteString withA = reauthPasswordHashAfter("challenge-A"); + ByteString withB = reauthPasswordHashAfter("challenge-B"); + ByteString afterBurst = reauthPasswordHashAfter("challenge-A", "challenge-B"); + assertEquals("re-auth answers the latest challenge (B)", withB, afterBurst); + assertNotEquals("re-auth must not answer the stale first challenge (A)", withA, afterBurst); + } + + @Test + public void encryptedPasswordReissueUsesLatestChallengeAfterSuppressedBurst() throws Exception { + // The auto-answered EncryptedPassword reissue also answers the latest challenge, so a suppressed + // burst (B) after the first answer (A) reissues for B. + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + ioHandler.setTimeSyncEnabled(false); + ioHandler.setCredentialsRequester(result -> { }); + + ioHandler.parse(authResponseExpired("challenge-A")); // stores A, prompts + ioHandler.reauthenticate(credentials()); // answers A, caches the credentials + ioHandler.parse(authResponseExpired("challenge-B")); // stores B, prompt suppressed + ioHandler.parse(reauthResponseRequestingEncryptedPassword()); // server asks EncryptedPassword -> reissue + + ByteString reissued = passwordHashOf(transport.last); + assertEquals("the reissue answers the latest challenge (B)", reauthPasswordHashAfter("challenge-B"), reissued); + assertNotEquals("the reissue must not answer the stale first challenge (A)", + reauthPasswordHashAfter("challenge-A"), reissued); + } + + /** + * Drive a fresh IOHandler through the given expiry challenges (in order) then a re-authentication, and + * return the PasswordHash response actually sent, which encodes whichever challenge the client used. + */ + private static ByteString reauthPasswordHashAfter(String... challenges) throws Exception { + CapturingTransport transport = new CapturingTransport(); + IOHandler ioHandler = new IOHandler(transport); + ioHandler.setTimeSyncEnabled(false); + ioHandler.setCredentialsRequester(result -> { }); + for (String challenge : challenges) { + ioHandler.parse(authResponseExpired(challenge)); + } + ioHandler.reauthenticate(credentials()); + return passwordHashOf(transport.last); + } + + /** The PasswordHash challenge-response bytes from a sent eReauthRequest container. */ + private static ByteString passwordHashOf(byte[] sent) throws Exception { + for (StudioAPI.AuthRequest.ChallengeResponse cr : + StudioAPI.Container.parseFrom(sent).getReAuthRequest().getChallengeResponseList()) { + if ("PasswordHash".equals(cr.getType())) { + return cr.getResponse(); + } + } + return null; + } + + private static Map credentials() { + Map data = new HashMap<>(); + data.put(AuthRequest.USER, "operator"); + data.put(AuthRequest.PASSWORD, "s3cret"); + return data; + } + + /** An eReauthResponse asking for EncryptedPassword, carrying a freshly generated RSA public key. */ + private static byte[] reauthResponseRequestingEncryptedPassword() throws Exception { + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + String publicKeyPem = "-----BEGIN PUBLIC KEY-----\n" + + Base64.getMimeEncoder().encodeToString(generator.generateKeyPair().getPublic().getEncoded()) + + "\n-----END PUBLIC KEY-----\n"; + return StudioAPI.Container.newBuilder() + .setMessageType(StudioAPI.Container.Type.eReauthResponse) + .setReAuthResponse(StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eAdditionalResponseRequired) + .addAdditionalChallengeResponseRequired(StudioAPI.AdditionalChallengeResponseRequired.newBuilder() + .setType("EncryptedPassword") + .setPrompt("") + .addParameter(StudioAPI.AdditionalChallengeResponseRequired.Parameter.newBuilder() + .setName("PasswordEncryptionPublicKey") + .setValue(publicKeyPem)))) + .build() + .toByteArray(); + } + + /** An eRemoteError carrying eAUTH_RESPONSE_EXPIRED, the server's re-authentication demand. */ + private static byte[] authResponseExpired() { + return authResponseExpired("challenge-1"); + } + + /** As above, carrying a specific server-issued re-authentication challenge. */ + private static byte[] authResponseExpired(String challenge) { + return StudioAPI.Container.newBuilder() + .setMessageType(StudioAPI.Container.Type.eRemoteError) + .setError(StudioAPI.Error.newBuilder() + .setCode(StudioAPI.RemoteErrorCode.eAUTH_RESPONSE_EXPIRED.getNumber()) + .setText("Re-authentication required") + .setChallenge(ByteString.copyFromUtf8(challenge))) + .build() + .toByteArray(); + } + + /** An eReauthResponse granting the re-authentication, which resolves the in-flight cycle. */ + private static byte[] reauthGranted() { + return StudioAPI.Container.newBuilder() + .setMessageType(StudioAPI.Container.Type.eReauthResponse) + .setReAuthResponse(StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eGranted)) + .build() + .toByteArray(); + } + + /** An eReauthResponse granting with a password-expiry warning, which also resolves the cycle. */ + private static byte[] reauthGrantedPasswordExpiring() { + return StudioAPI.Container.newBuilder() + .setMessageType(StudioAPI.Container.Type.eReauthResponse) + .setReAuthResponse(StudioAPI.AuthResponse.newBuilder() + .setResultCode(StudioAPI.AuthResponse.AuthResultCode.eGrantedPasswordWillExpireSoon)) + .build() + .toByteArray(); + } + } diff --git a/src/test/java/com/cdptech/cdpclient/TransportSslParametersTest.java b/src/test/java/com/cdptech/cdpclient/TransportSslParametersTest.java new file mode 100644 index 0000000..9128b29 --- /dev/null +++ b/src/test/java/com/cdptech/cdpclient/TransportSslParametersTest.java @@ -0,0 +1,101 @@ +/* + * (c)2026 CDP Technologies AS + */ + +package com.cdptech.cdpclient; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import javax.net.ssl.SSLParameters; +import java.io.File; +import java.io.FileWriter; +import java.lang.reflect.Field; +import java.net.URI; +import java.util.Collections; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.function.BiConsumer; + +public class TransportSslParametersTest { + + /** Self-signed certificate (CN=wronghost) used only as trust-anchor input to setTrustedCertificates. */ + private static final String TEST_CERTIFICATE_PEM = "-----BEGIN CERTIFICATE-----\n" + + "MIIC5DCCAcygAwIBAgIJAPvc08DcCM6KMA0GCSqGSIb3DQEBDAUAMBQxEjAQBgNV\n" + + "BAMTCXdyb25naG9zdDAgFw0yNjA3MTYxNzI0MjJaGA8yMTI2MDYyMjE3MjQyMlow\n" + + "FDESMBAGA1UEAxMJd3Jvbmdob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\n" + + "CgKCAQEA5mB07aPpNzmSB/0FZn3zCZAY3cEvZoA/3bGLQL2u+PPV5sojrugS6b26\n" + + "zXvCR0YYBF6/pq5GET/7xu78+bwYtJ1f22DuhDyEYpBPaYYRqvtuj3HCi8/QVjIH\n" + + "qxvRoa/oiUSRoRJvJViRvCFEvlCVWHazy54+hGc0cHdXlJInxbdC+eGRq6+C3lC5\n" + + "tl2uYRlKqamJ93kGYxP7cRXNc6G8GaTd9N1GTPqeXRRLuRFosRpqb7kRAscPBKHB\n" + + "IDu+zn9ZQH/85aC6gL5iMnMMV1rZWVcO/cHsdlGtAdX1XRw+mr4DQ+P9ABJE99Qn\n" + + "O3Cph62XQsjMtjYZebhjhu+tKUsDWQIDAQABozcwNTAdBgNVHQ4EFgQUjbME3qvH\n" + + "nS9CHuRvmrZCFIor/p0wFAYDVR0RBA0wC4IJd3Jvbmdob3N0MA0GCSqGSIb3DQEB\n" + + "DAUAA4IBAQBJU1nbcwlQUVFUp+2m52Ta9QA2sDdGZih1ku1Y4aXdtGyi/0asu0vn\n" + + "kCsTxI6RzAP/J9IG+AleQ5QFTm0pE2y5Ajq+id/yg2E5EoSN6OAJzIlgfgxKOmzl\n" + + "8NwGVpD9DenoEthPM8sZS6jrV2ndac325JP7rQ7DHjesGOxDCJSr4Rdumk8bCO23\n" + + "D0xQ4c0BPtWTovBqRBZreiyw3mART3AZr/eVyFNcX0x5h1fprs/ERZSfuNl4HyJt\n" + + "oItOcde0djqKx7+jK9NVTLAz7eBkJFZI9gI8NOqEGYcV9QbrZUjCuNx48cESVCfm\n" + + "elgaGU1ZVd3/qYaksqCYfBQcKTMv1YAC\n" + + "-----END CERTIFICATE-----\n"; + + @Test + public void transportWithoutHandler_enablesEndpointIdentification() { + SSLParameters parameters = new SSLParameters(); + + newTransport().onSetSSLParameters(parameters); + + assertEquals("HTTPS", parameters.getEndpointIdentificationAlgorithm()); + } + + @Test + public void setTrustedCertificates_endpointIdentificationEnabled_keepsEndpointIdentification() throws Exception { + Client client = new Client(); + client.setTrustedCertificates(Collections.singletonList(certificateFile()), true); + + SSLParameters parameters = applySslParameterHandling(client); + + assertEquals("HTTPS", parameters.getEndpointIdentificationAlgorithm()); + } + + @Test + public void setTrustedCertificates_endpointIdentificationDisabled_disablesHostnameVerification() throws Exception { + Client client = new Client(); + client.setTrustedCertificates(Collections.singletonList(certificateFile()), false); + + SSLParameters parameters = applySslParameterHandling(client); + + assertNull(parameters.getEndpointIdentificationAlgorithm()); + } + + /** Runs the client's configured socket parameter handler through the real Transport callback. */ + private static SSLParameters applySslParameterHandling(Client client) throws Exception { + Field field = Client.class.getDeclaredField("socketParameterHandler"); + field.setAccessible(true); + @SuppressWarnings("unchecked") + BiConsumer handler = (BiConsumer) field.get(client); + + Transport transport = newTransport(); + transport.setSocketParameterHandler(handler); + SSLParameters parameters = new SSLParameters(); + transport.onSetSSLParameters(parameters); + return parameters; + } + + private static Transport newTransport() { + try { + return new Transport(new URI("wss://localhost:1"), new LinkedBlockingQueue<>(), e -> { }); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private static File certificateFile() throws Exception { + File file = File.createTempFile("cdpclient-test-cert", ".crt"); + file.deleteOnExit(); + try (FileWriter writer = new FileWriter(file)) { + writer.write(TEST_CERTIFICATE_PEM); + } + return file; + } +}