index
int64
repo_id
string
file_path
string
content
string
0
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/databinding/CfIncludeProgressBinding.java
// Generated by view binder compiler. Do not edit! package ai.causalfoundry.android.sdk.core.databinding; import ai.causalfoundry.android.sdk.core.R; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.viewbinding.ViewBinding; import androidx.viewbinding.ViewBindings; import java.lang.NullPointerException; import java.lang.Override; import java.lang.String; public final class CfIncludeProgressBinding implements ViewBinding { @NonNull private final RelativeLayout rootView; @NonNull public final ProgressBar materialProgressBar; @NonNull public final TextView positionTextview; @NonNull public final ProgressBar progressBarBottom; private CfIncludeProgressBinding(@NonNull RelativeLayout rootView, @NonNull ProgressBar materialProgressBar, @NonNull TextView positionTextview, @NonNull ProgressBar progressBarBottom) { this.rootView = rootView; this.materialProgressBar = materialProgressBar; this.positionTextview = positionTextview; this.progressBarBottom = progressBarBottom; } @Override @NonNull public RelativeLayout getRoot() { return rootView; } @NonNull public static CfIncludeProgressBinding inflate(@NonNull LayoutInflater inflater) { return inflate(inflater, null, false); } @NonNull public static CfIncludeProgressBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup parent, boolean attachToParent) { View root = inflater.inflate(R.layout.cf_include_progress, parent, false); if (attachToParent) { parent.addView(root); } return bind(root); } @NonNull public static CfIncludeProgressBinding bind(@NonNull View rootView) { // The body of this method is generated in a way you would not otherwise write. // This is done to optimize the compiled bytecode for size and performance. int id; missingId: { id = R.id.material_progress_bar; ProgressBar materialProgressBar = ViewBindings.findChildViewById(rootView, id); if (materialProgressBar == null) { break missingId; } id = R.id.position_textview; TextView positionTextview = ViewBindings.findChildViewById(rootView, id); if (positionTextview == null) { break missingId; } id = R.id.progressBarBottom; ProgressBar progressBarBottom = ViewBindings.findChildViewById(rootView, id); if (progressBarBottom == null) { break missingId; } return new CfIncludeProgressBinding((RelativeLayout) rootView, materialProgressBar, positionTextview, progressBarBottom); } String missingId = rootView.getResources().getResourceName(id); throw new NullPointerException("Missing required view with ID: ".concat(missingId)); } }
0
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/databinding/CfIncludeSubtitleBinding.java
// Generated by view binder compiler. Do not edit! package ai.causalfoundry.android.sdk.core.databinding; import ai.causalfoundry.android.sdk.core.R; import ai.causalfoundry.android.sdk.core.video_view.captions.CaptionsView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.viewbinding.ViewBinding; import androidx.viewbinding.ViewBindings; import java.lang.NullPointerException; import java.lang.Override; import java.lang.String; public final class CfIncludeSubtitleBinding implements ViewBinding { @NonNull private final FrameLayout rootView; @NonNull public final CaptionsView subsBox; private CfIncludeSubtitleBinding(@NonNull FrameLayout rootView, @NonNull CaptionsView subsBox) { this.rootView = rootView; this.subsBox = subsBox; } @Override @NonNull public FrameLayout getRoot() { return rootView; } @NonNull public static CfIncludeSubtitleBinding inflate(@NonNull LayoutInflater inflater) { return inflate(inflater, null, false); } @NonNull public static CfIncludeSubtitleBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup parent, boolean attachToParent) { View root = inflater.inflate(R.layout.cf_include_subtitle, parent, false); if (attachToParent) { parent.addView(root); } return bind(root); } @NonNull public static CfIncludeSubtitleBinding bind(@NonNull View rootView) { // The body of this method is generated in a way you would not otherwise write. // This is done to optimize the compiled bytecode for size and performance. int id; missingId: { id = R.id.subs_box; CaptionsView subsBox = ViewBindings.findChildViewById(rootView, id); if (subsBox == null) { break missingId; } return new CfIncludeSubtitleBinding((FrameLayout) rootView, subsBox); } String missingId = rootView.getResources().getResourceName(id); throw new NullPointerException("Missing required view with ID: ".concat(missingId)); } }
0
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/databinding/CfIncludeSurfaceBinding.java
// Generated by view binder compiler. Do not edit! package ai.causalfoundry.android.sdk.core.databinding; import ai.causalfoundry.android.sdk.core.R; import android.view.LayoutInflater; import android.view.TextureView; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.viewbinding.ViewBinding; import androidx.viewbinding.ViewBindings; import java.lang.NullPointerException; import java.lang.Override; import java.lang.String; public final class CfIncludeSurfaceBinding implements ViewBinding { @NonNull private final FrameLayout rootView; @NonNull public final TextureView textureview; @NonNull public final TextView viewBackward; @NonNull public final TextView viewForward; private CfIncludeSurfaceBinding(@NonNull FrameLayout rootView, @NonNull TextureView textureview, @NonNull TextView viewBackward, @NonNull TextView viewForward) { this.rootView = rootView; this.textureview = textureview; this.viewBackward = viewBackward; this.viewForward = viewForward; } @Override @NonNull public FrameLayout getRoot() { return rootView; } @NonNull public static CfIncludeSurfaceBinding inflate(@NonNull LayoutInflater inflater) { return inflate(inflater, null, false); } @NonNull public static CfIncludeSurfaceBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup parent, boolean attachToParent) { View root = inflater.inflate(R.layout.cf_include_surface, parent, false); if (attachToParent) { parent.addView(root); } return bind(root); } @NonNull public static CfIncludeSurfaceBinding bind(@NonNull View rootView) { // The body of this method is generated in a way you would not otherwise write. // This is done to optimize the compiled bytecode for size and performance. int id; missingId: { id = R.id.textureview; TextureView textureview = ViewBindings.findChildViewById(rootView, id); if (textureview == null) { break missingId; } id = R.id.view_backward; TextView viewBackward = ViewBindings.findChildViewById(rootView, id); if (viewBackward == null) { break missingId; } id = R.id.view_forward; TextView viewForward = ViewBindings.findChildViewById(rootView, id); if (viewForward == null) { break missingId; } return new CfIncludeSurfaceBinding((FrameLayout) rootView, textureview, viewBackward, viewForward); } String missingId = rootView.getResources().getResourceName(id); throw new NullPointerException("Missing required view with ID: ".concat(missingId)); } }
0
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/databinding/CfIncludeTopbarBinding.java
// Generated by view binder compiler. Do not edit! package ai.causalfoundry.android.sdk.core.databinding; import ai.causalfoundry.android.sdk.core.R; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.Toolbar; import androidx.viewbinding.ViewBinding; import androidx.viewbinding.ViewBindings; import java.lang.NullPointerException; import java.lang.Override; import java.lang.String; public final class CfIncludeTopbarBinding implements ViewBinding { @NonNull private final LinearLayout rootView; @NonNull public final Toolbar toolbar; private CfIncludeTopbarBinding(@NonNull LinearLayout rootView, @NonNull Toolbar toolbar) { this.rootView = rootView; this.toolbar = toolbar; } @Override @NonNull public LinearLayout getRoot() { return rootView; } @NonNull public static CfIncludeTopbarBinding inflate(@NonNull LayoutInflater inflater) { return inflate(inflater, null, false); } @NonNull public static CfIncludeTopbarBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup parent, boolean attachToParent) { View root = inflater.inflate(R.layout.cf_include_topbar, parent, false); if (attachToParent) { parent.addView(root); } return bind(root); } @NonNull public static CfIncludeTopbarBinding bind(@NonNull View rootView) { // The body of this method is generated in a way you would not otherwise write. // This is done to optimize the compiled bytecode for size and performance. int id; missingId: { id = R.id.toolbar; Toolbar toolbar = ViewBindings.findChildViewById(rootView, id); if (toolbar == null) { break missingId; } return new CfIncludeTopbarBinding((LinearLayout) rootView, toolbar); } String missingId = rootView.getResources().getResourceName(id); throw new NullPointerException("Missing required view with ID: ".concat(missingId)); } }
0
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/databinding/DefaultInappMessageLayoutBinding.java
// Generated by view binder compiler. Do not edit! package ai.causalfoundry.android.sdk.core.databinding; import ai.causalfoundry.android.sdk.core.R; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.viewbinding.ViewBinding; import androidx.viewbinding.ViewBindings; import java.lang.NullPointerException; import java.lang.Override; import java.lang.String; public final class DefaultInappMessageLayoutBinding implements ViewBinding { @NonNull private final RelativeLayout rootView; @NonNull public final TextView SubText; @NonNull public final TextView TitleText; @NonNull public final ImageView btnClosePopup; @NonNull public final RelativeLayout popUpBackgroundColor; private DefaultInappMessageLayoutBinding(@NonNull RelativeLayout rootView, @NonNull TextView SubText, @NonNull TextView TitleText, @NonNull ImageView btnClosePopup, @NonNull RelativeLayout popUpBackgroundColor) { this.rootView = rootView; this.SubText = SubText; this.TitleText = TitleText; this.btnClosePopup = btnClosePopup; this.popUpBackgroundColor = popUpBackgroundColor; } @Override @NonNull public RelativeLayout getRoot() { return rootView; } @NonNull public static DefaultInappMessageLayoutBinding inflate(@NonNull LayoutInflater inflater) { return inflate(inflater, null, false); } @NonNull public static DefaultInappMessageLayoutBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup parent, boolean attachToParent) { View root = inflater.inflate(R.layout.default_inapp_message_layout, parent, false); if (attachToParent) { parent.addView(root); } return bind(root); } @NonNull public static DefaultInappMessageLayoutBinding bind(@NonNull View rootView) { // The body of this method is generated in a way you would not otherwise write. // This is done to optimize the compiled bytecode for size and performance. int id; missingId: { id = R.id.SubText; TextView SubText = ViewBindings.findChildViewById(rootView, id); if (SubText == null) { break missingId; } id = R.id.TitleText; TextView TitleText = ViewBindings.findChildViewById(rootView, id); if (TitleText == null) { break missingId; } id = R.id.btnClosePopup; ImageView btnClosePopup = ViewBindings.findChildViewById(rootView, id); if (btnClosePopup == null) { break missingId; } RelativeLayout popUpBackgroundColor = (RelativeLayout) rootView; return new DefaultInappMessageLayoutBinding((RelativeLayout) rootView, SubText, TitleText, btnClosePopup, popUpBackgroundColor); } String missingId = rootView.getResources().getResourceName(id); throw new NullPointerException("Missing required view with ID: ".concat(missingId)); } }
0
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/retrofit
java-sources/ai/causalfoundry/android/sdk/core/1.2.3/ai/causalfoundry/android/sdk/core/retrofit/api/NetworkUtil.java
package ai.causalfoundry.android.sdk.core.retrofit.api; import static android.content.Context.CONNECTIVITY_SERVICE; import android.content.Context; import android.net.ConnectivityManager; import android.net.Network; import android.net.NetworkCapabilities; import android.net.NetworkInfo; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Collections; import java.util.List; import ai.causalfoundry.android.sdk.core.event_types.CoreEventType; import ai.causalfoundry.android.sdk.core.utils.ExceptionManager; import ai.causalfoundry.android.sdk.core.utils.NetworkObject; /** * Created by Moiz Hassan on 25 January,2023 */ public class NetworkUtil { public static NetworkObject isInternetAvailable(Context context) { try { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); int uploadSpeed = 0; int downloadSpeed = 0; boolean isOnline = activeNetwork != null && activeNetwork.isConnected(); if (isOnline) { NetworkCapabilities nc = null; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { nc = cm.getNetworkCapabilities(cm.getActiveNetwork()); if (nc != null) { uploadSpeed = nc.getLinkUpstreamBandwidthKbps(); downloadSpeed = nc.getLinkDownstreamBandwidthKbps(); } } else { Network[] networks = cm.getAllNetworks(); for (int i = 0; i < networks.length && nc == null; i++) { nc = cm.getNetworkCapabilities(networks[i]); uploadSpeed = nc.getLinkUpstreamBandwidthKbps(); downloadSpeed = nc.getLinkDownstreamBandwidthKbps(); } } } if (downloadSpeed > 2000000) { // ExceptionManager.INSTANCE.throwInvalidNetworkException("Invalid download speed detected, more then 2 Gbps", downloadSpeed); downloadSpeed = 0; } if (uploadSpeed > 2000000) { // ExceptionManager.INSTANCE.throwInvalidNetworkException("Invalid upload speed detected, more then 2 Gbps", uploadSpeed); uploadSpeed = 0; } return new NetworkObject(isOnline, uploadSpeed, downloadSpeed); } catch (Exception ex) { ExceptionManager.INSTANCE.throwInternalCrashException(CoreEventType.App.toString(), "Unable to fetch network details", ex); return new NetworkObject(true, 0, 0); } } /** * Get IP address from first non-localhost interface * * @param useIPv4 true=return ipv4, false=return ipv6 * @return address or empty string */ public static String getIPAddress(boolean useIPv4) { try { List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces()); for (NetworkInterface networkInterface : interfaces) { List<InetAddress> inetAddressList = Collections.list(networkInterface.getInetAddresses()); for (InetAddress inetAddress : inetAddressList) { if (!inetAddress.isLoopbackAddress()) { String stringAddress = inetAddress.getHostAddress(); // boolean isIPv4 = InetAddressUtils.isIPv4Address(string_Address); boolean isIPv4 = stringAddress.indexOf(':') < 0; if (useIPv4) { if (isIPv4) return stringAddress; } else { if (!isIPv4) { int ipv6StringAddress = stringAddress.indexOf('%'); // drop ip6 zone suffix return ipv6StringAddress < 0 ? stringAddress.toUpperCase() : stringAddress.substring(0, ipv6StringAddress).toUpperCase(); } } } } } } catch (Exception ignored) { } // for now eat exceptions return ""; } public static Boolean checkInternet(Context context) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(CONNECTIVITY_SERVICE); NetworkInfo networkInfo = cm.getActiveNetworkInfo(); return networkInfo != null && networkInfo.isConnected(); } }
0
java-sources/ai/causalfoundry/android/sdk/e_commerce/1.2.3/ai/causalfoundry/android/sdk
java-sources/ai/causalfoundry/android/sdk/e_commerce/1.2.3/ai/causalfoundry/android/sdk/e_commerce/BuildConfig.java
/** * Automatically generated file. DO NOT MODIFY */ package ai.causalfoundry.android.sdk.e_commerce; public final class BuildConfig { public static final boolean DEBUG = false; public static final String LIBRARY_PACKAGE_NAME = "ai.causalfoundry.android.sdk.e_commerce"; public static final String BUILD_TYPE = "release"; }
0
java-sources/ai/causalfoundry/android/sdk/e_learning/1.2.3/ai/causalfoundry/android/sdk
java-sources/ai/causalfoundry/android/sdk/e_learning/1.2.3/ai/causalfoundry/android/sdk/e_learning/BuildConfig.java
/** * Automatically generated file. DO NOT MODIFY */ package ai.causalfoundry.android.sdk.e_learning; public final class BuildConfig { public static final boolean DEBUG = false; public static final String LIBRARY_PACKAGE_NAME = "ai.causalfoundry.android.sdk.e_learning"; public static final String BUILD_TYPE = "release"; }
0
java-sources/ai/causalfoundry/android/sdk/loyalty/1.2.3/ai/causalfoundry/android/sdk
java-sources/ai/causalfoundry/android/sdk/loyalty/1.2.3/ai/causalfoundry/android/sdk/loyalty/BuildConfig.java
/** * Automatically generated file. DO NOT MODIFY */ package ai.causalfoundry.android.sdk.loyalty; public final class BuildConfig { public static final boolean DEBUG = false; public static final String LIBRARY_PACKAGE_NAME = "ai.causalfoundry.android.sdk.loyalty"; public static final String BUILD_TYPE = "release"; }
0
java-sources/ai/causalfoundry/android/sdk/patient_mgmt/1.2.3/ai/causalfoundry/android/sdk
java-sources/ai/causalfoundry/android/sdk/patient_mgmt/1.2.3/ai/causalfoundry/android/sdk/patient_mgmt/BuildConfig.java
/** * Automatically generated file. DO NOT MODIFY */ package ai.causalfoundry.android.sdk.patient_mgmt; public final class BuildConfig { public static final boolean DEBUG = false; public static final String LIBRARY_PACKAGE_NAME = "ai.causalfoundry.android.sdk.patient_mgmt"; public static final String BUILD_TYPE = "release"; }
0
java-sources/ai/causalfoundry/android/sdk/payments/1.2.3/ai/causalfoundry/android/sdk
java-sources/ai/causalfoundry/android/sdk/payments/1.2.3/ai/causalfoundry/android/sdk/payments/BuildConfig.java
/** * Automatically generated file. DO NOT MODIFY */ package ai.causalfoundry.android.sdk.payments; public final class BuildConfig { public static final boolean DEBUG = false; public static final String LIBRARY_PACKAGE_NAME = "ai.causalfoundry.android.sdk.payments"; public static final String BUILD_TYPE = "release"; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/AuthenticatedHeaderClientInterceptor.java
package ai.chalk.client; import ai.chalk.protos.chalk.server.v1.GetTokenResponse; import io.grpc.*; import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; import io.grpc.stub.MetadataUtils; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; import java.util.HashMap; import java.util.Map; public class AuthenticatedHeaderClientInterceptor implements ClientInterceptor { public AuthenticatedHeaderClientInterceptor( @NonNull ServerType serverType, @NonNull Map<String, String> additionalHeaders, @NonNull TokenRefresher tokenRefresher, @Nullable String deploymentTag ) { this.tokenRefresher = tokenRefresher; this.allHeaders = new HashMap<>(Map.of( GrpcHeaders.SERVER_TYPE_KEY, serverType.headerName() )); for (Map.Entry<String, String> entry : additionalHeaders.entrySet()) { this.allHeaders.put(Metadata.Key.of(entry.getKey(), Metadata.ASCII_STRING_MARSHALLER), entry.getValue()); } if (serverType.equals(ServerType.ENGINE)) { this.allHeaders.put(GrpcHeaders.DEPLOYMENT_TYPE, "engine-grpc"); } if (deploymentTag != null) { this.allHeaders.put(GrpcHeaders.DEPLOYMENT_TAG, deploymentTag); } } private final Map<Metadata.Key<String>, String> allHeaders; private final TokenRefresher tokenRefresher; @Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next ) { return new SimpleForwardingClientCall<>(next.newCall(method, callOptions)) { @Override public void start(Listener<RespT> responseListener, Metadata headers) { GetTokenResponse token = tokenRefresher.getToken(); for (Map.Entry<Metadata.Key<String>, String> entry : allHeaders.entrySet()) { headers.put(entry.getKey(), entry.getValue()); } headers.put(GrpcHeaders.AUTHORIZATION_KEY, "Bearer " + token.getAccessToken()); super.start(responseListener, headers); } }; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/BuilderImpl.java
package ai.chalk.client; import ai.chalk.exceptions.ChalkException; import lombok.Getter; import org.checkerframework.checker.nullness.qual.Nullable; import java.net.http.HttpClient; import java.nio.file.Path; import java.time.Duration; @Getter public class BuilderImpl implements ChalkClient.Builder { @Nullable private String clientId; @Nullable private String clientSecret; @Nullable private String apiServer; @Nullable private String queryServerOverride; @Nullable private String environmentId; @Nullable private String branch; @Nullable private HttpClient httpClient; private boolean useGrpc; @Nullable private String deploymentTag; @Nullable private Path rootCa; @Nullable private Duration timeout; public BuilderImpl() { this.clientId = null; this.clientSecret = null; this.apiServer = null; this.queryServerOverride = null; this.environmentId = null; this.branch = null; this.deploymentTag = null; this.httpClient = null; this.rootCa = null; this.timeout = null; } @Override public BuilderImpl withClientId(String clientId) { this.clientId = clientId; return this; } @Override public BuilderImpl withClientSecret(String clientSecret) { this.clientSecret = clientSecret; return this; } @Override public BuilderImpl withApiServer(String apiServer) { this.apiServer = apiServer; return this; } @Override public BuilderImpl withQueryServer(String queryServer) { this.queryServerOverride = queryServer; return this; } @Override public BuilderImpl withEnvironmentId(String environmentId) { this.environmentId = environmentId; return this; } @Override public BuilderImpl withBranch(String branch) { this.branch = branch; return this; } @Override public BuilderImpl withDeploymentTag(String deploymentTag) { this.deploymentTag = deploymentTag; return this; } @Override public BuilderImpl withHttpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } @Override public BuilderImpl withGrpc() { this.useGrpc = true; return this; } @Override public ChalkClient.Builder withTimeout(Duration timeout) { this.timeout = timeout; return this; } @Override public ChalkClient.Builder withRootCa(Path rootCa) { var rootCaFile = rootCa.toFile(); if (!(rootCaFile.exists() && rootCaFile.isFile())) { throw new IllegalArgumentException("Root CA file not found, %s".formatted(rootCa.toAbsolutePath())); } this.rootCa = rootCa; return this; } @Override public ChalkClient build() throws ChalkException { if (useGrpc) { return new GRPCClient(this); } return new ChalkClientImpl(this); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/ChalkClient.java
package ai.chalk.client; import ai.chalk.exceptions.ChalkException; import ai.chalk.models.*; import java.net.http.HttpClient; import java.nio.file.Path; import java.time.Duration; import java.util.Optional; public interface ChalkClient extends AutoCloseable { /** * Creates a new ChalkClient builder that can be used * to create a ChalkClient instance with custom configuration. * * <p> Example: * * <pre> * {@code * client = ChalkClient.builder() * .withEnvironmentId("socmc8beyufew") * .withClientId("98wrasfg7dge7wdasg709") * .withClientSecret("h23lkj4h23lkj4z9s78fg908as7fkjh324klj23") * .build(); * } * </pre> * * @return a new ChalkClient builder */ static Builder builder() { return new BuilderImpl(); } /** * <p> Creates a new default ChalkClient instance. * The default ChalkClient instance is configured with config variables sourced as such: * * <p> For each variable, we take the first non-empty value, in order, from the following sources: * <p> 1. The value of the config's corresponding environment variable (see {@link ConfigEnvVars}). * <p> 2. The value in the project root's 'chalk.yaml' or 'chalk.yml' file. * * <p> To override the settings above with custom configuration, use {@link ChalkClient#builder()}. * * @return a new default ChalkClient instance * @throws ChalkException */ static ChalkClient create() throws ChalkException { return builder().build(); } /** * <p> Creates a new ChalkClient instance that uses gRPC for communication. * The gRPC ChalkClient instance is configured with config variables * sourced the same way as the default ChalkClient instance. * * @return a new ChalkClient instance that uses gRPC * @throws ChalkException */ static ChalkClient createGrpc() throws ChalkException { return builder().withGrpc().build(); } /** * OnlineQuery computes features values using online resolvers. * <p> See {@link OnlineQueryParams} for more details on the parameters. * * <p> * Example usage for bulk queries: * <pre> * {@code * OnlineQueryParamsComplete params = OnlineQueryParams.builder() * .withInput("user.id", Arrays.asList(1, 2, 3)) * .withOutputs("user.email", "user.transactions") * .build(); * * try (OnlineQueryResult result = client.onlineQuery(params)) { * // do something with the result * } * </pre> * </p> * * <p> * Example usage for single-row queries using SingleRowInput: * <pre> * {@code * var singleRow = new OnlineQueryParams.SingleRowInput() * .withInput("user.id", 123) * .withInput("user.email", "test@example.com") * .withInput("user.favorite_foods", Arrays.asList("pizza", "pasta")); * * OnlineQueryParamsComplete params = OnlineQueryParams.builder() * .withInput(singleRow) * .withOutputs("user.credit_score", "user.transactions") * .build(); * * try (OnlineQueryResult result = client.onlineQuery(params)) { * // do something with the result * } * </pre> * </p> * * @return {@link OnlineQueryResult } * @throws ChalkException * @see <a href="https://docs.chalk.ai/docs/query-basics">query basics</a> */ OnlineQueryResult onlineQuery(OnlineQueryParamsComplete params) throws ChalkException; /** * UploadFeatures synchronously persists feature values to the online store and * offline store. * <p> See {@link UploadFeaturesParams} for more details on the parameters. * * <p> * Example usage: * <pre> * {@code * var userIds = Arrays.asList("777", "888", "999"); * var scoreList = Arrays.asList(600, 700, 800); * UploadFeaturesParams params = UploadFeaturesParams.builder() * .withInputs(Map.of("user.id", userIds,"user.credit_score", scoreList)) * .withInput(Features.user.email, List.of("user1@email.com", "user2@email.com", "user3@email.com")) * .build(); * UploadFeaturesResult res = client.uploadFeatures(params); * if (client.uploadFeatures(params).getErrors().size() > 0) { * throw new Exception("upload failed"); * } * * </pre> * </p> * */ UploadFeaturesResult uploadFeatures(UploadFeaturesParams params) throws ChalkException; /** * Prints the current ChalkClient configuration and its sources to stdout. */ void printConfig(); public interface Builder { /** * Sets the client ID. Used for authentication. */ public Builder withClientId(String clientId); /** * Sets the client secret. Used for authentication. */ public Builder withClientSecret(String clientSecret); /** * Sets the API server URL. Defaults to "https://api.chalk.ai". */ public Builder withApiServer(String apiServer); /** * Chalk routes performance sensitive requests like online query * directly to the query server that runs the engine. Populate * this field if you would like to route these requests to a * different query server than the one automatically resolved * by Chalk. */ public Builder withQueryServer(String queryServer); /** * Sets the environment ID. This is the identifier * that distinguishes between different environments * in your Chalk project. */ public Builder withEnvironmentId(String environmentId); /** * Sets the branch name. This is the identifier * that distinguishes between different branches * of a particular environment. */ public Builder withBranch(String branch); /** * Sets the deployment Tag. This is the identifier * that distinguishes between different tagged * deployments in a particular environment. */ public Builder withDeploymentTag(String deploymentTag); /** * Sets the HTTP client. This is useful for setting * custom timeouts, etc. */ public Builder withHttpClient(HttpClient httpClient); public Builder withGrpc(); /** * Sets the timeout for all requests. Defaults to no timeout. * Timeout of 0 means the query times out immediately. Request * level timeouts takes precedence over this timeout. * @param timeout The timeout duration */ public Builder withTimeout(Duration timeout); /** * Sets the root CA certificate file. * @param rootCa The path to the root CA */ public Builder withRootCa(Path rootCa); public String getClientId(); public String getClientSecret(); public String getApiServer(); public String getEnvironmentId(); public String getBranch(); public String getDeploymentTag(); public Path getRootCa(); public HttpClient getHttpClient(); public Duration getTimeout(); ChalkClient build() throws ChalkException; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/ChalkClientImpl.java
package ai.chalk.client; import ai.chalk.exceptions.ChalkException; import ai.chalk.exceptions.ClientException; import ai.chalk.internal.arrow.FeatherProcessor; import ai.chalk.internal.bytes.BytesProducer; import ai.chalk.internal.config.Loader; import ai.chalk.internal.config.models.ProjectToken; import ai.chalk.internal.config.models.SourcedConfig; import ai.chalk.internal.request.RequestHandler; import ai.chalk.internal.request.models.OnlineQueryBulkResponse; import ai.chalk.internal.request.models.SendRequestParams; import ai.chalk.models.OnlineQueryParamsComplete; import ai.chalk.models.OnlineQueryResult; import ai.chalk.models.UploadFeaturesParams; import ai.chalk.models.UploadFeaturesResult; import org.apache.arrow.memory.RootAllocator; import java.net.http.HttpResponse; import java.util.*; public class ChalkClientImpl implements ChalkClient { private final SourcedConfig apiServer; private final SourcedConfig clientId; private final SourcedConfig environmentId; private final SourcedConfig clientSecret; private final RequestHandler handler; private static final System.Logger logger = System.getLogger(ChalkClientImpl.class.getName()); private final RootAllocator allocator = new RootAllocator(FeatherProcessor.ALLOCATOR_SIZE_ROOT); public ChalkClientImpl(BuilderImpl config) throws ChalkException { ResolvedConfig resolvedConfig = this.resolveConfig(config); this.apiServer = resolvedConfig.apiServer(); this.clientId = resolvedConfig.clientId(); this.clientSecret = resolvedConfig.clientSecret(); this.environmentId = resolvedConfig.environmentId(); SourcedConfig initialEnvironment = resolvedConfig.environmentId(); String branch = config.getBranch(); String deploymentTag = config.getDeploymentTag(); if (branch != null && deploymentTag != null) { throw new ClientException("Cannot set both branch and deploymentTag"); } this.handler = new RequestHandler( config.getHttpClient(), this.apiServer, config.getQueryServerOverride(), this.environmentId, initialEnvironment, this.clientId, this.clientSecret, branch, deploymentTag, Optional.ofNullable(config.getTimeout()) ); } public OnlineQueryResult onlineQuery(OnlineQueryParamsComplete params) throws ChalkException { byte[] bodyBytes; try ( var childAllocator = allocator.newChildAllocator( "online_query_params", 0, FeatherProcessor.ALLOCATOR_SIZE_REQUEST ) ) { bodyBytes = BytesProducer.convertOnlineQueryParamsToBytes(params, childAllocator); } catch (Exception e) { throw new ClientException("Failed to serialize OnlineQueryParams", e); } SendRequestParams request = new SendRequestParams.Builder(params.getTimeout()) .path("/v1/query/feather") .body(bodyBytes) .method("POST") .branch(params.getBranch()) .isEngineRequest(true) .previewDeploymentId(params.getPreviewDeploymentId()) .environmentOverride(params.getEnvironmentId()) .queryName(params.getQueryName()) .build(); HttpResponse<byte[]> response = this.handler.sendRequest(request); var allocator = this.allocator.newChildAllocator( "online_query_response", 0, FeatherProcessor.ALLOCATOR_SIZE_RESPONSE ); // ignore the warning here, because we don't want to free the memory yet var bulkResponse = OnlineQueryBulkResponse.fromBytes(response.body(), allocator); return bulkResponse.toResult(); } public UploadFeaturesResult uploadFeatures(UploadFeaturesParams params) throws ChalkException { byte[] tableBytes; try { tableBytes = FeatherProcessor.inputsToArrowBytes(params.getInputs(), this.allocator); } catch (Exception e) { throw new ClientException("Failed to convert inputs to Arrow bytes", e); } var attrs = new HashMap<String, Object>(); attrs.put("features", params.getInputs().keySet().stream().toList()); attrs.put("table_compression", "uncompressed"); attrs.put("table_bytes", tableBytes); byte[] body; try { body = BytesProducer.chalkMarshal(attrs); } catch (Exception e) { throw new ClientException("Failed to serialize UploadFeaturesParams", e); } SendRequestParams request = new SendRequestParams.Builder(params.getTimeout()) .path("/v1/upload_features/multi") .body(body) .method("POST") .environmentOverride(params.getEnvironmentId()) .isEngineRequest(true) .build(); HttpResponse<byte[]> response = this.handler.sendRequest(request); return this.handler.deserializeResponseBody(response.body(), UploadFeaturesResult.class); } private ResolvedConfig resolveConfig(BuilderImpl builder) throws ClientException { ProjectToken chalkYamlConfig = new ProjectToken(); String projectRoot; Exception chalkYamlExc = null; try { projectRoot = Loader.loadProjectDirectory(); chalkYamlConfig = Loader.getChalkYamlConfig(projectRoot); } catch (Exception deferredException) { chalkYamlExc = deferredException; } ResolvedConfig config = ResolvedConfig.fromBuilder(builder, chalkYamlConfig); if (config.clientId().value().isEmpty() || config.clientSecret().value().isEmpty() || config.apiServer().value().isEmpty() || config.environmentId().value().isEmpty()) { System.err.println(this.getConfigStr()); String msg = "Chalk's config variables are not set correctly. See error log or stacktrace for more details."; if (chalkYamlExc != null) { throw new ClientException(msg, chalkYamlExc); } else { throw new ClientException(msg); } } return config; } private String getConfigStr() { // At init time these non-nullable attributes might still be null SourcedConfig apiServer = Optional.ofNullable(this.apiServer).orElse(SourcedConfig.missing()); SourcedConfig environmentId = Optional.ofNullable(this.environmentId).orElse(SourcedConfig.missing()); SourcedConfig clientId = Optional.ofNullable(this.clientId).orElse(SourcedConfig.missing()); SourcedConfig clientSecret = Optional.ofNullable(this.clientSecret).orElse(SourcedConfig.missing()); return "ChalkClient's config variables and the source of these variables are displayed in the following table.\n\n" + SourcedConfig.getConfigTableStr(Map.of( "Api Server", apiServer, "Environment ID", environmentId, "Client ID", clientId, "Client Secret", new SourcedConfig( clientSecret.source(), clientSecret.value().replaceAll(".", "*") ) )) + """ For each variable, we take the first non-empty value, in order, from the following sources: 1. The value passed to ChalkClient's Builder 2. The value of the config's corresponding environment variable (see the class `ai.chalk.client.ConfigEnvVars`) 3. The value in your '~/.chalk.yml' file 4. A default value (if applicable) """; } public void printConfig() { logger.log(System.Logger.Level.INFO, this.getConfigStr()); } @Override public void close() { this.allocator.close(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/ConfigEnvVars.java
package ai.chalk.client; public class ConfigEnvVars { /** * Specifies the URL that all requests from ChalkClient will be sent to. */ public static String apiServerKey = "CHALK_API_SERVER"; /** * Used for authentication (obtaining an access token). */ public static String clientIdKey = "CHALK_CLIENT_ID"; /** * Used for authentication (obtaining an access token). */ public static String clientSecretKey = "CHALK_CLIENT_SECRET"; /** * This is the identifier that distinguishes between different * environments in your Chalk project. */ public static String environmentIdKey = "CHALK_ACTIVE_ENVIRONMENT"; /** * The path to the root CA certificate file. */ public static String rootCaKey = "CHALK_ROOT_CA_PATH"; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/GRPCClient.java
package ai.chalk.client; import ai.chalk.exceptions.ChalkException; import ai.chalk.exceptions.ClientException; import ai.chalk.exceptions.ServerError; import ai.chalk.internal.Utils; import ai.chalk.internal.arrow.FeatherProcessor; import ai.chalk.internal.config.Loader; import ai.chalk.internal.config.models.ProjectToken; import ai.chalk.models.OnlineQueryParamsComplete; import ai.chalk.models.OnlineQueryResult; import ai.chalk.models.UploadFeaturesParams; import ai.chalk.models.UploadFeaturesResult; import ai.chalk.protos.chalk.common.v1.*; import ai.chalk.protos.chalk.engine.v1.QueryServiceGrpc; import ai.chalk.protos.chalk.server.v1.AuthServiceGrpc; import ai.chalk.protos.chalk.server.v1.GetTokenResponse; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; import com.google.protobuf.Value; import io.grpc.*; import io.grpc.stub.MetadataUtils; import lombok.NonNull; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.table.Table; import javax.annotation.Nullable; import java.io.IOException; import java.nio.file.Path; import java.time.Duration; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import static ai.chalk.internal.arrow.FeatherProcessor.inputsToArrowBytes; public class GRPCClient implements ChalkClient, AutoCloseable { private static final Metadata.Key<String> CHALK_TRACE_ID_KEY = Metadata.Key.of("x-chalk-trace-id", Metadata.ASCII_STRING_MARSHALLER); private static final System.Logger logger = System.getLogger(GRPCClient.class.getName()); private final RootAllocator allocator = new RootAllocator(FeatherProcessor.ALLOCATOR_SIZE_ROOT); private final String resolvedEnvironmentId; private final String branchId; private final Optional<Duration> timeout; private final StubsProvider stubsProvider; private final ManagedChannel unauthServerChannel; private final ManagedChannel engineChannel; public GRPCClient() throws ChalkException { this(new BuilderImpl()); } public GRPCClient(BuilderImpl builder) throws ChalkException { ProjectToken chalkYamlConfig = new ProjectToken(); String projectRoot; try { projectRoot = Loader.loadProjectDirectory(); chalkYamlConfig = Loader.getChalkYamlConfig(projectRoot); } catch (Exception ignored) { } ResolvedConfig resolvedConfig = ResolvedConfig.fromBuilder(builder, chalkYamlConfig); if (resolvedConfig.clientId().value().isEmpty() || resolvedConfig.clientSecret().value().isEmpty()) { throw new IllegalArgumentException("Client ID and Client Secret are required"); } String grpcHost = resolvedConfig.grpcHost(); final ChannelCredentials channelCreds = getChannelCredentials(grpcHost, resolvedConfig); timeout = Optional.ofNullable(builder.getTimeout()); unauthServerChannel = Grpc.newChannelBuilder( grpcHost, channelCreds ) .maxInboundMessageSize(1024 * 1024 * 100) .intercept( new UnauthenticatedHeaderClientInterceptor(Map.of()) ).build(); TokenRefresher tokenRefresher = new TokenRefresher( resolvedConfig.clientId().value(), resolvedConfig.clientSecret().value(), AuthServiceGrpc.newBlockingStub(unauthServerChannel), this.timeout ); GetTokenResponse token = tokenRefresher.getToken(); String environmentId = resolvedConfig.environmentId().value(); if (environmentId.isEmpty() && !token.getPrimaryEnvironment().isEmpty()) { environmentId = token.getPrimaryEnvironment(); } if (environmentId.isEmpty()) { throw new IllegalArgumentException("Environment ID is required"); } if (!token.containsEnvironmentIdToName(environmentId)) { List<String> environmentIds = new java.util.ArrayList<>(); for (var entry : token.getEnvironmentIdToNameMap().entrySet()) { if (entry.getValue().equals(environmentId)) { environmentIds.add(entry.getKey()); } } if (environmentIds.isEmpty()) { throw new IllegalArgumentException("Environment name %s not found".formatted(environmentId)); } else if (environmentIds.size() > 1) { throw new IllegalArgumentException("Environment name %s is ambiguous among %s".formatted(environmentId, environmentIds)); } environmentId = environmentIds.get(0); } resolvedEnvironmentId = environmentId; branchId = builder.getBranch(); String engineHost; if (builder.getQueryServerOverride() != null && !builder.getQueryServerOverride().isEmpty()) { engineHost = builder.getQueryServerOverride(); } else { try { engineHost = token.getGrpcEnginesOrThrow(environmentId); } catch (Exception e) { throw new ClientException("Error getting engine URI for environment %s".formatted(environmentId), e); } } engineHost = engineHost.replaceFirst("^https?://", ""); /** * Create static retry policy (TODO: make it configurable) */ Map<String, Object> defaultServiceConfig = new HashMap<>(); Map<String, Object> methodConfig = new HashMap<>(); Map<String, Object> retryPolicy = new HashMap<>(); retryPolicy.put("maxAttempts", 3.0); retryPolicy.put("initialBackoff", "0.01s"); retryPolicy.put("maxBackoff", "0.1s"); retryPolicy.put("backoffMultiplier", 5.0); retryPolicy.put("retryableStatusCodes", Collections.singletonList("UNAVAILABLE")); methodConfig.put("name", Collections.singletonList(Map.of("service", "chalk.engine.v1.QueryService"))); methodConfig.put("retryPolicy", retryPolicy); defaultServiceConfig.put("methodConfig", Collections.singletonList(methodConfig)); engineChannel = Grpc.newChannelBuilder(engineHost, channelCreds) .maxInboundMessageSize(1024 * 1024 * 500) .intercept( new AuthenticatedHeaderClientInterceptor( ServerType.ENGINE, Map.of(), tokenRefresher, builder.getDeploymentTag() ) ) .defaultServiceConfig(defaultServiceConfig) .enableRetry() .build(); var queryStub = QueryServiceGrpc.newBlockingStub(engineChannel); this.stubsProvider = new StubsProvider(queryStub, this.timeout); } private static ChannelCredentials getChannelCredentials(String grpcHost, ResolvedConfig resolvedConfig) throws ClientException { if (grpcHost.startsWith("localhost") || grpcHost.startsWith("127.0.0.1")) { return InsecureChannelCredentials.create(); } else { var channelBuilder = TlsChannelCredentials.newBuilder(); if (!resolvedConfig.rootCa().value().isEmpty()) { try { channelBuilder.trustManager(Path.of(resolvedConfig.rootCa().value()).toFile()); } catch (IOException ex) { throw new ClientException("Error loading root CA file", ex); } } return channelBuilder.build(); } } @Override public void printConfig() { logger.log(System.Logger.Level.ERROR, "Config printing for GRPC client not yet implemented"); } private RequestHeaderInterceptor getRequestHeaderInterceptor( @Nullable String environmentIdOverride ) { return new RequestHeaderInterceptor(environmentIdOverride, this.resolvedEnvironmentId); } public OnlineQueryResult onlineQuery(OnlineQueryParamsComplete params) throws ChalkException { byte[] bodyBytes; try ( var childAllocator = allocator.newChildAllocator( "grpc_online_query_params", 0, FeatherProcessor.ALLOCATOR_SIZE_REQUEST ) ) { bodyBytes = inputsToArrowBytes(params.getInputs(), childAllocator); } catch (Exception e) { throw new ClientException("Failed to serialize OnlineQueryParams", e); } List<String> resolvedOutputs = params.getOutputs(); if (resolvedOutputs == null) { resolvedOutputs = new ArrayList<>(); } List<OutputExpr> outputs = new ArrayList<>(); for (var output : resolvedOutputs) { outputs.add(OutputExpr.newBuilder().setFeatureFqn(output).build()); } List<Timestamp> now = new ArrayList<>(); if (params.getNow() != null) { for (var n : params.getNow()) { now.add( Timestamp.newBuilder() .setSeconds(n.toEpochSecond()) .setNanos(n.getNano()) .build() ); } } var context = OnlineQueryContext.newBuilder(); if (params.getBranch() != null && !params.getBranch().isEmpty()) { context.setBranchId(params.getBranch()); } else if (this.branchId != null && !this.branchId.isEmpty()) { context.setBranchId(this.branchId); } if (params.getCorrelationId() != null) { context.setCorrelationId(params.getCorrelationId()); } if (params.getPreviewDeploymentId() != null) { context.setDeploymentId(params.getPreviewDeploymentId()); } if (params.getEnvironmentId() != null) { context.setEnvironment(params.getEnvironmentId()); } if (params.getQueryName() != null) { context.setQueryName(params.getQueryName()); } if (params.getQueryNameVersion() != null) { context.setQueryNameVersion(params.getQueryNameVersion()); } if (params.getTags() != null) { context.addAllTags(params.getTags()); } if (params.getRequiredResolverTags() != null) { context.addAllRequiredResolverTags(params.getRequiredResolverTags()); } var plannerOptions = new HashMap<String, Value>(); if (params.getPlannerOptions() != null) { for (var entry : params.getPlannerOptions().entrySet()) { plannerOptions.put(entry.getKey(), Utils.toProto(entry.getValue())); } } context.putAllOptions(plannerOptions); var options = OnlineQueryResponseOptions.newBuilder() .setIncludeMeta(params.isIncludeMeta() || params.isExplain()) .setEncodingOptions( FeatureEncodingOptions.newBuilder() .setEncodeStructsAsObjects(true) .build() ); if (params.isExplain()) { options.setExplain(ExplainOptions.newBuilder().build()); } if (params.getMeta() != null) { options.putAllMetadata(params.getMeta()); } var request = OnlineQueryBulkRequest.newBuilder() .setInputsFeather(ByteString.copyFrom(bodyBytes)) .addAllOutputs(outputs) .addAllNow(now) .setBodyType(FeatherBodyType.FEATHER_BODY_TYPE_TABLE) .setContext(context) .setResponseOptions(options) .build(); AtomicReference<Metadata> trailersRef = new AtomicReference<>(); OnlineQueryBulkResponse response = this.stubsProvider.getQueryStub(Optional.ofNullable(params.getTimeout())) .withInterceptors( MetadataUtils.newCaptureMetadataInterceptor(new AtomicReference<>(), trailersRef), this.getRequestHeaderInterceptor(params.getEnvironmentId()) ) .onlineQueryBulk(request); var meta = GrpcSerializer.toQueryMeta( response.getResponseMeta(), trailersRef.get().get(CHALK_TRACE_ID_KEY) ); ServerError[] errors = new ServerError[response.getErrorsCount()]; for (int i = 0; i < response.getErrorsCount(); i++) { errors[i] = GrpcSerializer.toServerError(response.getErrors(i)); } Table scalars = null; Map<String, Table> groups = new HashMap<>(); var responseAlloc = this.allocator.newChildAllocator( "grpc_online_query_response", 0, FeatherProcessor.ALLOCATOR_SIZE_RESPONSE ); try { if (!response.getScalarsData().isEmpty()) { try { scalars = FeatherProcessor.convertBytesToTable( response.getScalarsData().toByteArray(), responseAlloc ); } catch (Exception e) { throw new ClientException("Failed to convert scalar data bytes to table", e); } } for (var entry : response.getGroupsDataMap().entrySet()) { String fqn = entry.getKey(); try { groups.put( fqn, FeatherProcessor.convertBytesToTable(entry.getValue().toByteArray(), responseAlloc) ); } catch (Exception e) { throw new ClientException( String.format("Failed to convert bytes to table for feature '%s'", fqn), e ); } } } catch (Exception e) { if (scalars != null) { scalars.close(); } for (var table : groups.values()) { table.close(); } responseAlloc.close(); } return new OnlineQueryResult( scalars, groups, errors, meta, responseAlloc ); } public UploadFeaturesResult uploadFeatures(UploadFeaturesParams params) throws ChalkException { byte[] tableBytes; try { tableBytes = FeatherProcessor.inputsToArrowBytes(params.getInputs(), this.allocator); } catch (Exception e) { throw new ClientException("Failed to convert inputs to Arrow bytes", e); } UploadFeaturesResponse response = this.stubsProvider.getQueryStub(Optional.ofNullable(params.getTimeout())) .withInterceptors( this.getRequestHeaderInterceptor(params.getEnvironmentId()) ) .uploadFeatures( UploadFeaturesRequest.newBuilder() .setInputsTable(ByteString.copyFrom(tableBytes)) .build() ); List<ServerError> errors = new ArrayList<>(); for (int i = 0; i < response.getErrorsCount(); i++) { errors.add(GrpcSerializer.toServerError(response.getErrors(i))); } return new UploadFeaturesResult(response.getOperationId(), errors); } @Override public void close() throws InterruptedException { this.allocator.close(); this.unauthServerChannel.shutdown().awaitTermination(600, java.util.concurrent.TimeUnit.SECONDS); this.engineChannel.shutdown().awaitTermination(600, java.util.concurrent.TimeUnit.SECONDS); } /* * Wrapper class around stubs so that we can provide them along with universal * configurations like timeouts. */ public static class StubsProvider { private final @NonNull QueryServiceGrpc.QueryServiceBlockingStub queryStub; private final Optional<Duration> clientLevelTimeout; public StubsProvider( QueryServiceGrpc.QueryServiceBlockingStub queryStub, Optional<Duration> clientLevelTimeout ) { this.queryStub = queryStub; this.clientLevelTimeout = clientLevelTimeout; } public QueryServiceGrpc.QueryServiceBlockingStub getQueryStub(Optional<Duration> requestLevelTimeout) { Duration timeout = null; if (requestLevelTimeout.isPresent()) { timeout = requestLevelTimeout.get(); } else if (this.clientLevelTimeout.isPresent()) { timeout = this.clientLevelTimeout.get(); } if (timeout != null) { return queryStub.withDeadlineAfter(timeout.toMillis(), java.util.concurrent.TimeUnit.MILLISECONDS); } return queryStub; } } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/GrpcHeaders.java
package ai.chalk.client; import io.grpc.Metadata; public class GrpcHeaders { static final Metadata.Key<String> SERVER_TYPE_KEY = Metadata.Key.of( "x-chalk-server", Metadata.ASCII_STRING_MARSHALLER ); static final Metadata.Key<String> ENVIRONMENT_ID_KEY = Metadata.Key.of( "x-chalk-env-id", Metadata.ASCII_STRING_MARSHALLER ); static final Metadata.Key<String> AUTHORIZATION_KEY = Metadata.Key.of( "Authorization", Metadata.ASCII_STRING_MARSHALLER ); static final Metadata.Key<String> DEPLOYMENT_TYPE = Metadata.Key.of( "x-chalk-deployment-type", Metadata.ASCII_STRING_MARSHALLER ); static final Metadata.Key<String> DEPLOYMENT_TAG = Metadata.Key.of( "x-chalk-deployment-tag", Metadata.ASCII_STRING_MARSHALLER ); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/GrpcSerializer.java
package ai.chalk.client; import ai.chalk.models.ResolverException; import ai.chalk.protos.chalk.common.v1.ErrorCode; import ai.chalk.protos.chalk.common.v1.ErrorCodeCategory; import java.time.Instant; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.Map; public class GrpcSerializer { private static final Map<ErrorCode, ai.chalk.models.ErrorCode> errorCodeMap = Map.ofEntries( Map.entry(ErrorCode.ERROR_CODE_INTERNAL_SERVER_ERROR_UNSPECIFIED, ai.chalk.models.ErrorCode.INTERNAL_SERVER_ERROR), Map.entry(ErrorCode.ERROR_CODE_PARSE_FAILED, ai.chalk.models.ErrorCode.PARSE_FAILED), Map.entry(ErrorCode.ERROR_CODE_RESOLVER_NOT_FOUND, ai.chalk.models.ErrorCode.RESOLVER_NOT_FOUND), Map.entry(ErrorCode.ERROR_CODE_INVALID_QUERY, ai.chalk.models.ErrorCode.INVALID_QUERY), Map.entry(ErrorCode.ERROR_CODE_VALIDATION_FAILED, ai.chalk.models.ErrorCode.VALIDATION_FAILED), Map.entry(ErrorCode.ERROR_CODE_RESOLVER_FAILED, ai.chalk.models.ErrorCode.RESOLVER_FAILED), Map.entry(ErrorCode.ERROR_CODE_RESOLVER_TIMED_OUT, ai.chalk.models.ErrorCode.RESOLVER_TIMED_OUT), Map.entry(ErrorCode.ERROR_CODE_UPSTREAM_FAILED, ai.chalk.models.ErrorCode.UPSTREAM_FAILED), Map.entry(ErrorCode.ERROR_CODE_UNAUTHENTICATED, ai.chalk.models.ErrorCode.UNAUTHENTICATED), Map.entry(ErrorCode.ERROR_CODE_UNAUTHORIZED, ai.chalk.models.ErrorCode.UNAUTHORIZED), Map.entry(ErrorCode.ERROR_CODE_CANCELLED, ai.chalk.models.ErrorCode.CANCELLED), Map.entry(ErrorCode.ERROR_CODE_DEADLINE_EXCEEDED, ai.chalk.models.ErrorCode.DEADLINE_EXCEEDED) ); private static final Map<ErrorCodeCategory, ai.chalk.models.ErrorCodeCategory> errorCategoryMap = Map.ofEntries( Map.entry(ErrorCodeCategory.ERROR_CODE_CATEGORY_NETWORK_UNSPECIFIED, ai.chalk.models.ErrorCodeCategory.NETWORK), Map.entry(ErrorCodeCategory.ERROR_CODE_CATEGORY_REQUEST, ai.chalk.models.ErrorCodeCategory.REQUEST), Map.entry(ErrorCodeCategory.ERROR_CODE_CATEGORY_FIELD, ai.chalk.models.ErrorCodeCategory.FIELD) ); public static ai.chalk.models.ResolverException toException(ai.chalk.protos.chalk.common.v1.ChalkException e) { return new ai.chalk.models.ResolverException( e.getKind(), e.getMessage(), e.getStacktrace(), e.getInternalStacktrace() ); } public static ai.chalk.exceptions.ServerError toServerError(ai.chalk.protos.chalk.common.v1.ChalkError e) { ResolverException exception = null; if (e.hasException()) { exception = toException(e.getException()); } return new ai.chalk.exceptions.ServerError( errorCodeMap.get(e.getCode()), errorCategoryMap.get(e.getCategory()), e.getMessage(), exception, e.getFeature(), e.getResolver() ); } public static ai.chalk.models.QueryMeta toQueryMeta(ai.chalk.protos.chalk.common.v1.OnlineQueryMetadata meta, String traceId) { ZonedDateTime queryTimestamp = null; if (meta.hasQueryTimestamp()) { var ts = meta.getQueryTimestamp(); queryTimestamp = ZonedDateTime.ofInstant( Instant.ofEpochSecond(ts.getSeconds(), ts.getNanos()), ZoneOffset.UTC ); } return new ai.chalk.models.QueryMeta( meta.getExecutionDuration().getSeconds() + (meta.getExecutionDuration().getNanos() / 1e9), meta.getDeploymentId(), meta.getEnvironmentId(), meta.getEnvironmentName(), meta.getQueryId(), queryTimestamp, meta.getQueryHash(), traceId ); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/Lazy.java
package ai.chalk.client; import java.util.function.Supplier; class Lazy<T> implements Supplier<T> { private final Supplier<T> supplier; private volatile T value; Lazy(Supplier<T> supplier) { this.supplier = supplier; } @Override public T get() { if (value == null) { synchronized (this) { if (value == null) { value = supplier.get(); } } } return value; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/RequestHeaderInterceptor.java
package ai.chalk.client; import io.grpc.*; import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; import org.checkerframework.checker.nullness.qual.NonNull; import javax.annotation.Nullable; import java.util.HashMap; import java.util.Map; /** * A client interceptor that gets tacked on with every request to * allow for request-level header overrides such as environment ID. */ public class RequestHeaderInterceptor implements ClientInterceptor { public RequestHeaderInterceptor( @Nullable String requestEnvironmentId, @NonNull String clientEnvironmentId ) { this.allHeaders = new HashMap<>(); if (requestEnvironmentId != null && !requestEnvironmentId.isEmpty()) { this.allHeaders.put(GrpcHeaders.ENVIRONMENT_ID_KEY, requestEnvironmentId); } else { this.allHeaders.put(GrpcHeaders.ENVIRONMENT_ID_KEY, clientEnvironmentId); } } private final @NonNull Map<Metadata.Key<String>, String> allHeaders; @Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next ) { return new SimpleForwardingClientCall<>(next.newCall(method, callOptions)) { @Override public void start(Listener<RespT> responseListener, Metadata headers) { for (Map.Entry<Metadata.Key<String>, String> entry : allHeaders.entrySet()) { headers.put(entry.getKey(), entry.getValue()); } super.start(responseListener, headers); } }; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/ResolvedConfig.java
package ai.chalk.client; import ai.chalk.internal.config.models.ProjectToken; import ai.chalk.internal.config.models.SourcedConfig; import org.checkerframework.checker.nullness.qual.NonNull; public record ResolvedConfig( @NonNull SourcedConfig apiServer, @NonNull SourcedConfig clientId, @NonNull SourcedConfig clientSecret, @NonNull SourcedConfig environmentId, @NonNull SourcedConfig rootCa ) { public static ResolvedConfig fromBuilder( ChalkClient.Builder builder, ProjectToken chalkYamlConfig ) { return new ResolvedConfig( SourcedConfig.firstNonEmpty( SourcedConfig.fromBuilder(builder.getApiServer()), SourcedConfig.fromEnvVar(ConfigEnvVars.apiServerKey), SourcedConfig.fromConfigFile(chalkYamlConfig.getApiServer()), new SourcedConfig("default", "https://api.chalk.ai") ), SourcedConfig.firstNonEmpty( SourcedConfig.fromBuilder(builder.getClientId()), SourcedConfig.fromEnvVar(ConfigEnvVars.clientIdKey), SourcedConfig.fromConfigFile(chalkYamlConfig.getClientId()) ), SourcedConfig.firstNonEmpty( SourcedConfig.fromBuilder(builder.getClientSecret()), SourcedConfig.fromEnvVar(ConfigEnvVars.clientSecretKey), SourcedConfig.fromConfigFile(chalkYamlConfig.getClientSecret()) ), SourcedConfig.firstNonEmpty( SourcedConfig.fromBuilder(builder.getEnvironmentId()), SourcedConfig.fromEnvVar(ConfigEnvVars.environmentIdKey), SourcedConfig.fromConfigFile(chalkYamlConfig.getActiveEnvironment()) ), SourcedConfig.firstNonEmpty( SourcedConfig.fromBuilder(builder.getRootCa() == null ? "" : builder.getRootCa().toString()), SourcedConfig.fromEnvVar(ConfigEnvVars.rootCaKey), SourcedConfig.fromConfigFile(chalkYamlConfig.getRootCa()) ) ); } public String grpcHost() { return apiServer.value().replaceFirst("^https?://", ""); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/ServerType.java
package ai.chalk.client; public enum ServerType { ENGINE, SERVER; public String headerName() { return switch (this) { case ENGINE -> "engine"; case SERVER -> "go-api"; }; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/TokenRefresher.java
package ai.chalk.client; import ai.chalk.protos.chalk.server.v1.AuthServiceGrpc; import ai.chalk.protos.chalk.server.v1.GetTokenRequest; import ai.chalk.protos.chalk.server.v1.GetTokenResponse; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; import java.time.Duration; import java.util.Optional; public class TokenRefresher { private final AuthServiceGrpc.AuthServiceBlockingStub blockingStub; @NonNull private final String clientId; @NonNull private final String clientSecret; @Nullable private GetTokenResponse lastToken; @NonNull private final Optional<Duration> timeout; public TokenRefresher( @NonNull String clientId, @NonNull String clientSecret, AuthServiceGrpc.AuthServiceBlockingStub blockingStub, @NonNull Optional<Duration> timeout ) { this.clientId = clientId; this.clientSecret = clientSecret; this.blockingStub = blockingStub; this.lastToken = null; this.timeout = timeout; } public @NonNull GetTokenResponse getToken() { if ( this.lastToken == null || this.lastToken.getExpiresAt().getSeconds() < System.currentTimeMillis() / 1000 + 60 ) { var stub = this.blockingStub; if (this.timeout.isPresent()) { stub = stub.withDeadlineAfter(this.timeout.get().toMillis(), java.util.concurrent.TimeUnit.MILLISECONDS); } this.lastToken = stub .getToken( GetTokenRequest.newBuilder() .setClientId(this.clientId) .setClientSecret(this.clientSecret) .build() ); } return this.lastToken; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/client/UnauthenticatedHeaderClientInterceptor.java
package ai.chalk.client; import io.grpc.*; import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; import io.grpc.stub.MetadataUtils; import org.checkerframework.checker.nullness.qual.NonNull; import java.util.HashMap; import java.util.Map; /** * A client interceptor that adds the server type and environment ID to the headers of all outgoing */ public class UnauthenticatedHeaderClientInterceptor implements ClientInterceptor { public UnauthenticatedHeaderClientInterceptor(@NonNull Map<String, String> additionalHeaders) { this.allHeaders = new HashMap<>(Map.of( GrpcHeaders.SERVER_TYPE_KEY, ServerType.SERVER.headerName() )); for (Map.Entry<String, String> entry : additionalHeaders.entrySet()) { this.allHeaders.put(Metadata.Key.of(entry.getKey(), Metadata.ASCII_STRING_MARSHALLER), entry.getValue()); } } private final @NonNull Map<Metadata.Key<String>, String> allHeaders; @Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next ) { return new SimpleForwardingClientCall<>(next.newCall(method, callOptions)) { @Override public void start(Listener<RespT> responseListener, Metadata headers) { for (Map.Entry<Metadata.Key<String>, String> entry : allHeaders.entrySet()) { headers.put(entry.getKey(), entry.getValue()); } super.start(responseListener, headers); } }; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/exceptions/ChalkException.java
package ai.chalk.exceptions; /** * Base class for all Chalk exceptions. */ public abstract class ChalkException extends Exception { public ChalkException(String message) { super(message); } public ChalkException(String message, Throwable cause) { super(message, cause); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/exceptions/ClientException.java
package ai.chalk.exceptions; /** * Exception that originates from the client. For example, when * the client is not configured correctly, or when there is an * error marshalling or unmarshalling a response, etc. */ public class ClientException extends ChalkException { public ClientException(String message) { super(message); } public ClientException(String message, Throwable cause) { super(message, cause); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/exceptions/ServerError.java
package ai.chalk.exceptions; import ai.chalk.models.ErrorCode; import ai.chalk.models.ErrorCodeCategory; import ai.chalk.models.ResolverException; import lombok.*; /** * ServerError is an error that occurred in Chalk's server, * for example, when a resolver unexpectedly fails to run. */ @Data @NoArgsConstructor @AllArgsConstructor public class ServerError { /** * The type of the error. */ private ErrorCode code; /** * The category of the error, given in the type field for * the error codes. This will be one of "REQUEST", "NETWORK", * and "FIELD". */ private ErrorCodeCategory category; /** * A readable description of the error message. */ private String message; /** * The exception that caused the failure, if applicable. */ private ResolverException exception; /** * The fully qualified name of the failing feature, e.g. * `user.identity.has_voip_phone`. */ private String feature; /** * The fully qualified name of the failing resolver, e.g. * `my.project.get_fraud_score`. */ private String resolver; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/exceptions/ServerException.java
package ai.chalk.exceptions; import ai.chalk.internal.request.models.ChalkHttpException; import lombok.Getter; /** * Exception thrown when the server errors out from a cause * that is not directly related to the Chalk query itself. */ @Getter public class ServerException extends ChalkException { public String detail; public String trace; public ServerError[] errors; public int statusCode; public int contentLength; public String URL; public ServerException(ChalkHttpException e, int statusCode, int contentLength, String URL) { super(e.toString()); this.detail = e.getDetail(); this.trace = e.getTrace(); this.errors = e.getErrors(); this.statusCode = statusCode; this.contentLength = contentLength; this.URL = URL; } public ServerException(int statusCode, int contentLength, String URL) { super(String.format("Server Exception with status code: %d", statusCode)); this.statusCode = statusCode; this.contentLength = contentLength; this.URL = URL; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/Feature.java
package ai.chalk.features; import lombok.Data; @Data public class Feature<T> { private String fqn; private T value; public Feature() { } public Feature(String fqn, T value) { this.fqn = fqn; this.value = value; } public void setFqn(String fqn) { this.fqn = fqn; } public void setValue(Object value) { this.value = (T) value; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/FeaturesBase.java
package ai.chalk.features; import lombok.Data; @Data public class FeaturesBase { private String fqn; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/FeaturesClass.java
package ai.chalk.features; import java.time.ZonedDateTime; public class FeaturesClass extends FeaturesBase { public Feature<ZonedDateTime> __chalk_observed_at__; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/HasMany.java
package ai.chalk.features; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface HasMany { String localKey(); String foreignKey(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/Name.java
package ai.chalk.features; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Name { String value(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/StructFeaturesClass.java
package ai.chalk.features; public class StructFeaturesClass extends FeaturesBase {}
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/Versioned.java
package ai.chalk.features; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Versioned { int defaultVersion() default 0; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/features/WindowedFeaturesClass.java
package ai.chalk.features; public class WindowedFeaturesClass extends FeaturesBase {}
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/Constants.java
package ai.chalk.internal; public class Constants { public static String tsFeatureFqn = "__ts__"; public static String indexFqn = "__index__"; public static String chalkDunderPrefix = "__chalk__."; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/FieldMeta.java
package ai.chalk.internal; import ai.chalk.features.FeaturesBase; import ai.chalk.features.FeaturesClass; import ai.chalk.features.StructFeaturesClass; import ai.chalk.features.WindowedFeaturesClass; import java.lang.reflect.Field; public record FieldMeta(Field field, Class<?> listUnderlyingClass, String resolvedName) { public boolean isList() { return listUnderlyingClass != null; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/NamespaceMemoItem.java
package ai.chalk.internal; import java.util.HashMap; import java.util.List; import java.util.Map; public class NamespaceMemoItem { public Map<String, List<FieldMeta>> resolvedNameToFieldMetas; public NamespaceMemoItem() { resolvedNameToFieldMetas = new HashMap<>(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/Utils.java
package ai.chalk.internal; import ai.chalk.features.Name; import ai.chalk.features.Versioned; import ai.chalk.features.WindowedFeaturesClass; import com.google.protobuf.ListValue; import com.google.protobuf.NullValue; import com.google.protobuf.Struct; import com.google.protobuf.Value; import java.lang.reflect.Array; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.time.Duration; import java.util.Arrays; import java.util.List; import java.time.temporal.ChronoUnit; import java.util.Map; import java.util.regex.Pattern; public class Utils { private static final Pattern snakeCase1 = Pattern.compile("(.)([A-Z][a-z]+)"); private static final Pattern snakeCase2 = Pattern.compile("__([A-Z])"); private static final Pattern snakeCase3 = Pattern.compile("([a-z0-9])([A-Z])"); public static String getResolvedName(Field field) { String fieldName; // If has the Name annotation, use that as the name // Otherwise, use the field name snake cased if (field.isAnnotationPresent(Name.class)) { fieldName = field.getAnnotation(Name.class).value(); } else { fieldName = chalkpySnakeCase(field.getName()); } if (field.isAnnotationPresent(Versioned.class)) { Versioned versionInfo = field.getAnnotation(Versioned.class); if (versionInfo.defaultVersion() == 0) { // Is not base version feature, so we need to strip the `_vN` suffix by splitting on '_' String[] parts = fieldName.split("_"); // Parse the digits from the last part of the FQN, which looks something like `v1` String versionStr = parts[parts.length - 1].substring(1); String base = String.join("_", Arrays.copyOf(parts, parts.length - 1)); if (versionStr.equals("1")) { // If the version is 1, we don't need to append it to the FQN fieldName = base; } else { fieldName = base + "@" + versionStr; } } else if (versionInfo.defaultVersion() > 1) { // Is base version feature, so we need to append the default version to the FQN fieldName += "@" + versionInfo.defaultVersion(); } return fieldName; } else if (WindowedFeaturesClass.class.isAssignableFrom(field.getDeclaringClass())) { // Convert bucket_1h to __3600s__ String durationWithUnitStr = fieldName.substring("bucket_".length()); String convertedDurationStr = Utils.convertBucketDurationToSeconds(durationWithUnitStr); fieldName = String.format("__%s__", convertedDurationStr); } return fieldName; } public static String chalkpySnakeCase(String s) { // Aims to be in parity with chalkpy's impl s = snakeCase1.matcher(s).replaceAll("$1_$2"); s = snakeCase2.matcher(s).replaceAll("_$1"); s = snakeCase3.matcher(s).replaceAll("$1_$2"); return s.toLowerCase(); } public static <T> T[] listToArray(List<T> list, Class<T> clazz) { @SuppressWarnings("unchecked") T[] array = (T[]) Array.newInstance(clazz, list.size()); return list.toArray(array); } public static String getDotDelimitedLastSection(String s) { var splitArr = s.split("\\."); return splitArr[splitArr.length - 1]; } public static Field getFieldFromFqn(Class<?> clazz, String fqn) throws Exception { String featureName = Utils.getDotDelimitedLastSection(fqn); for (Field field : clazz.getDeclaredFields()) { if (Utils.getResolvedName(field).equals(featureName)) { return field; } } throw new IllegalArgumentException("Field that corresponds to the feature '" + featureName + "' does not exist in class " + clazz.getName()); } public static Class<?> getInnerTypeFromListType(Type genericType) throws Exception { if (genericType instanceof ParameterizedType) { ParameterizedType paramType = (ParameterizedType) genericType; Type[] typeArgs = paramType.getActualTypeArguments(); for (Type arg : typeArgs) { if (arg instanceof ParameterizedType) { ParameterizedType innerParamType = (ParameterizedType) arg; Type[] innerTypeArgs = innerParamType.getActualTypeArguments(); for (Type innerArg : innerTypeArgs) { if (innerArg instanceof Class<?>) { return (Class<?>) innerArg; } } } } } throw new Exception("not a parameterized type"); } public static Class<?> getInnerTypeFromListField(Field field) throws Exception { Type genericType = field.getGenericType(); try { return getInnerTypeFromListType(genericType); } catch (Exception e) { throw new Exception( "Could not get inner type of field " + field.getName() + " in class " + field.getDeclaringClass().getName(), e ); } } public static boolean isInteger(String s) { try { Integer.parseInt(s); return true; } catch (NumberFormatException e) { return false; } } public static String formatBucketDuration(int duration) { String[] units = {"s", "m", "h", "d", "w"}; int[] divisors = {60, 60, 24, 7}; for (int i = 0; i < divisors.length; i++) { if (duration % divisors[i] != 0) { return String.format("%d%s", duration, units[i]); } duration = duration / divisors[i]; } return String.format("%d%s", duration, units[units.length - 1]); } public static String convertBucketDurationToSeconds(String duration) { if (duration.equals("all")) { return duration; } String[] units = {"s", "m", "h", "d", "w"}; int[] multipliers = {1, 60, 3600, 86400, 604800}; for (int i = 0; i < units.length; i++) { if (duration.endsWith(units[i])) { var secondsInt = Integer.parseInt(duration.substring(0, duration.length() - units[i].length())) * multipliers[i]; return String.format("%d", secondsInt); } } throw new IllegalArgumentException("Invalid bucket duration: " + duration); } public static Object[] convertToArrayOfObjects(Object array) { if (!array.getClass().isArray()) { throw new IllegalArgumentException("Provided object is not an array"); } int length = Array.getLength(array); Object[] outputArray = new Object[length]; for (int i = 0; i < length; i++) { outputArray[i] = Array.get(array, i); } return outputArray; } public static String toChalkDuration(Duration duration) { if (ChronoUnit.FOREVER.getDuration().equals(duration)) { return "all"; } long seconds = duration.getSeconds(); long nanoseconds = duration.getNano(); long weeks = seconds / (7 * 24 * 60 * 60); seconds %= (7 * 24 * 60 * 60); long days = seconds / (24 * 60 * 60); seconds %= (24 * 60 * 60); long hours = seconds / (60 * 60); seconds %= (60 * 60); long minutes = seconds / 60; seconds %= 60; long milliseconds = nanoseconds / 1_000_000; nanoseconds %= 1_000_000; long microseconds = nanoseconds / 1_000; nanoseconds %= 1_000; StringBuilder builder = new StringBuilder(); if (weeks > 0) { builder.append(weeks).append("w "); } if (days > 0) { builder.append(days).append("d "); } if (hours > 0) { builder.append(hours).append("h "); } if (minutes > 0) { builder.append(minutes).append("m "); } if (seconds > 0) { builder.append(seconds).append("s "); } if (milliseconds > 0) { builder.append(milliseconds).append("ms "); } // Sub milliseconds not supported, but let's // have the server do the validation. if (microseconds > 0) { builder.append(microseconds).append("us "); } if (nanoseconds > 0) { builder.append(nanoseconds).append("ns "); } var res = builder.toString().trim(); if (res.isEmpty()) { return "0s"; } return res; } public static Value toProto(Object obj) { Value.Builder valueBuilder = Value.newBuilder(); if (obj == null) { valueBuilder.setNullValue(NullValue.NULL_VALUE); } else if (obj instanceof String) { valueBuilder.setStringValue((String) obj); } else if (obj instanceof Number) { valueBuilder.setNumberValue(((Number) obj).doubleValue()); } else if (obj instanceof Boolean) { valueBuilder.setBoolValue((Boolean) obj); } else if (obj instanceof Map) { Struct.Builder structBuilder = Struct.newBuilder(); Map<?, ?> map = (Map<?, ?>) obj; for (Map.Entry<?, ?> entry : map.entrySet()) { String key = entry.getKey().toString(); Value value = toProto(entry.getValue()); structBuilder.putFields(key, value); } valueBuilder.setStructValue(structBuilder.build()); } else if (obj instanceof List) { ListValue.Builder listBuilder = ListValue.newBuilder(); List<?> list = (List<?>) obj; for (Object item : list) { listBuilder.addValues(toProto(item)); } valueBuilder.setListValue(listBuilder.build()); } else { throw new IllegalArgumentException("Unsupported object type: " + obj.getClass().getName()); } return valueBuilder.build(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/arrow/FeatherProcessor.java
package ai.chalk.internal.arrow; import ai.chalk.internal.Utils; import org.apache.arrow.compression.CommonsCompressionFactory; import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.*; import org.apache.arrow.vector.complex.LargeListVector; import org.apache.arrow.vector.complex.StructVector; import org.apache.arrow.vector.complex.impl.*; import org.apache.arrow.vector.complex.writer.*; import org.apache.arrow.vector.holders.TimeStampMicroHolder; import org.apache.arrow.vector.holders.TimeStampMicroTZHolder; import org.apache.arrow.vector.ipc.ArrowFileReader; import org.apache.arrow.vector.ipc.ArrowFileWriter; import org.apache.arrow.vector.ipc.SeekableReadChannel; import org.apache.arrow.vector.util.ByteArrayReadableSeekableByteChannel; import org.apache.arrow.vector.table.Table; import org.apache.arrow.vector.util.VectorSchemaRootAppender; import java.io.ByteArrayOutputStream; import java.nio.channels.Channels; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.*; public class FeatherProcessor { public static final long ALLOCATOR_SIZE_REQUEST = 1_000_000_000; public static final long ALLOCATOR_SIZE_RESPONSE = 10 * ALLOCATOR_SIZE_REQUEST; public static final long ALLOCATOR_SIZE_ROOT = ALLOCATOR_SIZE_RESPONSE * 500; public static final long ALLOCATOR_SIZE_TEST = ALLOCATOR_SIZE_RESPONSE / 100; public static ArrayList<StructEntry> getEntriesFromMap(Map<String, ?> obj) { var entries = new ArrayList<StructEntry>(); for (var entry : obj.entrySet()) { entries.add(new StructEntry(entry.getKey(), entry.getValue())); } return entries; } public static ArrayList<StructEntry> getEntriesFromObject(Object obj) throws Exception { /* Currently not supported since we limit to Map on the top level. .withInput("user.struct_feature__via_classes__", Arrays.asList( new StructWithStructList("a", 1.0, Arrays.asList(new InnerStruct("a", 1.0), new InnerStruct("b", 2.0))), new StructWithStructList("b", 2.0, Arrays.asList(new InnerStruct("c", 3.0), new InnerStruct("d", 4.0))), new StructWithStructList("c", 3.0, Arrays.asList(new InnerStruct("e", 5.0), new InnerStruct("f", 6.0))) )) */ var pairs = new ArrayList<StructEntry>(); var fields = obj.getClass().getDeclaredFields(); for (var field : fields) { var value = field.get(obj); pairs.add(new StructEntry(field.getName(), value)); } return pairs; } public static ArrayList<StructEntry> getEntries(Object obj) throws Exception { if (obj instanceof Map mapObj) { return getEntriesFromMap(mapObj); } else { return getEntriesFromObject(obj); } } public static void writeValue(BaseWriter writer, Object value, BufferAllocator allocator) throws Exception { if (value == null) { writer.writeNull(); } else if (value instanceof Integer) { if (!(writer instanceof BigIntWriter intWriter)) { throw new Exception(String.format("Have `Integer` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } intWriter.writeBigInt((Integer) value); } else if (value instanceof Long) { if (!(writer instanceof BigIntWriter intWriter)) { throw new Exception(String.format("Have `Long` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } intWriter.writeBigInt((Long) value); } else if (value instanceof Double) { if (!(writer instanceof Float8Writer floatWriter)) { throw new Exception(String.format("Have `Double` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } floatWriter.writeFloat8((Double) value); } else if (value instanceof String stringValue) { if (!(writer instanceof LargeVarCharWriter stringWriter)) { throw new Exception(String.format("Have `String` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } var bytesValue = stringValue.getBytes(); try ( ArrowBuf tempBuf = allocator.buffer(bytesValue.length) ) { tempBuf.setBytes(0, bytesValue); stringWriter.writeLargeVarChar(0, bytesValue.length, tempBuf); } } else if (value instanceof Boolean) { if (!(writer instanceof BitWriter boolWriter)) { throw new Exception(String.format("Have `Boolean` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } boolWriter.writeBit((Boolean) value ? 1 : 0); } else if (value instanceof byte[] binaryValue) { if (!(writer instanceof LargeVarBinaryWriter binaryWriter)) { throw new Exception(String.format("Have `byte[]` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } try ( ArrowBuf tempBuf = allocator.buffer(binaryValue.length) ) { tempBuf.setBytes(0, binaryValue); binaryWriter.writeLargeVarBinary(0, binaryValue.length, tempBuf); } } else if (value instanceof ZonedDateTime zonedDt) { if (!(writer instanceof TimeStampMicroTZWriter timestampWriter)) { throw new Exception(String.format("Have `ZonedDateTime` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } TimeStampMicroTZHolder holder = new TimeStampMicroTZHolder(); holder.value = zonedDt.toInstant().getEpochSecond() * 1_000_000 + zonedDt.getNano() / 1_000; holder.timezone = zonedDt.getZone().toString(); timestampWriter.write(holder); } else if (value instanceof LocalDateTime localDt) { if (!(writer instanceof TimeStampMicroWriter timestampWriter)) { throw new Exception(String.format("Have `LocalDateTime` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } TimeStampMicroHolder holder = new TimeStampMicroHolder(); holder.value = localDt.atZone(ZoneId.of("UTC")).toInstant().getEpochSecond() * 1_000_000 + localDt.getNano() / 1_000; timestampWriter.write(holder); } else if (value instanceof List) { if (!(writer instanceof BaseWriter.ListWriter)) { throw new Exception(String.format("Have `List` value but mismatched writer type '%s': ", writer.getClass().getSimpleName())); } BaseWriter.ListWriter listWriter = (BaseWriter.ListWriter) writer; BaseWriter innerWriter; if (((List<?>) value).size() == 0) { throw new Exception("Input values is an `Array` or a `List` of length 0"); } var firstItem = ((List<?>) value).get(0); if (firstItem instanceof Integer) { innerWriter = listWriter.bigInt(); } else if (firstItem instanceof Long) { innerWriter = listWriter.bigInt(); } else if (firstItem instanceof Double) { innerWriter = listWriter.float8(); } else if (firstItem instanceof String) { innerWriter = listWriter.largeVarChar(); } else if (firstItem instanceof Boolean) { innerWriter = listWriter.bit(); } else if (firstItem instanceof byte[]) { innerWriter = listWriter.largeVarBinary(); } else if (firstItem instanceof ZonedDateTime) { innerWriter = listWriter.timeStampMicroTZ(); } else if (firstItem instanceof LocalDateTime) { innerWriter = listWriter.timeStampMicro(); } else if (firstItem instanceof List) { innerWriter = listWriter.list(); } else { innerWriter = listWriter.struct(); } listWriter.startList(); for (Object item: (List<?>) value) { writeValue(innerWriter, item, allocator); } listWriter.endList(); } else if (writer instanceof NullableStructWriter structWriter) { // Yes, this is duplicated with `UnionListWriter` below. structWriter.start(); for (var pair: getEntries(value)) { var fieldVal = pair.value(); var fieldName = pair.key(); if (fieldVal instanceof Integer) { writeValue(structWriter.bigInt(fieldName), fieldVal, allocator); } else if (fieldVal instanceof Long) { writeValue(structWriter.bigInt(fieldName), fieldVal, allocator); } else if (fieldVal instanceof Double) { writeValue(structWriter.float8(fieldName), fieldVal, allocator); } else if (fieldVal instanceof String) { writeValue(structWriter.largeVarChar(fieldName), fieldVal, allocator); } else if (fieldVal instanceof Boolean) { writeValue(structWriter.bit(fieldName), fieldVal, allocator); } else if (fieldVal instanceof byte[]) { writeValue(structWriter.largeVarBinary(fieldName), fieldVal, allocator); } else if (fieldVal instanceof ZonedDateTime) { writeValue(structWriter.timeStampMicroTZ(fieldName), fieldVal, allocator); } else if (fieldVal instanceof LocalDateTime) { writeValue(structWriter.timeStampMicro(fieldName), fieldVal, allocator); } else if (fieldVal instanceof List) { writeValue(structWriter.list(fieldName), fieldVal, allocator); } else { throw new Exception("Unsupported data type: " + fieldVal.getClass().getSimpleName()); } } structWriter.end(); } else if (writer instanceof UnionListWriter structWriter) { // The mystery of the century presents itself: // when we do `.struct()` we get a `UnionListWriter` instead of a `NullableStructWriter` structWriter.start(); for (var pair: getEntries(value)) { var fieldVal = pair.value(); var fieldName = pair.key(); if (fieldVal instanceof Integer) { writeValue(structWriter.bigInt(fieldName), fieldVal, allocator); } else if (fieldVal instanceof Long) { writeValue(structWriter.bigInt(fieldName), fieldVal, allocator); } else if (fieldVal instanceof Double) { writeValue(structWriter.float8(fieldName), fieldVal, allocator); } else if (fieldVal instanceof String) { writeValue(structWriter.largeVarChar(fieldName), fieldVal, allocator); } else if (fieldVal instanceof Boolean) { writeValue(structWriter.bit(fieldName), fieldVal, allocator); } else if (fieldVal instanceof ZonedDateTime) { writeValue(structWriter.timeStampMicroTZ(fieldName), fieldVal, allocator); } else if (fieldVal instanceof LocalDateTime) { writeValue(structWriter.timeStampMicro(fieldName), fieldVal, allocator); } else if (fieldVal instanceof byte[]) { writeValue(structWriter.largeVarBinary(fieldName), fieldVal, allocator); } else if (fieldVal instanceof List) { writeValue(structWriter.list(fieldName), fieldVal, allocator); } else { throw new Exception("Unsupported data type: " + fieldVal.getClass().getSimpleName()); } } structWriter.end(); } else { throw new Exception("Unsupported data type: " + value.getClass().getSimpleName()); } } public static byte[] inputsToArrowBytes(Map<String, List<?>> inputs, BufferAllocator allocator) throws Exception { List<FieldVector> fieldVectors = new ArrayList<>(); var uniformListLength = -1; for (Map.Entry<String, List<?>> entry : inputs.entrySet()) { List<?> value = entry.getValue(); List<Object> values; try { values = new ArrayList<>(value); } catch (Exception e) { throw new Exception(String.format("error converting '%s' value to a `List<Object>`: %s", entry.getKey(), e.getMessage())); } if (values.size() == 0) { throw new Exception("Input values is an `Array` or a `List` of length 0"); } else if (uniformListLength == -1) { uniformListLength = values.size(); } else if (uniformListLength != values.size()) { throw new Exception(String.format("Input values have different lengths - expected %d but got %d: %s", uniformListLength, values.size(), values)); } Object firstNonNull = null; for (Object item : values) { if (item != null) { firstNonNull = item; break; } } var fqn = entry.getKey(); if (firstNonNull == null) { NullVector nullVector = new NullVector(entry.getKey(), values.size()); fieldVectors.add(nullVector); } else if (firstNonNull instanceof Integer) { BigIntVector intVector = new BigIntVector(fqn, allocator); fieldVectors.add(intVector); var writer = new BigIntWriterImpl(intVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof Long) { BigIntVector longVector = new BigIntVector(fqn, allocator); fieldVectors.add(longVector); var writer = new BigIntWriterImpl(longVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof Double) { Float8Vector doubleVector = new Float8Vector(fqn, allocator); fieldVectors.add(doubleVector); var writer = new Float8WriterImpl(doubleVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof String) { LargeVarCharVector stringVector = new LargeVarCharVector(fqn, allocator); fieldVectors.add(stringVector); var writer = new LargeVarCharWriterImpl(stringVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof Boolean) { BitVector boolVector = new BitVector(fqn, allocator); fieldVectors.add(boolVector); var writer = new BitWriterImpl(boolVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof byte[]) { LargeVarBinaryVector binaryVector = new LargeVarBinaryVector(fqn, allocator); fieldVectors.add(binaryVector); var writer = new LargeVarBinaryWriterImpl(binaryVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof ZonedDateTime zonedDt) { String tz = zonedDt.getZone().toString(); TimeStampMicroTZVector timestampVector = new TimeStampMicroTZVector(fqn, allocator, tz); fieldVectors.add(timestampVector); var writer = new TimeStampMicroTZWriterImpl(timestampVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof LocalDateTime localDt) { TimeStampMicroVector timestampVector = new TimeStampMicroVector(fqn, allocator); fieldVectors.add(timestampVector); var writer = new TimeStampMicroWriterImpl(timestampVector); for (int i = 0; i < values.size(); i++) { writer.setPosition(i); writeValue(writer, values.get(i), allocator); } } else if (firstNonNull instanceof List) { var listVector = LargeListVector.empty(fqn, allocator); fieldVectors.add(listVector); var writer = listVector.getWriter(); for (Object o : values) { writeValue(writer, o, allocator); } writer.setValueCount(values.size()); } else if (firstNonNull instanceof Map) { var structVector = StructVector.empty(fqn, allocator); fieldVectors.add(structVector); var writer = structVector.getWriter(); for (Object o : values) { writeValue(writer, o, allocator); } // Importante to `setValueCount` otherwise values all null. writer.setValueCount(values.size()); } else { throw new Exception("Unsupported data type: " + firstNonNull.getClass().getSimpleName()); } } try ( VectorSchemaRoot root = VectorSchemaRoot.of(Utils.listToArray(fieldVectors, FieldVector.class)); ByteArrayOutputStream out = new ByteArrayOutputStream(); ArrowFileWriter writer = new ArrowFileWriter(root, null, Channels.newChannel(out)); ) { writer.start(); writer.writeBatch(); writer.end(); return out.toByteArray(); } } /* getTableIfBatchSizeOne exists only because we want to skip using VectorSchemaRootAppender (when there are multiple batches, we use VectorSchemaRootAppender to concatenate the batches) because VectorSchemaRootAppender does not work with LargeLists (fails with: ``` class org.apache.arrow.vector.complex.LargeListVector cannot be cast to class org.apache.arrow.vector.complex.ListVector ``` ). */ public static Table getTableIfBatchSizeOne(byte[] bytes, BufferAllocator allocator) throws Exception { try ( SeekableReadChannel seekableReadChannelBatchCounter = new SeekableReadChannel( new ByteArrayReadableSeekableByteChannel(bytes) ); ArrowFileReader arrowFileReaderBatchCounter = new ArrowFileReader( seekableReadChannelBatchCounter, allocator, new CommonsCompressionFactory() ); VectorSchemaRoot readerRootBatchCounter = arrowFileReaderBatchCounter.getVectorSchemaRoot(); ) { var numBatches = 0; Table firstTable = null; while (arrowFileReaderBatchCounter.loadNextBatch()) { if (firstTable == null) { firstTable = new Table(readerRootBatchCounter); } numBatches += 1; } if (numBatches == 1) { return firstTable; } else if (firstTable != null) { firstTable.close(); } } return null; } public static Table convertBytesToTable(byte[] bytes, BufferAllocator allocator) throws Exception { var maybeSingleBatchTable = getTableIfBatchSizeOne(bytes, allocator); if (maybeSingleBatchTable != null) { return maybeSingleBatchTable; } try ( SeekableReadChannel seekableReadChannel = new SeekableReadChannel( new ByteArrayReadableSeekableByteChannel(bytes) ); ArrowFileReader arrowFileReader = new ArrowFileReader( seekableReadChannel, allocator, new CommonsCompressionFactory() ); VectorSchemaRoot readerRoot = arrowFileReader.getVectorSchemaRoot(); VectorSchemaRoot collectorRoot = VectorSchemaRoot.create(readerRoot.getSchema(), allocator) ) { collectorRoot.allocateNew(); while (arrowFileReader.loadNextBatch()) { VectorSchemaRootAppender.append(collectorRoot, readerRoot); } Table table = new Table(collectorRoot); arrowFileReader.close(); return table; } } public static Table inputsToTable(Map<String, List<?>> inputs, BufferAllocator allocator) throws Exception { return convertBytesToTable(inputsToArrowBytes(inputs, allocator), allocator); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/arrow/StructEntry.java
package ai.chalk.internal.arrow; public record StructEntry(String key, Object value) {}
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/arrow/Unmarshaller.java
package ai.chalk.internal.arrow; import ai.chalk.exceptions.ClientException; import ai.chalk.features.*; import ai.chalk.internal.Constants; import ai.chalk.internal.FieldMeta; import ai.chalk.internal.NamespaceMemoItem; import ai.chalk.internal.Utils; import ai.chalk.internal.codegen.FieldSetter; import ai.chalk.internal.codegen.Initializer; import ai.chalk.models.OnlineQueryResult; import org.apache.arrow.vector.*; import org.apache.arrow.vector.complex.LargeListVector; import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.complex.StructVector; import org.apache.arrow.vector.table.Table; import org.apache.arrow.vector.types.DateUnit; import org.apache.arrow.vector.types.FloatingPointPrecision; import org.apache.arrow.vector.types.pojo.ArrowType; import java.lang.reflect.Field; import java.time.*; import java.util.*; import static ai.chalk.internal.Utils.*; public class Unmarshaller { public static List<String> fqnsToSkip = List.of(Constants.tsFeatureFqn, Constants.indexFqn); public static List<String> prefixToSkip = List.of(Constants.chalkDunderPrefix); public static <T extends FeaturesClass> T[] unmarshalOnlineQueryResult(OnlineQueryResult result, Class<T> target) throws ClientException { try { var rootFeatureClasses = unmarshalTable(result.getScalarsTable(), target); // This only unmarshals if has-many features gets returned in `result.groupsTables` // When using gRPC, has-many results get returned directly as lists of structs in // `result.scalarsTable`. unmarshalHasMany(result.getGroupsTables(), rootFeatureClasses); return rootFeatureClasses; } catch (Exception e) { throw new ClientException("Failed to unmarshal online query result into Java classes", e); } } public static void unmarshalHasMany(Map<String, Table> tables, FeaturesClass[] targets) throws Exception { if (targets.length == 0) { return; } Class<?> localClass = targets[0].getClass(); Map<Class<?>, NamespaceMemoItem> memo = new HashMap<>(); Initializer.buildNamespaceMemo(localClass, memo, new HashSet<>()); for (var entry : tables.entrySet()) { String fqn = entry.getKey(); Table table = entry.getValue(); Field hasManyField = getFieldFromFqn(targets[0].getClass(), fqn); Class<?> hasManyClass = getInnerTypeFromListField(hasManyField); if (!hasManyField.isAnnotationPresent(HasMany.class)) { throw new Exception("Field " + fqn + " is not annotated as a has-many field"); } HasMany hm = hasManyField.getAnnotation(HasMany.class); String localFqn = Utils.chalkpySnakeCase(localClass.getSimpleName()) + "." + hm.localKey(); String foreignFqn = Utils.chalkpySnakeCase(hasManyClass.getSimpleName()) + "." + hm.foreignKey(); FeaturesClass[] objects = unmarshalTable(table, hasManyClass.asSubclass(FeaturesClass.class)); Map<String, List<FeaturesClass>> grouped = new HashMap<>(); for (FeaturesClass obj : objects) { Field foreignField = getFieldFromFqn(hasManyClass, foreignFqn); Feature<?> foreignKeyFeature = (Feature<?>) foreignField.get(obj); if (foreignKeyFeature == null) { throw new Exception("Error while grouping has-many result: foreign join key is null"); } String v = foreignKeyFeature.getValue().toString(); if (!grouped.containsKey(v)) { grouped.put(v, new ArrayList<>()); } grouped.get(v).add(obj); } List<String> fqnParts = Arrays.asList(fqn.split("\\.")); String namespace = fqnParts.get(0); var fieldNames = fqnParts.subList(1, fqnParts.size()); for (FeaturesClass target : targets) { Field localField = getFieldFromFqn(localClass, localFqn); Feature<?> localKeyFeature = (Feature<?>) localField.get(target); if (localKeyFeature == null) { throw new Exception("Error while grouping has-many result: local join key is null"); } List<FieldSetter> setters = Initializer.initScoped(target, namespace, fieldNames, memo); for (FieldSetter s : setters) { if (s.fieldMetas().size() != 1) { throw new Exception("Expected exactly one field for has-many field: " + fqn); } FieldMeta meta = s.fieldMetas().get(0); Feature<?> hmFeature = new Feature<>(); hmFeature.setFqn(fqn); meta.field().set(target, hmFeature); String joinKey = localKeyFeature.getValue().toString(); if (grouped.containsKey(joinKey)) { hmFeature.setValue(grouped.get(joinKey)); } else { hmFeature.setValue(new ArrayList<>()); } } } } } private static boolean shouldSkipField(String fqn) { if (fqnsToSkip.contains(fqn)) { return true; } for (String prefix : prefixToSkip) { if (fqn.startsWith(prefix)) { return true; } } return false; } public static <T extends FeaturesClass> T[] unmarshalTable(Table table, Class<T> target) throws Exception { List<T> result = new ArrayList<>(Math.toIntExact(table.getRowCount())); Map<Class<?>, NamespaceMemoItem> memo = new HashMap<>(); Initializer.buildNamespaceMemo(target, memo, new HashSet<>()); Initializer.alterMemoForUnmarshaller(memo); var constructor = target.getDeclaredConstructor(); // Cache repeated work List<org.apache.arrow.vector.types.pojo.Field> fields = table.getSchema().getFields(); List<String> namespaces = new ArrayList<>(fields.size()); List<List<String>> fieldNames = new ArrayList<>(fields.size()); var shouldSkip = new boolean[fields.size()]; for (int j = 0; j < fields.size(); j++) { var arrowField = fields.get(j); shouldSkip[j] = shouldSkipField(arrowField.getName()); String fqn = arrowField.getName(); var fqnParts = Arrays.asList(fqn.split("\\.")); if (fqnParts.size() < 2 && !shouldSkip[j]) { throw new Exception("FQN of feature must have at least two parts i.e. {namespace}.{name}, found " + fqn); } namespaces.add(fqnParts.get(0)); fieldNames.add(fqnParts.subList(1, fqnParts.size())); } try (var root = table.toVectorSchemaRoot()) { for (var row = 0; row < root.getRowCount(); row++) { T obj = constructor.newInstance(); result.add(obj); for (var col = 0; col < root.getSchema().getFields().size(); col++) { if (shouldSkip[col]) { continue; } Object value = getValueFromFieldVector(root.getVector(col), row); var fieldSetters = Initializer.initScoped(obj, namespaces.get(col), fieldNames.get(col), memo); for (var setter : fieldSetters) { for (var fieldMeta : setter.fieldMetas()) { var richVal = primitiveToRich(value, fieldMeta, memo); if (richVal instanceof Feature) { ((Feature<?>) richVal).setFqn(fields.get(col).getName()); } else if (richVal instanceof StructFeaturesClass) { ((StructFeaturesClass) richVal).setFqn(fields.get(col).getName()); } fieldMeta.field().set(setter.parent(), richVal); } } } } } return listToArray(result, target); } public static List<Object> getInnerList(FieldVector vector, int startIdx, int endIdx) throws Exception { List<Object> result = new ArrayList<>(endIdx - startIdx); for (int i = startIdx; i < endIdx; i++) { result.add(getValueFromFieldVector(vector, i)); } return result; } public static Object getValueFromFieldVector(FieldVector vector, int idx) throws Exception { if (vector.isNull(idx)) { return null; } ArrowType arrowType = vector.getField().getType(); switch (arrowType.getTypeID()) { case Int -> { var intType = (ArrowType.Int) arrowType; var bitWidth = intType.getBitWidth(); if (bitWidth == 8) { TinyIntVector tinyIntVector = (TinyIntVector) vector; return tinyIntVector.getObject(idx); } else if (bitWidth == 16) { SmallIntVector smallIntVector = (SmallIntVector) vector; return smallIntVector.getObject(idx); } else if (bitWidth == 32) { IntVector intVector = (IntVector) vector; return intVector.getObject(idx); } else if (bitWidth == 64) { BigIntVector bigIntVector = (BigIntVector) vector; return bigIntVector.getObject(idx); } else { throw new Exception("Unsupported bitwidth found while converting from Arrow to Java: " + bitWidth); } } case FloatingPoint -> { var floatingPointType = (ArrowType.FloatingPoint) arrowType; var precision = floatingPointType.getPrecision(); if (precision == FloatingPointPrecision.SINGLE) { Float4Vector float4Vector = (Float4Vector) vector; return float4Vector.getObject(idx); } else if (precision == FloatingPointPrecision.DOUBLE) { Float8Vector float8Vector = (Float8Vector) vector; return float8Vector.getObject(idx); } else { throw new Exception("Unsupported precision found while converting from Arrow to Java: " + precision); } } case Bool -> { BitVector bitVector = (BitVector) vector; return bitVector.getObject(idx); } case Utf8 -> { VarCharVector varCharVector = (VarCharVector) vector; return new String(varCharVector.get(idx)); } case LargeUtf8 -> { LargeVarCharVector largeVarCharVector = (LargeVarCharVector) vector; return new String(largeVarCharVector.get(idx)); } case Date -> { var dateType = (ArrowType.Date) arrowType; if (dateType.getUnit() == DateUnit.DAY) { DateDayVector dateDayVector = (DateDayVector) vector; return LocalDate.ofEpochDay(dateDayVector.getObject(idx)); } else if (dateType.getUnit() == DateUnit.MILLISECOND) { DateMilliVector dateMilliVector = (DateMilliVector) vector; return dateMilliVector.getObject(idx).toLocalDate(); } else { throw new Exception("Unsupported date unit found while converting from Arrow to Java: " + dateType.getUnit()); } } case Timestamp -> { var timestampType = (ArrowType.Timestamp) arrowType; var timezone = timestampType.getTimezone(); ZoneId zoneId = null; if (timezone != null) { zoneId = ZoneId.of(timezone); } boolean hasTimezone = zoneId != null; switch (timestampType.getUnit()) { case SECOND -> { if (hasTimezone) { TimeStampSecTZVector timeStampSecTZVector = (TimeStampSecTZVector) vector; return Instant.ofEpochSecond(timeStampSecTZVector.get(idx)).atZone(zoneId); } else { TimeStampSecVector timeStampSecVector = (TimeStampSecVector) vector; return Instant.ofEpochSecond(timeStampSecVector.get(idx)).atZone(ZoneOffset.UTC).toLocalDateTime(); } } case MILLISECOND -> { if (hasTimezone) { TimeStampMilliTZVector timeStampMilliTZVector = (TimeStampMilliTZVector) vector; return Instant.ofEpochMilli(timeStampMilliTZVector.getObject(idx)).atZone(zoneId); } else { TimeStampMilliVector timeStampMilliVector = (TimeStampMilliVector) vector; return timeStampMilliVector.getObject(idx); } } case MICROSECOND -> { if (hasTimezone) { TimeStampMicroTZVector timeStampMicroTZVector = (TimeStampMicroTZVector) vector; long epochSecondsTruncated = timeStampMicroTZVector.getObject(idx) / 1_000_000; long epochNanoRemainder = (timeStampMicroTZVector.getObject(idx) % 1_000_000) * 1_000; return Instant.ofEpochSecond(epochSecondsTruncated, epochNanoRemainder).atZone(zoneId); } else { TimeStampMicroVector timeStampMicroVector = (TimeStampMicroVector) vector; return timeStampMicroVector.getObject(idx); } } case NANOSECOND -> { if (hasTimezone) { TimeStampNanoTZVector timeStampNanoTZVector = (TimeStampNanoTZVector) vector; long epochSecondsTruncated = timeStampNanoTZVector.getObject(idx) / 1_000_000_000; long epochNanoRemainder = timeStampNanoTZVector.getObject(idx) % 1_000_000_000; return Instant.ofEpochSecond(epochSecondsTruncated, epochNanoRemainder).atZone(zoneId); } else { TimeStampNanoVector timeStampNanoVector = (TimeStampNanoVector) vector; return timeStampNanoVector.getObject(idx); } } default -> { throw new Exception("Unsupported type found while unmarshalling Arrow Table: " + arrowType); } } } case List -> { ListVector listVector = (ListVector) vector; int offsetSize = 4; // 4 bytes int startIdx = listVector.getOffsetBuffer().getInt((long) idx * offsetSize); int endIdx = listVector.getOffsetBuffer().getInt((long) (idx + 1) * offsetSize); return getInnerList( listVector.getDataVector(), startIdx, endIdx ); } case LargeList -> { LargeListVector largeListVector = (LargeListVector) vector; int offsetSize = 8; // 8 bytes long startIdx = largeListVector.getOffsetBuffer().getLong((long) idx * offsetSize); long endIdx = largeListVector.getOffsetBuffer().getLong((long) (idx + 1) * offsetSize); return getInnerList( largeListVector.getDataVector(), Math.toIntExact(startIdx), Math.toIntExact(endIdx) ); } case Duration -> { DurationVector durationVector = (DurationVector) vector; return Duration.ofSeconds(durationVector.getObject(idx).getSeconds(), durationVector.getObject(idx).getNano()); } case Time -> { var timeType = (ArrowType.Time) arrowType; switch (timeType.getUnit()) { case SECOND -> { TimeSecVector timeSecVector = (TimeSecVector) vector; return LocalTime.ofSecondOfDay(timeSecVector.getObject(idx)); } case MILLISECOND -> { TimeMilliVector timeMilliVector = (TimeMilliVector) vector; return timeMilliVector.getObject(idx).toLocalTime(); } case MICROSECOND -> { TimeMicroVector timeMicroVector = (TimeMicroVector) vector; return LocalTime.ofNanoOfDay(timeMicroVector.getObject(idx) * 1_000L); } case NANOSECOND -> { TimeNanoVector timeNanoVector = (TimeNanoVector) vector; return LocalTime.ofNanoOfDay(timeNanoVector.getObject(idx)); } default -> { throw new Exception("Unsupported time unit found while converting from Arrow to Java: " + timeType.getUnit()); } } } case Struct -> { Map<String, Object> result = new HashMap<>(); StructVector structVector = (StructVector) vector; var childFields = structVector.getChildrenFromFields(); for (var childField : childFields) { result.put( childField.getName(), getValueFromFieldVector( structVector.getChild(childField.getName()), idx ) ); } return result; } case Map -> { Map<Object, Object> result = new HashMap<>(); MapVector mapVector = (MapVector) vector; var keyVector = mapVector.getDataVector().getChildrenFromFields().get(0); var valueVector = mapVector.getDataVector().getChildrenFromFields().get(1); var offsetSize = 4; // 4 bytes int startIdx = vector.getOffsetBuffer().getInt((long) idx * offsetSize); int endIdx = vector.getOffsetBuffer().getInt((long) (idx + 1) * offsetSize); for (int i = startIdx; i < endIdx; i++) { Object key = getValueFromFieldVector(keyVector, i); Object value = getValueFromFieldVector(valueVector, i); result.put(key, value); } return result; } default -> { throw new Exception("Unsupported type found while unmarshalling Arrow Table: " + arrowType.getTypeID()); } } } /** * Recursively converts hash maps to codegen'd classes, and scalar features to `Feature` objects. * i.e. * { * "feature1": 1, * "feature2": 2, * } * to * MyFeaturesClass(feature1=Feature(null, 1), feature2=Feature(null, 2)) */ private static Object primitiveToRich( Object primitiveVal, FieldMeta meta, Map<Class<?>, NamespaceMemoItem> allMemo ) throws Exception { var fieldType = meta.field().getType(); if (meta.isList()) { List<?> primitiveList = (List<?>) primitiveVal; NamespaceMemoItem currMemo = allMemo.get(meta.listUnderlyingClass()); Feature<?> newFeature = new Feature<>(); if (currMemo == null) { // Not a struct or features class, since it's not in the memo newFeature.setValue(primitiveList); return newFeature; } List<Object> richList = new ArrayList<>(primitiveList.size()); var isNestedList = false; for (Object item : primitiveList) { if (isNestedList || item instanceof List) { isNestedList = true; // Nested lists are returned as `Feature<List<Dataclass>>` // or `Feature<List<List<Dataclass>>>` etc. Unwrap. var nestedList = primitiveToRich(item, meta, allMemo); @SuppressWarnings("unchecked") var nestedListFeature = (Feature<?>) nestedList; richList.add(nestedListFeature.getValue()); } else { // No more lists to unwrap, element is a struct or features class @SuppressWarnings("unchecked") var cls = (Class<? extends FeaturesBase>) meta.listUnderlyingClass(); @SuppressWarnings("unchecked") var map = (Map<String, Object>) item; richList.add(convertMapToFeaturesClass(map, cls, currMemo, allMemo)); } } newFeature.setValue(richList); return newFeature; } else if (Feature.class.isAssignableFrom(fieldType)) { Feature<?> feature = new Feature<>(); feature.setValue(primitiveVal); return feature; } else if (StructFeaturesClass.class.isAssignableFrom(fieldType) || FeaturesClass.class.isAssignableFrom(fieldType)) { NamespaceMemoItem currMemo = allMemo.get(fieldType); if (currMemo == null) { throw new Exception( String.format( "Memo not found for class '%s', found: %s", fieldType.getSimpleName(), allMemo.keySet() ) ); } @SuppressWarnings("unchecked") var map = (Map<String, Object>) primitiveVal; @SuppressWarnings("unchecked") var castClass = (Class<? extends FeaturesBase>) meta.field().getType(); return convertMapToFeaturesClass(map, castClass, currMemo, allMemo); } else { throw new Exception("Unsupported type found while converting from primitive to rich: " + meta); } } private static <T extends FeaturesBase> T convertMapToFeaturesClass( Map<String, Object> map, Class<? extends T> target, NamespaceMemoItem currMemo, Map<Class<?>, NamespaceMemoItem> allMemo ) throws Exception { if (map == null) { return null; } T result = target.getDeclaredConstructor().newInstance(); for (Map.Entry<String, Object> entry : map.entrySet()) { String key = entry.getKey(); List<FieldMeta> fieldMetas = currMemo.resolvedNameToFieldMetas.get(key); if (fieldMetas == null) { throw new Exception(String.format( "Field '%s' not found in memo for class '%s', found keys: %s", key, target.getSimpleName(), currMemo.resolvedNameToFieldMetas.keySet() )); } for (FieldMeta meta : fieldMetas) { meta.field().set(result, primitiveToRich(entry.getValue(), meta, allMemo)); } } return result; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/bytes/BytesConsumer.java
package ai.chalk.internal.bytes; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.AllArgsConstructor; import lombok.Getter; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; public class BytesConsumer { private static final String MAGIC_STR = "CHALK_BYTE_TRANSMISSION"; private static final ObjectMapper mapper = new ObjectMapper(); public static byte[] intToEightBytes(int value) { return new byte[] { 0, // padding 0, // padding 0, // padding 0, // padding (byte) (value >> 24), (byte) (value >> 16), (byte) (value >> 8), (byte) value }; } public static ConsumptionResult<Long> consume8ByteLen(int startIdx, byte[] bytes) throws Exception { int numBytesThatRepresentsLength = 8; checkLen(startIdx, bytes, numBytesThatRepresentsLength); long length = ByteBuffer.wrap(bytes, startIdx, numBytesThatRepresentsLength).order(ByteOrder.BIG_ENDIAN).getLong(); return new ConsumptionResult<>(startIdx + numBytesThatRepresentsLength, length); } private static int consumeMagicStr(int startIdx, byte[] bytes) throws Exception { byte[] magicBytes = MAGIC_STR.getBytes(); checkLen(startIdx, bytes, magicBytes.length); for (byte b : magicBytes) { if (bytes[startIdx++] != b) { throw new Exception("Magic string bytes do not match"); } } return startIdx; } private static ConsumptionResult<Map<String, Object>> consumeJsonAttrs(int startIdx, byte[] bytes) throws Exception { ConsumptionResult<Long> lengthResult = consume8ByteLen(startIdx, bytes); Map<String, Object> jsonBody = mapper.readValue(bytes, lengthResult.getIndex(), lengthResult.getResult().intValue(), new TypeReference<Map<String, Object>>() {}); return new ConsumptionResult<>(lengthResult.getIndex() + lengthResult.getResult().intValue(), jsonBody); } private static ConsumptionResult<Map<String, Object>> consumePydanticAttrs(int startIdx, byte[] bytes) throws Exception { return consumeJsonAttrs(startIdx, bytes); // same behavior as described } private static ConsumptionResult<Map<String, byte[]>> consumeByteItemsData(int startIdx, byte[] bytes, Map<String, Integer> byteItemsMap) throws Exception { Map<String, byte[]> byteItems = new HashMap<>(); int idx = startIdx; for (Map.Entry<String, Integer> entry : byteItemsMap.entrySet()) { String key = entry.getKey(); int length = entry.getValue(); checkLen(idx, bytes, length); byte[] itemBytes = new byte[length]; System.arraycopy(bytes, idx, itemBytes, 0, length); byteItems.put(key, itemBytes); idx += length; } return new ConsumptionResult<>(idx, byteItems); } private static ConsumptionResult<Map<String, byte[]>> consumeByteItems(int startIdx, byte[] bytes) throws Exception { ConsumptionResult<Map<String, Object>> byteItemsMapResult = consumeJsonAttrs(startIdx, bytes); Map<String, Integer> byteItemsMapInt = new LinkedHashMap<>(); Map<String, Object> byteItemsMap = byteItemsMapResult.getResult(); for (Map.Entry<String, Object> entry : byteItemsMap.entrySet()) { byteItemsMapInt.put(entry.getKey(), (Integer) entry.getValue()); } return consumeByteItemsData(byteItemsMapResult.getIndex(), bytes, byteItemsMapInt); } private static void checkLen(int startIdx, byte[] bytes, int length) throws Exception { if (bytes.length < startIdx + length) { throw new Exception("Failed to find enough bytes to consume"); } } public static Map<String, Object> unmarshal(byte[] body) throws Exception { int idx; Map<String, Object> result = new HashMap<>(); idx = consumeMagicStr(0, body); ConsumptionResult<Map<String, Object>> jsonBodyResult = consumeJsonAttrs(idx, body); if (jsonBodyResult.getResult() != null) { result.putAll(jsonBodyResult.getResult()); } idx = jsonBodyResult.getIndex(); ConsumptionResult<Map<String, Object>> pydanticJsonBodyResult = consumePydanticAttrs(idx, body); if (pydanticJsonBodyResult.getResult() != null) { result.putAll(pydanticJsonBodyResult.getResult()); } idx = pydanticJsonBodyResult.getIndex(); ConsumptionResult<Map<String, byte[]>> byteItemsResult = consumeByteItems(idx, body); if (byteItemsResult.getResult() != null) { result.putAll(byteItemsResult.getResult()); } idx = byteItemsResult.getIndex(); ConsumptionResult<Map<String, byte[]>> deserializableByteItemsResult = consumeByteItems(idx, body); if (deserializableByteItemsResult.getResult() != null) { result.putAll(deserializableByteItemsResult.getResult()); } return result; } @Getter @AllArgsConstructor public static class ConsumptionResult<T> { private final int index; private final T result; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/bytes/BytesProducer.java
package ai.chalk.internal.bytes; import ai.chalk.internal.arrow.FeatherProcessor; import ai.chalk.models.OnlineQueryParams; import ai.chalk.models.OnlineQueryParamsComplete; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.arrow.memory.BufferAllocator; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static ai.chalk.internal.Utils.toChalkDuration; public class BytesProducer { private static final ObjectMapper mapper = new ObjectMapper() .registerModule(new com.fasterxml.jackson.datatype.jsr310.JavaTimeModule()); /** * Builds a JSON header map from OnlineQueryParams object * This method extracts all the fields from params into a map that will be serialized as JSON * * @param params The query parameters object * @return A map containing all the fields from params that should be included in the JSON header */ public static Map<String, Object> buildJsonHeader(OnlineQueryParams params) { List<String> resolvedOutputs = params.getOutputs(); if (resolvedOutputs == null) { resolvedOutputs = new ArrayList<>(); } Map<String, Object> jsonHeader = new HashMap<>(); jsonHeader.put("outputs", resolvedOutputs); jsonHeader.put("include_meta", params.isIncludeMeta()); jsonHeader.put("store_plan_stages", params.isStorePlanStages()); jsonHeader.put("explain", params.isExplain()); if (params.getBranch() != null) { jsonHeader.put("branch", params.getBranch()); } if (params.getCorrelationId() != null) { jsonHeader.put("correlation_id", params.getCorrelationId()); } if (params.getEnvironmentId() != null) { jsonHeader.put("environment_id", params.getEnvironmentId()); } if (params.getMeta() != null) { jsonHeader.put("meta", params.getMeta()); } if (params.getPreviewDeploymentId() != null) { jsonHeader.put("deployment_id", params.getPreviewDeploymentId()); } if (params.getQueryName() != null) { jsonHeader.put("query_name", params.getQueryName()); } if (params.getQueryNameVersion() != null) { jsonHeader.put("query_name_version", params.getQueryNameVersion()); } if (params.getStaleness() != null) { var staleness = new HashMap<String, String>(); for (var entry : params.getStaleness().entrySet()) { staleness.put(entry.getKey(), toChalkDuration(entry.getValue())); } jsonHeader.put("staleness", staleness); } if (params.getTags() != null) { jsonHeader.put("tags", params.getTags()); } if (params.getPlannerOptions() != null) { jsonHeader.put("planner_options", params.getPlannerOptions()); } if (params.getNow() != null) { jsonHeader.put("now", params.getNow()); } return jsonHeader; } public static byte[] convertOnlineQueryParamsToBytes(OnlineQueryParamsComplete params, BufferAllocator allocator) throws Exception { byte[] arrowBytes; if (params.getInputs() == null) { throw new Exception("`inputs` cannot be null - please use OnlineQueryParams.builder().input(...).build()"); } try { arrowBytes = FeatherProcessor.inputsToArrowBytes(params.getInputs(), allocator); } catch (Exception e) { throw new Exception("failed to convert inputs to Arrow bytes", e); } Map<String, Object> jsonHeader = buildJsonHeader(params); ByteArrayOutputStream result = new ByteArrayOutputStream(); DataOutputStream ioWriter = new DataOutputStream(result); // Magic string header String magicString = "chal1"; byte[] magicStringBytes = magicString.getBytes(StandardCharsets.UTF_8); ioWriter.write(magicStringBytes); // Placeholder for the sizes byte[] placeholder = new byte[8]; byte[] jsonBytes = mapper.writeValueAsBytes(jsonHeader); // Write json header ioWriter.write(placeholder); ioWriter.write(jsonBytes); // Write arrow ioWriter.write(placeholder); ioWriter.write(arrowBytes); // Fill in the sizes ioWriter.flush(); byte[] resultBytes = result.toByteArray(); int nonBodyLength = magicStringBytes.length + 8 + jsonBytes.length + 8; int bodyLength = resultBytes.length - nonBodyLength; ByteBuffer wrapped = ByteBuffer.wrap(resultBytes).order(ByteOrder.BIG_ENDIAN); wrapped.putLong(magicStringBytes.length, jsonBytes.length); wrapped.putLong(magicStringBytes.length + 8 + jsonBytes.length, bodyLength); return wrapped.array(); } private static void produceLen(int length, DataOutputStream ioWriter) throws Exception { byte[] lengthBytes = ByteBuffer.allocate(8).putLong(length).array(); ioWriter.write(lengthBytes); } private static void produceJsonAttrs(Map<String, Object> jsonAttrs, DataOutputStream ioWriter) throws Exception { byte[] jsonBytes = mapper.writeValueAsBytes(jsonAttrs); produceLen(jsonBytes.length, ioWriter); ioWriter.write(jsonBytes); } private static void produceByteAttrs(Map<String, byte[]> byteAttrs, DataOutputStream ioWriter) throws Exception { Map<String, Object> byteAttrsMap = new HashMap<>(); for (Map.Entry<String, byte[]> entry : byteAttrs.entrySet()) { byteAttrsMap.put(entry.getKey(), entry.getValue().length); } produceJsonAttrs(byteAttrsMap, ioWriter); for (byte[] value : byteAttrs.values()) { ioWriter.write(value); } } public static byte[] chalkMarshal(Map<String, Object> attrs) throws Exception { Map<String, Object> jsonAttrs = new HashMap<>(); Map<String, byte[]> byteAttrs = new HashMap<>(); for (Map.Entry<String, Object> entry : attrs.entrySet()) { if (entry.getValue() instanceof byte[]) { byteAttrs.put(entry.getKey(), (byte[]) entry.getValue()); } else { jsonAttrs.put(entry.getKey(), entry.getValue()); } } try (ByteArrayOutputStream result = new ByteArrayOutputStream(); DataOutputStream ioWriter = new DataOutputStream(result)) { // Magic string header ioWriter.writeBytes("CHALK_BYTE_TRANSMISSION"); // JSON attrs produceJsonAttrs(jsonAttrs, ioWriter); // Pydantic attrs (empty map) produceJsonAttrs(new HashMap<>(), ioWriter); // Byte attrs produceByteAttrs(byteAttrs, ioWriter); // ByteSerializables (empty map) produceJsonAttrs(new HashMap<>(), ioWriter); ioWriter.flush(); return result.toByteArray(); } } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/codegen/FieldSetter.java
package ai.chalk.internal.codegen; import ai.chalk.internal.FieldMeta; import java.util.List; /* Information pertinent to setting fields on an object. * to be returned from the scoped feature initializer. * * i.e. If we call the scoped initializer on "user.account.created_at", * then FieldSetter will contain the `Account` object and the `FieldMeta` * for "created_at". This class can be done away with when everything in * a `FeaturesBase` subclass is a `Feature`, since by then we will be able * to return a list of `Feature`s. Right now dataclasses and has-ones are * not `Feature`s, which is a design mistake. CHA-5646 */ public record FieldSetter(Object parent, List<FieldMeta> fieldMetas) {}
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/codegen/Initializer.java
package ai.chalk.internal.codegen; import ai.chalk.features.*; import ai.chalk.internal.FieldMeta; import ai.chalk.internal.NamespaceMemoItem; import ai.chalk.internal.Utils; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.*; import static ai.chalk.internal.Utils.getResolvedName; public class Initializer { public static Exception initFeatures(Class<?> cls) { Field[] fields = cls.getDeclaredFields(); for (Field field : fields) { if (!FeaturesBase.class.isAssignableFrom(field.getType())) { continue; } Map<Class<?>, NamespaceMemoItem> memo = new HashMap<>(); try { Initializer.buildNamespaceMemo(field.getType(), memo, new HashSet<>()); } catch (Exception e) { return e; } var namespace = Utils.chalkpySnakeCase(field.getType().getSimpleName()); try { var featureClass = Initializer.initAll(field, namespace, new HashSet<>(), memo); field.set(cls, featureClass); } catch (Exception e) { return e; } } return null; } public static <T extends FeaturesBase> List<Field> getFeaturesClassFieldsInner(Class<T> cls) { List<Field> res = new ArrayList<>(); res.addAll(Arrays.asList(cls.getDeclaredFields())); res.addAll(Arrays.asList(cls.getSuperclass().getDeclaredFields())); return res; } public static <T extends FeaturesBase> List<Field> getFeaturesClassFields(Class<T> cls) throws Exception { if (FeaturesClass.class.isAssignableFrom(cls)) { @SuppressWarnings("unchecked") var castCls = (Class<? extends FeaturesClass>) cls; return getFeaturesClassFieldsInner(castCls); } else if (StructFeaturesClass.class.isAssignableFrom(cls)) { @SuppressWarnings("unchecked") var castCls = (Class<? extends StructFeaturesClass>) cls; return getFeaturesClassFieldsInner(castCls); } else if (WindowedFeaturesClass.class.isAssignableFrom(cls)) { @SuppressWarnings("unchecked") var castCls = (Class<? extends WindowedFeaturesClass>) cls; return getFeaturesClassFieldsInner(castCls); } else { throw new Exception("Unknown FeaturesBase subclass found during call: " + cls.getSimpleName()); } } /* * `initAll` initializes all `Feature` fields of a `FeaturesClass` * so that they are ready to be used when specifying inputs to * a query. */ public static Object initAll( Field f, String fqn, Set<Class<?>> seenClassesInChain, Map<Class<?>, NamespaceMemoItem> memo ) throws Exception { if (FeaturesBase.class.isAssignableFrom(f.getType())) { // RECURSIVE CASE @SuppressWarnings("unchecked") var castCls = (Class<? extends FeaturesBase>) f.getType(); if (seenClassesInChain.contains(f.getType())) { // We simply stop initing return null; } seenClassesInChain.add(f.getType()); NamespaceMemoItem memoItem = memo.get(castCls); if (memoItem == null) { throw new Exception( String.format( "memo not found for features class %s, found keys: %s", castCls.getSimpleName(), memo.keySet() ) ); } FeaturesBase fc = (FeaturesBase) f.getType().getConstructor().newInstance(); fc.setFqn(fqn); for (Map.Entry<String, List<FieldMeta>> entry : memoItem.resolvedNameToFieldMetas.entrySet()) { String resolvedName = entry.getKey(); for (FieldMeta meta : entry.getValue()) { Field childField = meta.field(); String childFqn; if (StructFeaturesClass.class.isAssignableFrom(f.getType())) { // Fields of StructFeaturesClass are not real features. // The StructFeaturesClass itself is a real feature. // So we set the FQN of the child to the parent FQN. childFqn = fqn; } else if (WindowedFeaturesClass.class.isAssignableFrom(f.getType())) { // "user.average_transactions" + "__3600__" childFqn = fqn+resolvedName; } else { childFqn = fqn + "." + resolvedName; } childField.set( fc, initAll( childField, childFqn, seenClassesInChain, memo ) ); } } seenClassesInChain.remove(f.getType()); return fc; } else if (f.getType() == Feature.class) { // BASE CASE Feature<?> feature = (Feature<?>) f.getType().getConstructor().newInstance(); feature.setFqn(fqn); return feature; } else { throw new Exception("Unknown type found during call - expected `FeaturesClass` or `Feature`, found: " + f.getType()); } } /* * Unlike `initAll` that branches out and initializes all fields, `initScoped` only initializes * the fields relevant to the specified FQN. */ public static List<FieldSetter> initScoped( FeaturesClass cls, String rootNamespace, List<String> fieldNames, Map<Class<?>, NamespaceMemoItem> memo ) throws Exception { if (fieldNames.size() < 1) { throw new Exception( "internal error - there should be at least 1 field name in the chain of field names" ); } NamespaceMemoItem nsMemo = memo.get(cls.getClass()); if (nsMemo == null) { throw new Exception( String.format( "internal error- memo not found for namespace '%s', found keys: %s instead. This could " + "also happen if the codegen'd classes are edited.", cls.getClass().getSimpleName(), memo.keySet() ) ); } var nextFieldName = fieldNames.get(0); List<FieldMeta> fieldMetas = nsMemo.resolvedNameToFieldMetas.get(nextFieldName); if (fieldMetas == null) { throw new Exception( String.format( "internal error - Field '%s' not found in namespace memo for '%s', got '%s' instead. " + "This could also happen if the codegen'd classes are edited.", nextFieldName, cls.getClass().getSimpleName(), nsMemo.resolvedNameToFieldMetas.keySet() ) ); } List<FieldSetter> targetFields = new ArrayList<>(); for (FieldMeta meta: fieldMetas) { List<FieldSetter> res = initScopedInner( cls, meta, rootNamespace, fieldNames, 0, memo ); targetFields.addAll(res); } return targetFields; } public static List<FieldSetter> initScopedInner( Object parent, FieldMeta meta, String rootNamespace, List<String> fieldNames, int fieldNamesIdx, Map<Class<?>, NamespaceMemoItem> memo ) throws Exception { var fieldType = meta.field().getType(); if (fieldNamesIdx == fieldNames.size() - 1) { // When the last field is a scalar feature with FQN "user.account.address.street_number": // `parent`: `Address` instance // `meta`: `FieldMeta` instance for `street_number`, where `meta.field()` corresponds // to the `street_number` field on `Address` // `fieldNames`: ["account", "address", "street_number"] // `fieldNamesIdx`: 2 // // When last field is a windowed child pseudofeature with FQN "user.avg_txn__3600__": // `parent`: `User` instance // `meta`: `FieldMeta` instance for the `User.avg_txn` field which is a subclass // `WindowedFeaturesClass`. // `fieldNames`: ["average_txn__3600__"] // `fieldNamesIdx`: 0 // if (WindowedFeaturesClass.class.isAssignableFrom(fieldType)) { var windowedMemo = memo.get(fieldType); if (windowedMemo == null) { throw new Exception( String.format( "internal error - memo not found for windowed features class %s, found keys: %s." + " This could also happen if the codegen'd classes are edited", fieldType.getSimpleName(), memo.keySet() ) ); } WindowedFeaturesClass windowedObj = (WindowedFeaturesClass) meta.field().get(parent); if (windowedObj == null) { windowedObj = (WindowedFeaturesClass) meta.field().getType().getConstructor().newInstance(); meta.field().set(parent, windowedObj); String baseWindowedFeatureFqn = rootNamespace + "."; if (fieldNames.size() > 1) { // Remote windowed feature baseWindowedFeatureFqn += String.join( ".", fieldNames.subList(0, fieldNames.size()) ); } baseWindowedFeatureFqn += meta.resolvedName(); windowedObj.setFqn(baseWindowedFeatureFqn); } // This would be one of the buckets in the windowed feature // e.g. windowChildFieldName here would be "average_txn__3600__" var windowChildFieldName = fieldNames.get(fieldNamesIdx); List<FieldMeta> fieldMetas = windowedMemo.resolvedNameToFieldMetas.get(windowChildFieldName); if (fieldMetas == null) { throw new Exception( String.format( "internal error - field '%s' not found in windowed features memo for '%s', got '%s' " + "instead. This could also happen if the codegen'd classes are edited.", fieldNames.get(fieldNamesIdx), windowedObj.getClass().getSimpleName(), windowedMemo.resolvedNameToFieldMetas.keySet() ) ); } return List.of(new FieldSetter( windowedObj, fieldMetas )); } else { return List.of(new FieldSetter( parent, List.of(meta) )); } } var nextMemo = memo.get(fieldType); if (nextMemo == null) { throw new Exception( String.format( "internal error - memo not found for features class %s, found keys: %s. This could also " + "happen if the codegen'd classes are edited", fieldType.getSimpleName(), memo.keySet() ) ); } var fc = meta.field().get(parent); if (fc == null) { fc = meta.field().getType().getConstructor().newInstance(); meta.field().set(parent, fc); // unchecked cast because we know that `fc` is a `FeaturesBase` instance, // since it exists in the memo ((FeaturesBase) fc).setFqn( rootNamespace + "." + String.join(".", fieldNames.subList(0, fieldNamesIdx + 1)) ); } var nextFieldIdx = fieldNamesIdx + 1; var nextFieldName = fieldNames.get(nextFieldIdx); List<FieldMeta> metas = nextMemo.resolvedNameToFieldMetas.get(nextFieldName); if (metas == null) { throw new Exception( String.format( "internal error - Field '%s' not found in memo for '%s', got keys '%s' instead. This could"+ " also happen if the codegen'd classes are edited.", nextFieldName, fc.getClass().getSimpleName(), nextMemo.resolvedNameToFieldMetas.keySet() ) ); } List<FieldSetter> targetFields = new ArrayList<>(); for (FieldMeta nextMeta : metas) { List<FieldSetter> res = initScopedInner( fc, nextMeta, rootNamespace, fieldNames, nextFieldIdx, memo ); targetFields.addAll(res); } return targetFields; } /* * Unwraps * - `Feature<List<T>>` to `T` * - `Feature<T>` to `T` * - `List<T>` to `T` */ public static Class<?> getUnderlyingClass(Type typ) { if (typ instanceof ParameterizedType parametrizedTyp) { Type rawTyp = parametrizedTyp.getRawType(); if (!(rawTyp instanceof Class<?> cls)) { return typ.getClass(); } if (Feature.class.isAssignableFrom(cls)) { var args = parametrizedTyp.getActualTypeArguments(); return getUnderlyingClass(args[0]); } else if (List.class.isAssignableFrom(cls)) { var args = parametrizedTyp.getActualTypeArguments(); return getUnderlyingClass(args[0]); } else { return typ.getClass(); } } else { if (typ instanceof Class) { return (Class<?>) typ; } else { return typ.getClass(); } } } /* * Unwraps `Feature<List<T>>` to `List<T>`. */ public static Class<?> unwrapFeatureType(Type typ) { if (typ instanceof ParameterizedType parametrizedTyp) { Type rawTyp = parametrizedTyp.getRawType(); if (!(rawTyp instanceof Class<?> cls)) { return typ.getClass(); } if (Feature.class.isAssignableFrom(cls)) { var args = parametrizedTyp.getActualTypeArguments(); return unwrapFeatureType(args[0]); } else { return (Class<?>) ((ParameterizedType) typ).getRawType(); } } else { if (typ instanceof Class) { return (Class<?>) typ; } else { return typ.getClass(); } } } /* * When unmarshalling, we want the memo to readily contain the most helpful information * for unmarshalling. Since `WindowedFeaturesClass` child fields are not hiearchically * structured the same way as actual windowed child features returned from Chalk, * we alter memo to mimic that original structure for straightforward unmarshalling. */ public static void alterMemoForUnmarshaller(Map<Class<?>, NamespaceMemoItem> memo) throws Exception { for (Map.Entry<Class<?>, NamespaceMemoItem> entry : memo.entrySet()) { NamespaceMemoItem memoItem = entry.getValue(); // Copying the keyset because we are editing the map in-place. var keySet = memoItem.resolvedNameToFieldMetas.keySet().toArray(new String[0]); for (String resolvedName : keySet) { List<FieldMeta> fieldMetas = memoItem.resolvedNameToFieldMetas.get(resolvedName); for (FieldMeta meta : fieldMetas) { if (WindowedFeaturesClass.class.isAssignableFrom(meta.field().getType())) { var windowedMemo = memo.get(meta.field().getType()); for (String childFieldName : windowedMemo.resolvedNameToFieldMetas.keySet()) { // Map windowed child fields to the base windowed field // i.e. "average_txns__3600__" -> "average_txns" var newKey = resolvedName + childFieldName; if (!memoItem.resolvedNameToFieldMetas.containsKey(newKey)) { memoItem.resolvedNameToFieldMetas.put(newKey, new ArrayList<>()); } memoItem.resolvedNameToFieldMetas.get(newKey).add(meta); } // Prepend base windowed feature name to windowed child fields // i.e. // { // "__3600__": [field-meta-0], // "__2592000__": [field-meta-1] // } // -> // { // // Multiple distinct feature classes can use the same WindowedFeaturesClass // "average_txns__3600__": [field-meta-0], // "average_txns__2592000__": [field-meta-1], // "some_other_feature_from_another_class__3600__": [field-meta-0], // "some_other_feature_from_another_class__2592000__": [field-meta-1] // } var oldMap = windowedMemo.resolvedNameToFieldMetas; var newMap = new HashMap<>(windowedMemo.resolvedNameToFieldMetas); for (Map.Entry<String, List<FieldMeta>> innerEntry : oldMap.entrySet()) { var prependedName = resolvedName + innerEntry.getKey(); if (newMap.containsKey(prependedName)) { throw new Exception( String.format( "Prepended name '%s' already exists in memo, this means multiple distinct " + "feature classes have the same name for a windowed feature with the same " + "WindowedFeaturesClass type. This has yet to be supported in the unmarshaller.", prependedName ) ); } newMap.put(prependedName, innerEntry.getValue()); } windowedMemo.resolvedNameToFieldMetas = newMap; } } } } } public static void buildNamespaceMemo( Class<?> cls, Map<Class<?>, NamespaceMemoItem> classMemo, Set<String> visitedNamespaces ) throws Exception { if (FeaturesBase.class.isAssignableFrom(cls)) { @SuppressWarnings("unchecked") List<Field> fields = getFeaturesClassFields((Class<FeaturesBase>) cls); String namespace = Utils.chalkpySnakeCase(cls.getSimpleName()); if (visitedNamespaces.contains(namespace)) { return; } visitedNamespaces.add(namespace); var memoItem = new NamespaceMemoItem(); for (Field field : fields) { var fieldType = field.getType(); // Must use `getGenericType` here to get a type that contains the underlying class var genericType = field.getGenericType(); boolean isList = ( Feature.class.isAssignableFrom(fieldType) && List.class.isAssignableFrom(unwrapFeatureType(genericType)) ); var resolvedName = getResolvedName(field); FieldMeta meta = new FieldMeta(field, isList ? getUnderlyingClass(genericType) : null, resolvedName); if (!memoItem.resolvedNameToFieldMetas.containsKey(resolvedName)) { memoItem.resolvedNameToFieldMetas.put(resolvedName, new ArrayList<>()); } memoItem.resolvedNameToFieldMetas.get(resolvedName).add(meta); buildNamespaceMemo( meta.isList() ? meta.listUnderlyingClass() : fieldType, classMemo, visitedNamespaces ); } classMemo.put(cls, memoItem); } }; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config/Loader.java
package ai.chalk.internal.config; import ai.chalk.internal.config.models.ProjectToken; import ai.chalk.internal.config.models.ProjectTokens; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; public class Loader { public static String loadProjectDirectory() throws Exception { Path currentDirectory = Paths.get(".").toAbsolutePath().normalize(); String ogDirectory = currentDirectory.toString(); boolean rootChecked = false; while (!currentDirectory.toString().equals("/") && !rootChecked) { for (String filename : new String[]{"chalk.yaml", "chalk.yml"}) { File file = new File(currentDirectory.resolve(filename).toString()); if (file.exists()) { return currentDirectory.toString(); } } if (currentDirectory.toString().equals("/")) { rootChecked = true; } else { currentDirectory = currentDirectory.getParent(); } } throw new Exception("Cannot determine project root directory: failed to find chalk.yml in the working directory '" + ogDirectory + "' or any of its parent directories"); } public static Path getConfigPath() throws Exception { String configDir = System.getenv("XDG_CONFIG_HOME"); if (configDir == null || configDir.isEmpty()) { configDir = System.getProperty("user.home"); if (configDir == null || configDir.isEmpty()) { throw new Exception("error getting home directory"); } } return Paths.get(configDir, ".chalk.yml"); } public static ProjectToken getProjectToken(ProjectTokens config, String configPath, String projectRoot) throws Exception { if (config.getTokens() == null) { throw new Exception(String.format("'tokens' collection does not exist or is empty in the auth config file '%s' -- please try to 'chalk login' again", configPath)); } ProjectToken returnToken = null; HashMap<String, ProjectToken> tokens = config.getTokens(); if (tokens.containsKey(projectRoot)) { returnToken = tokens.get(projectRoot); } if (tokens.containsKey("default") && returnToken == null) { returnToken = tokens.get("default"); } if (returnToken == null) { throw new Exception(String.format("project root '%s' does not exist as a key in the collection 'tokens' in the config file '%s', and the fallback key 'default' is also missing. Please try to 'chalk login' again", projectRoot, configPath)); } return returnToken; } public static ProjectTokens loadAllTokens(Path path) throws IOException { byte[] data; try { data = Files.readAllBytes(path); } catch (IOException e) { throw new IOException(String.format("Error reading auth config file from path '%s': %s", path, e.getMessage()), e); } ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.registerModule(new JavaTimeModule()); ProjectTokens config; try { config = mapper.readValue(new String(data), ProjectTokens.class); } catch (Exception e) { throw new IOException(String.format("Error parsing auth config file at path '%s'. Please make sure you have run 'chalk login' successfully. Error details: %s", path, e.getMessage()), e); } return config; } public static ProjectToken getChalkYamlConfig(String projectRoot) throws Exception { Path path; try { path = getConfigPath(); } catch (Exception e) { throw new IOException("Error getting auth config path"); } ProjectTokens config = loadAllTokens(path); return getProjectToken(config, path.toString(), projectRoot); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config/models/JWT.java
package ai.chalk.internal.config.models; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; @Data @AllArgsConstructor @NoArgsConstructor public class JWT { private String value; private LocalDateTime validUntil; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config/models/ProjectToken.java
package ai.chalk.internal.config.models; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; @Data @NoArgsConstructor public class ProjectToken { private String name; private String clientId; private String clientSecret; private LocalDateTime validUntil; private String apiServer; private String activeEnvironment; private JWT jwt; private String rootCa; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config/models/ProjectTokens.java
package ai.chalk.internal.config.models; import lombok.Data; import java.util.HashMap; @Data public class ProjectTokens { private HashMap<String, ProjectToken> tokens; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/config/models/SourcedConfig.java
package ai.chalk.internal.config.models; import ai.chalk.internal.config.Loader; import org.checkerframework.checker.nullness.qual.NonNull; import java.util.Collections; import java.util.Map; public record SourcedConfig(String source, String value) { public static SourcedConfig fromEnvVar(String envVarName) { return new SourcedConfig(String.format("environment variable '%s'", envVarName), System.getenv(envVarName)); } public static SourcedConfig fromBuilder(String value) { return new SourcedConfig("ChalkClient builder argument", value); } public static SourcedConfig fromConfigFile(String value) { String pathStr = "of unknown path"; try { pathStr = Loader.getConfigPath().toString(); } catch (Exception e) { // ignore } return new SourcedConfig(String.format("config file %s", pathStr), value); } public static SourcedConfig missing() { return new SourcedConfig("missing", ""); } public static @NonNull SourcedConfig firstNonEmpty(SourcedConfig... configs) { for (SourcedConfig config : configs) { if (config != null && config.value() != null && !config.value().isEmpty()) { return config; } } return SourcedConfig.missing(); } public static String getConfigTableStr(Map<String, SourcedConfig> configMap) { StringBuilder result = new StringBuilder(); String configHeader = "Config"; String sourceHeader = "Source"; String valueHeader = "Value"; int maxConfigNameWidth = configHeader.length(); int maxSourceWidth = sourceHeader.length(); int maxValueWidth = valueHeader.length(); for (Map.Entry<String, SourcedConfig> entry : configMap.entrySet()) { maxConfigNameWidth = Math.max(maxConfigNameWidth, entry.getKey().length()); maxSourceWidth = Math.max(maxSourceWidth, entry.getValue().source().length()); maxValueWidth = Math.max(maxValueWidth, entry.getValue().value().length()); } int buffer = 4; maxConfigNameWidth += buffer; maxSourceWidth += buffer; maxValueWidth += buffer; // Print separator result.append(String.join("", Collections.nCopies(maxConfigNameWidth + maxSourceWidth + maxValueWidth + 6, "-"))); result.append("\n"); // Print column header result.append(String.format( "%-" + maxConfigNameWidth + "s %-" + maxValueWidth + "s %-" + maxSourceWidth + "s%n", configHeader, valueHeader, sourceHeader )); // Print separator result.append(String.join("", Collections.nCopies(maxConfigNameWidth + maxSourceWidth + maxValueWidth + 6, "-"))); result.append("\n"); // Print each config for (Map.Entry<String, SourcedConfig> entry : configMap.entrySet()) { result.append(String.format( "%-" + maxConfigNameWidth + "s %-" + maxValueWidth + "s %-" + maxSourceWidth + "s%n", entry.getKey(), entry.getValue().value(), entry.getValue().source() )); } // Print separator result.append(String.join("", Collections.nCopies(maxConfigNameWidth + maxSourceWidth + maxValueWidth + 6, "-"))); result.append("\n"); return result.toString(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/RequestHandler.java
package ai.chalk.internal.request; import ai.chalk.exceptions.ChalkException; import ai.chalk.exceptions.ClientException; import ai.chalk.exceptions.ServerException; import ai.chalk.internal.config.models.JWT; import ai.chalk.internal.config.models.SourcedConfig; import ai.chalk.internal.request.models.*; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import javax.annotation.Nullable; import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.stream.Stream; public class RequestHandler { private JWT jwt; private final HttpClient httpClient; private final URI apiServer; @Nullable private final URI queryServerOverride; private SourcedConfig environmentId; private Map<String, URI> engines; private final SourcedConfig initialEnvironment; private final SourcedConfig clientId; private final SourcedConfig clientSecret; private final String branch; private final String deploymentTag; private final Optional<Duration> clientLevelTimeout; public RequestHandler( HttpClient httpClient, SourcedConfig apiServer, String queryServerOverride, SourcedConfig initialEnvironment, SourcedConfig environmentId, SourcedConfig clientId, SourcedConfig clientSecret, String branch, String deploymentTag, Optional<Duration> clientLevelTimeout ) { if (httpClient == null) { System.setProperty("jdk.httpclient.keepalive.timeout", "300"); this.httpClient = HttpClient.newHttpClient(); } else { this.httpClient = httpClient; } this.apiServer = URI.create(apiServer.value()); if (queryServerOverride == null || queryServerOverride.isEmpty()) { this.queryServerOverride = null; } else { this.queryServerOverride = URI.create(queryServerOverride); } this.environmentId = environmentId; this.initialEnvironment = initialEnvironment; this.clientId = clientId; this.clientSecret = clientSecret; this.branch = branch; this.deploymentTag = deploymentTag; this.engines = new HashMap<>(); this.clientLevelTimeout = clientLevelTimeout; } private String getResolvedEnvironment(String environmentOverride) { if (environmentOverride != null && !environmentOverride.isEmpty()) { return environmentOverride; } return this.environmentId.value(); } private Map<String, String> getHeaders( String environmentOverride, String previewDeploymentId, String branchOverride, String queryName ) { Map<String, String> headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); headers.put("User-Agent", "chalk-java"); headers.put("X-Chalk-Client-Id", this.clientId.value()); String branchResolved = null; if (branchOverride != null && !branchOverride.isEmpty()) { branchResolved = branchOverride; } else if (this.branch != null && !this.branch.isEmpty()) { branchResolved = this.branch; } if (branchResolved != null) { headers.put("X-Chalk-Branch-Id", branchResolved); headers.put("X-Chalk-Deployment-Type", "branch"); } else { headers.put("X-Chalk-Deployment-Type", "engine"); } if (environmentOverride != null && !environmentOverride.isEmpty()) { headers.put("X-Chalk-Env-Id", environmentOverride); } else { headers.put("X-Chalk-Env-Id", this.environmentId.value()); } if (previewDeploymentId != null && !previewDeploymentId.isEmpty()) { headers.put("X-Chalk-Preview-Deployment", previewDeploymentId); } if (this.deploymentTag != null) { headers.put("X-Chalk-Deployment-Tag", this.deploymentTag); } if (queryName != null && !queryName.isEmpty()) { headers.put("X-Chalk-Query-Name", queryName); } return headers; } private byte[] getBodyBytes(Object body) throws Exception { if (body == null) { return null; } byte[] bodyBytes; if (body instanceof byte[]) { bodyBytes = (byte[]) body; } else { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); bodyBytes = objectMapper.writeValueAsBytes(body); } return bodyBytes; } public HttpResponse<byte[]> sendRequest(SendRequestParams args) throws ChalkException { byte[] bodyBytes; try { bodyBytes = this.getBodyBytes(args.getBody()); } catch (Exception e) { throw new ClientException("error marshalling request body", e); } Map<String, String> headers = this.getHeaders( args.getEnvironmentOverride(), args.getPreviewDeploymentId(), args.getBranch(), args.getQueryName() ); HttpRequest.Builder builder = HttpRequest.newBuilder(); if (args.getRequestLevelTimeout() != null) { builder.timeout(args.getRequestLevelTimeout()); } else if (this.clientLevelTimeout.isPresent()) { builder.timeout(this.clientLevelTimeout.get()); } builder = builder .method(args.getMethod(), HttpRequest.BodyPublishers.ofByteArray(bodyBytes)) .uri(getUri(args)) .version(HttpClient.Version.HTTP_1_1) .headers(headers.entrySet().stream() .flatMap(e -> Stream.of(e.getKey(), e.getValue())) .toArray(String[]::new)); if (!args.isDontRefresh()) { try { this.refreshJwt(false); } catch (ChalkException e) { throw new ClientException("error refreshing access token", e); } } if (this.jwt != null && this.jwt.getValue() != null && !this.jwt.getValue().isEmpty()) { builder.header("Authorization", "Bearer " + this.jwt.getValue()); } var request = builder.build(); HttpResponse<byte[]> response; var retries = 1; while (true) { try { response = this.httpClient.send(request, HttpResponse.BodyHandlers.ofByteArray()); break; } catch (IOException ioexception) { if (retries == 0) { throw new ClientException("error with sending of request", ioexception); } retries--; } catch (Exception e) { throw new ClientException("error with sending of request", e); } } if (response.statusCode() == 401 && !args.isDontRefresh()) { HttpResponse<byte[]> retryResponse; try { retryResponse = this.retryRequest(request, args.getBody(), response); } catch (Exception e) { throw new ClientException("error retrying request upon 401", e); } if (retryResponse != null) { response = retryResponse; } } if (response.statusCode() != 200) { throw getHttpException(response, request.uri().toString()); } return response; } public <T> T deserializeResponseBody(byte[] body, Class<T> responseClass) throws ChalkException { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.registerModule(new JavaTimeModule()); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); try { return objectMapper.readValue(body, responseClass); } catch (IOException e) { throw new ClientException( "Exception occurred while unmarshalling response", e ); } } private URI getUri(SendRequestParams args) { if (args.getIsEngineRequest()) { if (this.queryServerOverride != null) { return this.queryServerOverride.resolve(args.getPath()); } String resolved = this.getResolvedEnvironment(args.getEnvironmentOverride()); if (resolved != null && !resolved.isEmpty() && this.engines.containsKey(resolved) ) { return this.engines.get(resolved).resolve(args.getPath()); } } return this.apiServer.resolve(args.getPath()); } private HttpResponse<byte[]> retryRequest( HttpRequest originalRequest, Object originalBody, HttpResponse<byte[]> originalResponse ) throws Exception { try { this.refreshJwt(true); } catch (ChalkException e) { // TODO: Log error here when we have logging System.err.println("error refreshing JWT upon 401"); e.printStackTrace(); return originalResponse; } byte[] originalBodyBytes = getBodyBytes(originalBody); HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .method(originalRequest.method(), HttpRequest.BodyPublishers.ofByteArray(originalBodyBytes)) .uri(originalRequest.uri()) .version(HttpClient.Version.HTTP_1_1) .headers(originalRequest.headers().map().entrySet().stream() .flatMap(e -> Stream.of(e.getKey(), e.getValue().get(0))) .toArray(String[]::new)); if (this.jwt != null && this.jwt.getValue() != null && !this.jwt.getValue().isEmpty()) { requestBuilder.header("Authorization", "Bearer " + this.jwt.getValue()); } var newRequest = requestBuilder.build(); return this.httpClient.send(newRequest, HttpResponse.BodyHandlers.ofByteArray()); } private JWT getJwt() throws ChalkException { SendRequestParams params = new SendRequestParams.Builder(null) .body(new GetTokenRequest( this.clientId.value(), this.clientSecret.value(), "client_credentials" )) .method("POST") .path("/v1/oauth/token") .dontRefresh(true) .isEngineRequest(false) .build(); GetTokenResponse response; try { HttpResponse<byte[]> responseRaw = this.sendRequest(params); response = this.deserializeResponseBody(responseRaw.body(), GetTokenResponse.class); } catch (Exception e) { throw new ClientException("Error getting access token", e); } if (this.initialEnvironment.value().isEmpty()) { this.environmentId = new SourcedConfig( response.getPrimaryEnvironment(), "Primary environment from credentials exchange response" ); } else { this.environmentId = this.initialEnvironment; } this.engines = new HashMap<>(); for (Map.Entry<String, String> entry : response.getEngines().entrySet()) { try { this.engines.put(entry.getKey(), URI.create(entry.getValue())); } catch (Exception ignored) { } } LocalDateTime expiry = LocalDateTime.now(ZoneOffset.UTC).plusSeconds(response.getExpiresIn()); return new JWT(response.getAccessToken(), expiry); } private void refreshJwt(boolean forceRefresh) throws ChalkException { if ( forceRefresh || jwt == null || jwt.getValidUntil() == null || LocalDateTime.now(ZoneOffset.UTC).plusSeconds(10).isAfter(jwt.getValidUntil()) ) { this.jwt = getJwt(); } } public static ChalkException getHttpException(HttpResponse<byte[]> res, String URL) { ChalkHttpException chalkException; ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); try { chalkException = objectMapper.readValue(res.body(), ChalkHttpException.class); } catch (IOException e) { // TODO: Log error here when we have logging return new ServerException( res.statusCode(), res.body().length, URL ); } return new ServerException( chalkException, res.statusCode(), res.body().length, URL ); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/models/ChalkHttpException.java
package ai.chalk.internal.request.models; import ai.chalk.exceptions.ServerError; import lombok.Data; @Data public class ChalkHttpException { private String detail; private ServerError[] errors; private String trace; public String toString() { String message = "Please contact Chalk Support with the Trace ID"; if (this.detail.contains(message)) { return this.detail; } return this.detail + String.format(" - %s: %s", message, this.trace); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/models/GetTokenRequest.java
package ai.chalk.internal.request.models; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class GetTokenRequest { private String clientId; private String clientSecret; private String grantType; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/models/GetTokenResponse.java
package ai.chalk.internal.request.models; import lombok.Data; import lombok.NoArgsConstructor; import java.time.ZonedDateTime; import java.util.Map; @Data @NoArgsConstructor public class GetTokenResponse { private String accessToken; private String tokenType; private int expiresIn; private String apiServer; private String primaryEnvironment; private ZonedDateTime expiresAt; private Map<String, String> engines; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/models/OnlineQueryBulkResponse.java
package ai.chalk.internal.request.models; import ai.chalk.exceptions.ChalkException; import ai.chalk.exceptions.ClientException; import ai.chalk.internal.bytes.BytesConsumer; import ai.chalk.models.OnlineQueryResult; import org.apache.arrow.memory.BufferAllocator; import java.util.HashMap; import java.util.Map; public record OnlineQueryBulkResponse(Map<String, OnlineQueryResultFeather> queryResults) implements AutoCloseable { public static OnlineQueryBulkResponse fromBytes(byte[] bytes, BufferAllocator allocator) throws ChalkException { Map<String, Object> res; try { res = BytesConsumer.unmarshal(bytes); } catch (Exception e) { throw new ClientException("failed to unmarshal bytes into OnlineQueryBulkResponse", e); } Map<String, OnlineQueryResultFeather> resultFeatherMap = new HashMap<>(); if (res.containsKey("query_results_bytes")) { byte[] queryResultsBytes = (byte[]) res.get("query_results_bytes"); try { Map<String, Object> resultBytesMap = BytesConsumer.unmarshal(queryResultsBytes); for (Map.Entry<String, Object> entry : resultBytesMap.entrySet()) { String key = entry.getKey(); byte[] value = (byte[]) entry.getValue(); OnlineQueryResultFeather featherResult = OnlineQueryResultFeather.fromBytes(value, allocator); resultFeatherMap.put(key, featherResult); } } catch (Exception e) { for (var subResult: resultFeatherMap.values()) { subResult.close(); } throw new ClientException("failed to unmarshal bytes into OnlineQueryBulkResponse", e); } } else { throw new ClientException("missing key 'query_results_bytes' in unmarshalled bytes"); } return new OnlineQueryBulkResponse(resultFeatherMap); } public OnlineQueryResult toResult() throws ChalkException { if (!(this.queryResults.containsKey("0"))) { throw new ClientException("malformed online query bulk response"); } OnlineQueryResultFeather internalResult = this.queryResults.get("0"); return new OnlineQueryResult( internalResult.scalarData(), internalResult.groupsData(), internalResult.errors(), internalResult.meta(), internalResult.allocator() ); } @Override public void close() { for (var subResult: queryResults.values()) { subResult.close(); } } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/models/OnlineQueryResultFeather.java
package ai.chalk.internal.request.models; import ai.chalk.exceptions.ChalkException; import ai.chalk.exceptions.ClientException; import ai.chalk.exceptions.ServerError; import ai.chalk.internal.arrow.FeatherProcessor; import ai.chalk.internal.bytes.BytesConsumer; import ai.chalk.models.QueryMeta; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.vector.table.Table; import java.nio.Buffer; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.StringJoiner; public record OnlineQueryResultFeather(Boolean hasData, Table scalarData, Map<String, Table> groupsData, ServerError[] errors, QueryMeta meta, BufferAllocator allocator) implements AutoCloseable { private static final Set<String> REQUIRED_KEYS = Set.of( "has_data", "scalar_data", "groups_data", "errors", "meta" ); public static OnlineQueryResultFeather fromBytes(byte[] bytes, BufferAllocator allocator) throws ChalkException { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); mapper.registerModule(new JavaTimeModule()); Map<String, Object> res; try { res = BytesConsumer.unmarshal(bytes); } catch (Exception e) { throw new ClientException("failed to unmarshal bytes into OnlineQueryResultFeather", e); } StringJoiner missingKeys = new StringJoiner(", "); for (var key : REQUIRED_KEYS) { if (!res.containsKey(key)) { missingKeys.add(key); } } if (missingKeys.length() != 0) { throw new ClientException("missing keys '[%s]' in unmarshalled bytes".formatted(missingKeys.toString())); } Object errorsObj = res.get("errors"); ServerError[] errors; if (errorsObj == null) { errors = null; } else if (!(errorsObj instanceof ArrayList<?> errorsStrList)) { throw new ClientException(String.format("malformed value 'errors' in unmarshalled bytes - expected `ArrayList` or `null` found `%s`", errorsObj.getClass().getSimpleName())); } else { errors = new ServerError[errorsStrList.size()]; for (int i = 0; i < errorsStrList.size(); i++) { Object errorStrObj = errorsStrList.get(i); if (!(errorStrObj instanceof String errorStr)) { throw new ClientException(String.format("malformed value 'errors' in unmarshalled bytes - expected an array of `String` found an array of `%s`", errorStrObj.getClass().getSimpleName())); } try { errors[i] = mapper.readValue(errorStr, ServerError.class); } catch (Exception e) { throw new ClientException(String.format("failed to unmarshal an individual error string: %s", errorStr), e); } } } Object metaStrObj = res.get("meta"); QueryMeta meta; if (metaStrObj == null) { meta = null; } else if (!(metaStrObj instanceof String metaStr)) { throw new ClientException(String.format("malformed value 'meta' in unmarshalled bytes - expected `String` or `null` found `%s`", metaStrObj.getClass().getSimpleName())); } else { try { meta = mapper.readValue(metaStr, QueryMeta.class); } catch (Exception e) { throw new ClientException(String.format("failed to unmarshal query meta: %s", metaStr), e); } } Object hasDataObj = res.get("has_data"); if (!(hasDataObj instanceof Boolean hasDataBool)) { throw new ClientException("malformed value 'has_data' in unmarshalled bytes"); } Table scalarData = null; Map<String, Table> groupsData = new HashMap<>(); try { if (hasDataBool) { var scalarDataBytesObj = res.get("scalar_data"); if (!(scalarDataBytesObj instanceof byte[] scalarDataBytes)) { throw new ClientException("malformed value 'scalar_data' in unmarshalled bytes"); } try { scalarData = FeatherProcessor.convertBytesToTable(scalarDataBytes, allocator); } catch (Exception e) { throw new ClientException("failed to convert scalar data bytes to VectorSchemaRoot", e); } var groupsDataBytesObj = res.get("groups_data"); if (!(groupsDataBytesObj instanceof byte[] groupsDataBytes)) { throw new ClientException(String.format("malformed value 'groups_data' in unmarshalled bytes - expected `byte[]` found `%s`", groupsDataBytesObj.getClass().getName())); } Map<String, Object> groupsDataMap; try { groupsDataMap = BytesConsumer.unmarshal(groupsDataBytes); } catch (Exception e) { throw new ClientException("failed to unmarshal groups data bytes", e); } for (Map.Entry<String, Object> entry : groupsDataMap.entrySet()) { String key = entry.getKey(); if (!(entry.getValue() instanceof byte[] value)) { throw new ClientException(String.format("malformed value 'groups_data' in unmarshalled bytes - expected `byte[]` found `%s`", entry.getValue().getClass().getSimpleName())); } try { Table table = FeatherProcessor.convertBytesToTable(value, allocator); groupsData.put(key, table); } catch (Exception e) { throw new ClientException(String.format("failed to convert data for has-many feature '%s' bytes to VectorSchemaRoot", key), e); } } } return new OnlineQueryResultFeather( hasDataBool, scalarData, groupsData, errors, meta, allocator ); } catch (Exception e) { if (scalarData != null) scalarData.close(); for (Table table : groupsData.values()) { table.close(); } allocator.close(); throw e; } } @Override public void close() { if (scalarData != null) { scalarData.close(); } for (Table table : groupsData.values()) { table.close(); } allocator.close(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/internal/request/models/SendRequestParams.java
package ai.chalk.internal.request.models; import lombok.AllArgsConstructor; import lombok.Data; import javax.annotation.Nullable; import java.time.Duration; import java.util.Optional; // Not using Lombok's @Builder annotation because the generated // `responseClass` method takes in `Class<Object>` instead of `Class<T>` @Data @AllArgsConstructor public class SendRequestParams { private Object body; private String method; private String path; private boolean dontRefresh; private String environmentOverride; private String previewDeploymentId; private String branch; private String queryName; private Boolean isEngineRequest; private Duration requestLevelTimeout; public static class Builder { private Object body; private String method; private String path; private boolean dontRefresh; private String environmentOverride; private String previewDeploymentId; private String branch; private String queryName; private Boolean isEngineRequest; private @Nullable Duration requestLevelTimeout; public Builder(Duration requestLevelTimeout) { this.requestLevelTimeout = requestLevelTimeout; } public Builder body(Object body) { this.body = body; return this; } public Builder method(String method) { this.method = method; return this; } public Builder path(String path) { this.path = path; return this; } public Builder dontRefresh(boolean dontRefresh) { this.dontRefresh = dontRefresh; return this; } public Builder environmentOverride(String environmentOverride) { this.environmentOverride = environmentOverride; return this; } public Builder previewDeploymentId(String previewDeploymentId) { this.previewDeploymentId = previewDeploymentId; return this; } public Builder queryName(String queryName) { this.queryName = queryName; return this; } public Builder branch(String branch) { this.branch = branch; return this; } public Builder isEngineRequest(Boolean isEngineRequest) { this.isEngineRequest = isEngineRequest; return this; } public SendRequestParams build() { return new SendRequestParams( body, method, path, dontRefresh, environmentOverride, previewDeploymentId, branch, queryName, isEngineRequest, requestLevelTimeout ); } } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/ErrorCode.java
package ai.chalk.models; import lombok.Getter; @Getter public enum ErrorCode { /** * Indicates the query request contained missing or malformed * attributes. */ PARSE_FAILED("PARSE_FAILED"), /** * Indicates a resolver that was required as part of running * the dependency graph could not be found. */ RESOLVER_NOT_FOUND("RESOLVER_NOT_FOUND"), /** * Indicates the query is invalid. */ INVALID_QUERY("INVALID_QUERY"), /** * Indicates a feature value did not match the expected schema * (e.g. `incompatible type "int"; expected "str"`). */ VALIDATION_FAILED("VALIDATION_FAILED"), /** * Indicates the resolver for a feature errored. */ RESOLVER_FAILED("RESOLVER_FAILED"), /** * Indicates the resolver for a feature timed out. */ RESOLVER_TIMED_OUT("RESOLVER_TIMED_OUT"), /** * Indicates a crash in a resolver that was to produce an input * for the resolver crashed, and so the resolver could not run. */ UPSTREAM_FAILED("UPSTREAM_FAILED"), /** * Indicates the request was submitted with an invalid * authentication header. */ UNAUTHENTICATED("UNAUTHENTICATED"), /** * Indicates the supplied credentials do not provide the right * authorization to execute the request. */ UNAUTHORIZED("UNAUTHORIZED"), /** * Indicates an unspecified error occurred. */ INTERNAL_SERVER_ERROR("INTERNAL_SERVER_ERROR"), /** * Indicates the operation was cancelled, typically by the * caller. */ CANCELLED("CANCELLED"), /** * Indicates the deadline expired before the operation could * complete. */ DEADLINE_EXCEEDED("DEADLINE_EXCEEDED"); private final String value; ErrorCode(String value) { this.value = value; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/ErrorCodeCategory.java
package ai.chalk.models; import lombok.Getter; @Getter public enum ErrorCodeCategory { /** * Request errors are raised before the execution of your * resolver code. They may occur due to invalid feature * names in the input or a request that cannot be satisfied * by the resolvers you have defined. */ REQUEST("REQUEST"), /** * Field errors are raised while running a feature resolver * for a particular field. For this type of error, you'll * find a feature and resolver attribute in the error type. * When a feature resolver crashes, you will receive a null * value in the response. To differentiate from a resolver * returning a null value and a failure in the resolver, * you need to check the error schema. */ FIELD("FIELD"), /** * Network errors are thrown outside your resolvers. * For example, your request was unauthenticated, * connection failed, or an error occurred within Chalk. */ NETWORK("NETWORK"); private final String value; ErrorCodeCategory(String value) { this.value = value; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/OnlineQueryParams.java
package ai.chalk.models; import ai.chalk.features.Feature; import ai.chalk.features.FeaturesBase; import ai.chalk.features.StructFeaturesClass; import ai.chalk.features.WindowedFeaturesClass; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import java.time.ZonedDateTime; import java.util.*; import java.time.Duration; /** * OnlineQueryParams holds the parameters for an online query. * It is the starting point for constructing an instance of * OnlineQueryParamsComplete. Both `withInput` and `withOutput` * must be called at least once. * * <p> * Example usage: * <pre> * {@code * OnlineQueryParamsComplete params = OnlineQueryParams.builder() * .withInput("user.id", Arrays.asList(1, 2, 3)) * .withOutputs("user.email", "user.transactions") * .build(); * * try (OnlineQueryResult result = client.onlineQuery(params)) { * // do something with the result * } * } * </pre> * </p> */ @AllArgsConstructor @Getter public class OnlineQueryParams { /** * The features for which there are known values, mapped * to those values. Set by * `OnlineQueryParams.builder().withInput`. **/ private Map<String, List<?>> inputs; /** * The features that you'd like to compute from the inputs. * Set by `OnlineQueryParams.builder().withOutputs`. */ private List<String> outputs; /** * Maximum staleness overrides for any output features or intermediate features. * Set by `OnlineQueryParams.builder().withStaleness`. */ private Map<String, Duration> staleness; /** * Metadata to attach to the query. Set by `OnlineQueryParams.builder().withMeta`. */ private Map<String, String> meta; private List<String> tags; /** * Triggers returning metadata about the query execution. This could make the query slightly * slower. For more information, see https://docs.chalk.ai/docs/query-basics. */ private boolean includeMeta; /** * If true, the output of each of the query plan stages will be stored * in S3/GCS. This will dramatically impact the performance of the query, * so it should only be used for debugging. * These files will be visible in the web dashboard's query detail view, and * can be downloaded in full by clicking on a plan node in the query plan visualizer. */ private boolean storePlanStages; /** * Log the query execution plan. Requests using `explain=True` will be slower * than requests using `explain=False`. * If `True`, 'includeMeta' will be set to `True` as well. */ private boolean explain; /** * The environment under which to run the resolvers. */ private String environmentId; /** * If specified, Chalk will route your request to the relevant preview deployment. */ private String previewDeploymentId; /** * The semantic name for the query you're making, for example, `"loan_application_model"`. * Typically, each query that you make from your application should have a name. * Chalk will present metrics and dashboard functionality grouped by 'query_name'. */ private String queryName; private String queryNameVersion; /** * You can specify a correlation ID to be used in logs and web interfaces. * This should be globally unique, i.e. a `uuid` or similar. Logs generated * during the execution of your query will be tagged with this correlation id. */ private String correlationId; /** * If specified, Chalk will route your request to the relevant branch. */ private String branch; /** * The time at which to evaluate the query. If not specified, the current time will be used. * The length of this list must be the same as the length of the values in `inputs`. */ private List<ZonedDateTime> now; /** * If specified, *all* required_resolver_tags must be present on a resolver for it to be * considered eligible to execute. */ private List<String> requiredResolverTags; /** * Map of additional options to pass to the Chalk query engine. Values may be provided * as part of conversations with Chalk Support to enable or disable specific functionality. */ private Map<String, Object> plannerOptions; /** * Timeout for the query. Defaults to no timeout. Timeout of 0 means the request times out immediately. */ private Duration timeout; @AllArgsConstructor @NoArgsConstructor public static class Builder<T extends Builder<T>> { protected Map<String, List<?>> inputs; protected List<String> outputs; protected Map<String, Duration> staleness; protected Map<String, String> meta; protected List<String> tags; protected boolean includeMeta; protected boolean storePlanStages; protected boolean explain; protected String environmentId; protected String previewDeploymentId; protected String queryName; protected String queryNameVersion; protected String correlationId; protected String branch; protected List<ZonedDateTime> now; protected List<String> requiredResolverTags; protected Map<String, Object> plannerOptions; protected Duration timeout; protected T _withInput(String fqn, List<?> values) { if (this.inputs == null) { this.inputs = new HashMap<>(); } this.inputs.put(fqn, values); return (T) this; } public <K> T _withInput(Feature<K> feature, K... value) { return this._withInput(feature.getFqn(), Arrays.asList(value)); } public <K> T _withInput(Feature<K> feature, List<K> value) { return this._withInput(feature.getFqn(), value); } protected T _withInputs(Map<String, List<?>> inputs) { if (this.inputs == null) { this.inputs = new HashMap<>(); } this.inputs.putAll(inputs); return (T) this; } protected T _withInput(SingleRowInput singleRowInput) { return this._withInputs(singleRowInput.getInputs()); } protected T _withOutputs(String... outputs) { if (this.outputs == null) { this.outputs = new ArrayList<>(); } this.outputs.addAll(Arrays.asList(outputs)); return (T) this; } protected T _withOutputs(List<String> outputs) { if (this.outputs == null) { this.outputs = new ArrayList<>(); } this.outputs.addAll(outputs); return (T) this; } public T _withOutputs(Feature<?>... outputs) { var outputFqns = new String[outputs.length]; for (int i = 0; i < outputs.length; i++) { outputFqns[i] = outputs[i].getFqn(); } return this._withOutputs(outputFqns); } public T _withOutputs(FeaturesBase... outputs) { var outputFqns = new String[outputs.length]; for (int i = 0; i < outputs.length; i++) { outputFqns[i] = outputs[i].getFqn(); } return this._withOutputs(outputFqns); } // withStaleness takes a map of feature FQN to duration and adds them to the staleness map public T withStaleness(Map<String, Duration> staleness) { if (this.staleness == null) { this.staleness = new HashMap<>(); } this.staleness.putAll(staleness); return (T) this; } // withMeta takes a map of meta key to meta value and adds them to the meta map public T withMeta(Map<String, String> meta) { if (this.meta == null) { this.meta = new HashMap<>(); } this.meta.putAll(meta); return (T) this; } // withTags takes a List of tags and adds them to the tags list public T withTags(List<String> tags) { if (this.tags == null) { this.tags = new ArrayList<>(); } this.tags.addAll(tags); return (T) this; } // withTags takes a one or more tags and adds them to the tags list public T withTags(String... tags) { return this.withTags(Arrays.asList(tags)); } // withTag adds a single tag to the tags list public T withTag(String tag) { return this.withTags(Arrays.asList(tag)); } public T withRequiredResolverTags(List<String> requiredResolverTags) { if (this.requiredResolverTags == null) { this.requiredResolverTags = new ArrayList<>(); } this.requiredResolverTags.addAll(requiredResolverTags); return (T) this; } public T withRequiredResolverTags(String... requiredResolverTags) { return this.withRequiredResolverTags(Arrays.asList(requiredResolverTags)); } public T withRequiredResolverTag(String requiredResolverTag) { return this.withRequiredResolverTags(Arrays.asList(requiredResolverTag)); } public T withPlannerOptions(Map<String, Object> plannerOptions) { if (this.plannerOptions == null) { this.plannerOptions = new HashMap<>(); } this.plannerOptions.putAll(plannerOptions); return (T) this; } public T withPlannerOption(String key, Object value) { if (this.plannerOptions == null) { this.plannerOptions = new HashMap<>(); } this.plannerOptions.put(key, value); return (T) this; } public T withTimeout(Duration timeout) { this.timeout = timeout; return (T) this; } // withNow takes a list of ZonedDateTimes and adds them to the now list public T withNow(List<ZonedDateTime> now) { if (this.now == null) { this.now = new ArrayList<>(); } this.now.addAll(now); return (T) this; } // withIncludeMeta sets the includeMeta flag public T withIncludeMeta(boolean includeMeta) { this.includeMeta = includeMeta; return (T) this; } // withStorePlanStages sets the storePlanStages flag public T withStorePlanStages(boolean storePlanStages) { this.storePlanStages = storePlanStages; return (T) this; } // withExplain sets the explain flag public T withExplain(boolean explain) { this.explain = explain; return (T) this; } // withEnvironmentId sets the environmentId public T withEnvironmentId(String environmentId) { this.environmentId = environmentId; return (T) this; } // withPreviewDeploymentId sets the previewDeploymentId public T withPreviewDeploymentId(String previewDeploymentId) { this.previewDeploymentId = previewDeploymentId; return (T) this; } // withQueryName sets the queryName public T _withQueryName(String queryName) { this.queryName = queryName; return (T) this; } // withQueryNameVersion sets the queryNameVersion public T withQueryNameVersion(String queryNameVersion) { this.queryNameVersion = queryNameVersion; return (T) this; } // withCorrelationId sets the correlationId public T withCorrelationId(String correlationId) { this.correlationId = correlationId; return (T) this; } // withBranch sets the branch public T withBranch(String branch) { this.branch = branch; return (T) this; } public OnlineQueryParams build() { return new OnlineQueryParams( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } } public static class BuilderComplete extends Builder<BuilderComplete> { public BuilderComplete( Map<String, List<?>> inputs, List<String> outputs, Map<String, Duration> staleness, Map<String, String> meta, List<String> tags, boolean includeMeta, boolean storePlanStages, boolean explain, String environmentId, String previewDeploymentId, String queryName, String queryNameVersion, String correlationId, String branch, List<ZonedDateTime> now, List<String> requiredResolverTags, Map<String, Object> plannerOptions, Duration timeout ) { super( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderComplete withInput(String fqn, List<?> values) { return this._withInput(fqn, values); } public BuilderComplete withInputs(Map<String, List<?>> inputs) { return this._withInputs(inputs); } public BuilderComplete withInput(SingleRowInput singleRowInput) { return this._withInput(singleRowInput); } @SafeVarargs public final <T> BuilderComplete withInput(Feature<T> feature, T... values) { return this._withInput(feature, values); } public final <T> BuilderComplete withInput(Feature<T> feature, List<T> values) { return this._withInput(feature, values); } public BuilderComplete withOutputs(String... outputs) { return this._withOutputs(outputs); } public BuilderComplete withOutputs(List<String> outputs) { return this._withOutputs(outputs); } public BuilderComplete withOutputs(Feature<?>... outputs) { return this._withOutputs(outputs); } public BuilderComplete withOutputs(FeaturesBase... outputs) { return this._withOutputs(outputs); } public BuilderComplete withQueryName(String queryName) { return this._withQueryName(queryName); } public OnlineQueryParamsComplete build() { return new OnlineQueryParamsComplete( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } } public static class BuilderWithInputs extends Builder<BuilderWithInputs> { public BuilderWithInputs( Map<String, List<?>> inputs, List<String> outputs, Map<String, Duration> staleness, Map<String, String> meta, List<String> tags, boolean includeMeta, boolean storePlanStages, boolean explain, String environmentId, String previewDeploymentId, String queryName, String queryNameVersion, String correlationId, String branch, List<ZonedDateTime> now, List<String> requiredResolverTags, Map<String, Object> plannerOptions, Duration timeout ) { super( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } private BuilderComplete newBuilderComplete() { return new BuilderComplete( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderWithInputs withInput(String fqn, List<?> values) { return this._withInput(fqn, values); } public BuilderWithInputs withInputs(Map<String, List<?>> inputs) { return this._withInputs(inputs); } public BuilderWithInputs withInput(SingleRowInput singleRowInput) { return this._withInput(singleRowInput); } @SafeVarargs public final <T> BuilderWithInputs withInput(Feature<T> feature, T... values) { return this._withInput(feature, values); } public final <T> BuilderWithInputs withInput(Feature<T> feature, List<T> values) { return this._withInput(feature, values); } public BuilderComplete withOutputs(String... outputs) { return this.newBuilderComplete()._withOutputs(outputs); } public BuilderComplete withOutputs(List<String> outputs) { return this.newBuilderComplete()._withOutputs(outputs); } public BuilderComplete withOutputs(Feature<?>... outputs) { return this.newBuilderComplete()._withOutputs(outputs); } public BuilderComplete withOutputs(FeaturesBase... outputs) { return this.newBuilderComplete()._withOutputs(outputs); } public BuilderComplete withQueryName(String queryName) { return this.newBuilderComplete()._withQueryName(queryName); } } public static class BuilderWithOutputs extends Builder<BuilderWithOutputs> { public BuilderWithOutputs( Map<String, List<?>> inputs, List<String> outputs, Map<String, Duration> staleness, Map<String, String> meta, List<String> tags, boolean includeMeta, boolean storePlanStages, boolean explain, String environmentId, String previewDeploymentId, String queryName, String queryNameVersion, String correlationId, String branch, List<ZonedDateTime> now, List<String> requiredResolverTags, Map<String, Object> plannerOptions, Duration timeout ) { super( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderComplete newBuilderComplete() { return new BuilderComplete( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderComplete withInput(String fqn, List<?> values) { return newBuilderComplete()._withInput(fqn, values); } @SafeVarargs public final <T> BuilderComplete withInput(Feature<T> feature, T... values) { return newBuilderComplete().withInput(feature, values); } public final <T> BuilderComplete withInput(Feature<T> feature, List<T> values) { return newBuilderComplete().withInput(feature, values); } public final <T> BuilderComplete withInputs(Map<String, List<?>> inputs) { return newBuilderComplete()._withInputs(inputs); } public final BuilderComplete withInput(SingleRowInput singleRowInput) { return newBuilderComplete()._withInput(singleRowInput); } public BuilderWithOutputs withOutputs(String... outputs) { return this._withOutputs(outputs); } public BuilderWithOutputs withOutputs(List<String> outputs) { return this._withOutputs(outputs); } public BuilderWithOutputs withOutputs(Feature<?>... outputs) { return this._withOutputs(outputs); } public BuilderWithOutputs withOutputs(FeaturesBase... outputs) { return this._withOutputs(outputs); } public BuilderWithOutputs withQueryName(String queryName) { return this._withQueryName(queryName); } } @NoArgsConstructor public static class BuilderSeed extends Builder<BuilderSeed> { public BuilderSeed( Map<String, List<?>> inputs, List<String> outputs, Map<String, Duration> staleness, Map<String, String> meta, List<String> tags, boolean includeMeta, boolean storePlanStages, boolean explain, String environmentId, String previewDeploymentId, String queryName, String queryNameVersion, String correlationId, String branch, List<ZonedDateTime> now, List<String> requiredResolverTags, Map<String, Object> plannerOptions, Duration timeout ) { super( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderWithInputs newBuilderWithInputs() { return new BuilderWithInputs( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderWithOutputs newBuilderWithOutputs() { return new BuilderWithOutputs( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } public BuilderWithInputs withInput(String fqn, List<?> values) { return newBuilderWithInputs().withInput(fqn, values); } public BuilderWithInputs withInputs(Map<String, List<?>> inputs) { return newBuilderWithInputs().withInputs(inputs); } public BuilderWithInputs withInput(SingleRowInput singleRowInput) { return newBuilderWithInputs().withInput(singleRowInput); } @SafeVarargs public final <T> BuilderWithInputs withInput(Feature<T> feature, T... value) { return newBuilderWithInputs().withInput(feature, value); } public final <T> BuilderWithInputs withInput(Feature<T> feature, List<T> value) { return newBuilderWithInputs().withInput(feature, value); } // withOutputs takes either one output or a list of outputs and adds them to the outputs list public BuilderWithOutputs withOutputs(String... outputs) { return newBuilderWithOutputs().withOutputs(outputs); } public BuilderWithOutputs withOutputs(List<String> outputs) { return newBuilderWithOutputs().withOutputs(outputs); } public BuilderWithOutputs withOutputs(Feature<?>... outputs) { return newBuilderWithOutputs().withOutputs(outputs); } public BuilderWithOutputs withOutputs(WindowedFeaturesClass... outputs) { return newBuilderWithOutputs().withOutputs(outputs); } public BuilderWithOutputs withOutputs(StructFeaturesClass... outputs) { return newBuilderWithOutputs().withOutputs(outputs); } public BuilderWithOutputs withQueryName(String queryName) { return newBuilderWithOutputs().withQueryName(queryName); } } /** * Helper class for building input data for single-row online queries. * Provides a more convenient way to add input values for single-row queries * without needing to wrap each value in List.of() or Arrays.asList(). */ public static class SingleRowInput { private HashMap<String, List<?>> inputs = new HashMap<>(); /** * Create a new SingleRowInput builder. */ public SingleRowInput() {} /** * Add a value to the row using a typed Feature. * * @param feature The feature to add a value for * @param value The value for this feature * @return This SingleRowInput for method chaining */ public final <T> SingleRowInput withInput(Feature<T> feature, T value) { this.inputs.put(feature.getFqn(), List.of(value)); return this; } /** * Add a value to the row using a feature fully qualified name (FQN). * * @param featureFqn The fully qualified name of the feature * @param value The value for this feature * @return This SingleRowInput for method chaining */ public final SingleRowInput withInput(String featureFqn, Object value) { this.inputs.put(featureFqn, List.of(value)); return this; } /** * Add multiple values to the row using a map of feature FQNs to values. * * @param inputs Map of feature FQNs to their values * @return This SingleRowInput for method chaining */ public final SingleRowInput withInputs(Map<String, Object> inputs) { for (Map.Entry<String, Object> entry : inputs.entrySet()) { this.inputs.put(entry.getKey(), List.of(entry.getValue())); } return this; } /** * Get the internal inputs map. Used by builder classes to retrieve the input data. * * @return The inputs map where each feature maps to a list containing a single value */ Map<String, List<?>> getInputs() { return inputs; } } public static BuilderSeed builder() { return new BuilderSeed(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/OnlineQueryParamsComplete.java
package ai.chalk.models; import java.time.Duration; import java.time.ZonedDateTime; import java.util.List; import java.util.Map; public class OnlineQueryParamsComplete extends OnlineQueryParams { /** * Thin subclass of OnlineQueryParams. Used to statically * indicate that all required online query params have been * provided. * * <p> Constructed by calling `withInput` and `withOutput` * at least once in {@link OnlineQueryParams.Builder}. * * <p> * Example usage: * <pre> * {@code * OnlineQueryParamsComplete params = OnlineQueryParams.builder() * .withInput("user.id", Arrays.asList(1, 2, 3)) * .withOutputs("user.email", "user.transactions") * .build(); * * try (OnlineQueryResult result = client.onlineQuery(params)) { * // do something with the result * } * } * </pre> * </p> */ public OnlineQueryParamsComplete( Map<String, List<?>> inputs, List<String> outputs, Map<String, Duration> staleness, Map<String, String> meta, List<String> tags, boolean includeMeta, boolean storePlanStages, boolean explain, String environmentId, String previewDeploymentId, String queryName, String queryNameVersion, String correlationId, String branch, List<ZonedDateTime> now, List<String> requiredResolverTags, Map<String, Object> plannerOptions, Duration timeout ) { super( inputs, outputs, staleness, meta, tags, includeMeta, storePlanStages, explain, environmentId, previewDeploymentId, queryName, queryNameVersion, correlationId, branch, now, requiredResolverTags, plannerOptions, timeout ); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/OnlineQueryResult.java
package ai.chalk.models; import ai.chalk.exceptions.ClientException; import ai.chalk.exceptions.ServerError; import ai.chalk.features.FeaturesClass; import ai.chalk.internal.arrow.Unmarshaller; import lombok.Data; import lombok.AllArgsConstructor; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.vector.table.Table; import java.util.Map; /** * OnlineQueryResult holds the result of an online query. */ @Data @AllArgsConstructor public class OnlineQueryResult implements AutoCloseable { /** * scalarsTable is an Arrow Table containing scalar * features of the target feature class. For example, if * the target feature class "User" has the attributes * "email" and "name", then the scalarsTable will contain * these two columns. Each row in the table corresponds to * a single User in the query. */ private final Table scalarsTable; /** * groupsTables is a map from a has-many feature to its * corresponding Arrow Table. For example, if the target * feature class "User" has an attribute "transactions" * which is a has-many feature, then all transactions * associated with any of the Users in the query will be * returned in the groupsTables map, under the key * "user.transactions". */ private final Map<String, Table> groupsTables; /** * errors is a list of errors that occurred in the server * during the query. */ private final ServerError[] errors; /** * meta contains execution metadata for the query. See QueryMeta for * details. */ private final QueryMeta meta; /** * allocator associated with the arrow objects in the result. * Needs to be closed when the result is no longer needed. */ private final BufferAllocator allocator; /** * close releases resources associated with the result. */ public void close() { if (scalarsTable != null) { scalarsTable.close(); } if (groupsTables != null) { for (Table table : groupsTables.values()) { table.close(); } } allocator.close(); } /* * unmarshal deserializes the underlying Arrow `Table` into an array of the target feature class. * This operation consumes the Arrow Table, so the `Table` objects should not be used after * calling this method. If needed, please make a copy of the `Table` beforehand. */ public <T extends FeaturesClass> T[] unmarshal(Class<T> clazz) throws ClientException { return Unmarshaller.unmarshalOnlineQueryResult(this, clazz); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/QueryMeta.java
package ai.chalk.models; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; import java.time.ZonedDateTime; /** * QueryMeta represents metadata about a Chalk query. */ @Data @NoArgsConstructor @AllArgsConstructor public class QueryMeta { /** * Execution duration in seconds. */ private double executionDurationS; /** * The id of the deployment that served this query. */ private String deploymentId; /** * The id of the environment that served this query. Not * intended to be human-readable,but helpful for support. */ private String environmentId; /** * The short name of the environment that served this query. * For example: "dev" or "prod". */ private String environmentName; /** * A unique ID generated and persisted by Chalk for this * query. All computed features, metrics, and logs are * associated with this ID. Your system can store this ID * for audit and debugging workflows. */ private String queryId; /** * At the start of query execution, Chalk computes * 'datetime.now()'. This value is used to timestamp * computed features. */ private ZonedDateTime queryTimestamp; /** * Deterministic hash of the 'structure' of the query. * Queries that have the same input/output features will * typically have the same hash; changes may be observed * over time as we adjust implementation details. */ private String queryHash; /** * Associated trace ID for this query. Instrumental for debugging. */ private String traceId; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/ResolverException.java
package ai.chalk.models; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class ResolverException { // The name of the class of the exception. private String kind; // The message taken from the exception. private String message; // The stacktrace produced by the code. private String stacktrace; private String internalStacktrace; @Override public String toString() { return "ResolverException{" + "kind='" + kind + '\'' + ", message='" + message + '\'' + ", stacktrace='" + stacktrace + '\'' + '}'; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/UploadFeaturesParams.java
package ai.chalk.models; import ai.chalk.features.Feature; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import javax.annotation.Nullable; import java.time.Duration; import java.util.HashMap; import java.util.List; import java.util.Map; @AllArgsConstructor @Getter public class UploadFeaturesParams { private final Map<String, List<?>> inputs; @Nullable private final String environmentId; @Nullable private final Duration timeout; @AllArgsConstructor @NoArgsConstructor public static class Builder { protected Map<String, List<?>> inputs; protected String environmentId; protected Duration timeout; public UploadFeaturesParams build() { return new UploadFeaturesParams(this.inputs, this.environmentId, this.timeout); } private void initInputs() { if (this.inputs == null) { this.inputs = new HashMap<>(); } } private Builder _withInput(String fqn, List<?> value) { this.initInputs(); this.inputs.put(fqn, value); return this; } public Builder withInputs(Map<String, List<?>> inputs) { this.initInputs(); this.inputs.putAll(inputs); return this; } public <T> Builder withFeatureInputs(Map<Feature<T>, List<T>> inputs) { this.initInputs(); inputs.forEach((feature, value) -> this.inputs.put(feature.getFqn(), value)); return this; } public Builder withInput(Feature<?> feature, List<?> value) { return this._withInput(feature.getFqn(), value); } public Builder withInput(String feature, List<?> value) { return this._withInput(feature, value); } public Builder withTimeout(Duration timeout) { this.timeout = timeout; return this; } } public static Builder builder() { return new Builder(); } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/models/UploadFeaturesResult.java
package ai.chalk.models; import ai.chalk.exceptions.ServerError; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; @Data @NoArgsConstructor @AllArgsConstructor public class UploadFeaturesResult { private String operationId; private List<ServerError> errors; }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfill.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateBackfill} */ public final class AggregateBackfill extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateBackfill) AggregateBackfillOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateBackfill.newBuilder() to construct. private AggregateBackfill(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateBackfill() { series_ = java.util.Collections.emptyList(); resolver_ = ""; datetimeFeature_ = ""; filtersDescription_ = ""; groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateBackfill(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfill_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfill_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder.class); } private int bitField0_; public static final int SERIES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> series_; /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> getSeriesList() { return series_; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesOrBuilderList() { return series_; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public int getSeriesCount() { return series_.size(); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getSeries(int index) { return series_.get(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder getSeriesOrBuilder( int index) { return series_.get(index); } public static final int RESOLVER_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object resolver_ = ""; /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return The resolver. */ @java.lang.Override public java.lang.String getResolver() { java.lang.Object ref = resolver_; 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(); resolver_ = s; return s; } } /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return The bytes for resolver. */ @java.lang.Override public com.google.protobuf.ByteString getResolverBytes() { java.lang.Object ref = resolver_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resolver_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DATETIME_FEATURE_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object datetimeFeature_ = ""; /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return The datetimeFeature. */ @java.lang.Override public java.lang.String getDatetimeFeature() { java.lang.Object ref = datetimeFeature_; 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(); datetimeFeature_ = s; return s; } } /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return The bytes for datetimeFeature. */ @java.lang.Override public com.google.protobuf.ByteString getDatetimeFeatureBytes() { java.lang.Object ref = datetimeFeature_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); datetimeFeature_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BUCKET_DURATION_FIELD_NUMBER = 4; private com.google.protobuf.Duration bucketDuration_; /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> * @return Whether the bucketDuration field is set. */ @java.lang.Override public boolean hasBucketDuration() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> * @return The bucketDuration. */ @java.lang.Override public com.google.protobuf.Duration getBucketDuration() { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getBucketDurationOrBuilder() { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } public static final int FILTERS_DESCRIPTION_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object filtersDescription_ = ""; /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return The filtersDescription. */ @java.lang.Override public java.lang.String getFiltersDescription() { java.lang.Object ref = filtersDescription_; 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(); filtersDescription_ = s; return s; } } /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return The bytes for filtersDescription. */ @java.lang.Override public com.google.protobuf.ByteString getFiltersDescriptionBytes() { java.lang.Object ref = filtersDescription_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); filtersDescription_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GROUP_BY_FIELD_NUMBER = 6; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return A list containing the groupBy. */ public com.google.protobuf.ProtocolStringList getGroupByList() { return groupBy_; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return The count of groupBy. */ public int getGroupByCount() { return groupBy_.size(); } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index of the element to return. * @return The groupBy at the given index. */ public java.lang.String getGroupBy(int index) { return groupBy_.get(index); } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index of the value to return. * @return The bytes of the groupBy at the given index. */ public com.google.protobuf.ByteString getGroupByBytes(int index) { return groupBy_.getByteString(index); } public static final int MAX_RETENTION_FIELD_NUMBER = 7; private com.google.protobuf.Duration maxRetention_; /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> * @return Whether the maxRetention field is set. */ @java.lang.Override public boolean hasMaxRetention() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> * @return The maxRetention. */ @java.lang.Override public com.google.protobuf.Duration getMaxRetention() { return maxRetention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRetention_; } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getMaxRetentionOrBuilder() { return maxRetention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRetention_; } public static final int LOWER_BOUND_FIELD_NUMBER = 8; private com.google.protobuf.Timestamp lowerBound_; /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> * @return Whether the lowerBound field is set. */ @java.lang.Override public boolean hasLowerBound() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> * @return The lowerBound. */ @java.lang.Override public com.google.protobuf.Timestamp getLowerBound() { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLowerBoundOrBuilder() { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } public static final int UPPER_BOUND_FIELD_NUMBER = 9; private com.google.protobuf.Timestamp upperBound_; /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> * @return Whether the upperBound field is set. */ @java.lang.Override public boolean hasUpperBound() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> * @return The upperBound. */ @java.lang.Override public com.google.protobuf.Timestamp getUpperBound() { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpperBoundOrBuilder() { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < series_.size(); i++) { output.writeMessage(1, series_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resolver_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resolver_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datetimeFeature_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, datetimeFeature_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getBucketDuration()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filtersDescription_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filtersDescription_); } for (int i = 0; i < groupBy_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, groupBy_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getMaxRetention()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(8, getLowerBound()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(9, getUpperBound()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < series_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, series_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resolver_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resolver_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datetimeFeature_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, datetimeFeature_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getBucketDuration()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filtersDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filtersDescription_); } { int dataSize = 0; for (int i = 0; i < groupBy_.size(); i++) { dataSize += computeStringSizeNoTag(groupBy_.getRaw(i)); } size += dataSize; size += 1 * getGroupByList().size(); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getMaxRetention()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getLowerBound()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getUpperBound()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill other = (ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill) obj; if (!getSeriesList() .equals(other.getSeriesList())) return false; if (!getResolver() .equals(other.getResolver())) return false; if (!getDatetimeFeature() .equals(other.getDatetimeFeature())) return false; if (hasBucketDuration() != other.hasBucketDuration()) return false; if (hasBucketDuration()) { if (!getBucketDuration() .equals(other.getBucketDuration())) return false; } if (!getFiltersDescription() .equals(other.getFiltersDescription())) return false; if (!getGroupByList() .equals(other.getGroupByList())) return false; if (hasMaxRetention() != other.hasMaxRetention()) return false; if (hasMaxRetention()) { if (!getMaxRetention() .equals(other.getMaxRetention())) return false; } if (hasLowerBound() != other.hasLowerBound()) return false; if (hasLowerBound()) { if (!getLowerBound() .equals(other.getLowerBound())) return false; } if (hasUpperBound() != other.hasUpperBound()) return false; if (hasUpperBound()) { if (!getUpperBound() .equals(other.getUpperBound())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getSeriesCount() > 0) { hash = (37 * hash) + SERIES_FIELD_NUMBER; hash = (53 * hash) + getSeriesList().hashCode(); } hash = (37 * hash) + RESOLVER_FIELD_NUMBER; hash = (53 * hash) + getResolver().hashCode(); hash = (37 * hash) + DATETIME_FEATURE_FIELD_NUMBER; hash = (53 * hash) + getDatetimeFeature().hashCode(); if (hasBucketDuration()) { hash = (37 * hash) + BUCKET_DURATION_FIELD_NUMBER; hash = (53 * hash) + getBucketDuration().hashCode(); } hash = (37 * hash) + FILTERS_DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getFiltersDescription().hashCode(); if (getGroupByCount() > 0) { hash = (37 * hash) + GROUP_BY_FIELD_NUMBER; hash = (53 * hash) + getGroupByList().hashCode(); } if (hasMaxRetention()) { hash = (37 * hash) + MAX_RETENTION_FIELD_NUMBER; hash = (53 * hash) + getMaxRetention().hashCode(); } if (hasLowerBound()) { hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; hash = (53 * hash) + getLowerBound().hashCode(); } if (hasUpperBound()) { hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; hash = (53 * hash) + getUpperBound().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill 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(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill 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 chalk.aggregate.v1.AggregateBackfill} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateBackfill) ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfill_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfill_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSeriesFieldBuilder(); getBucketDurationFieldBuilder(); getMaxRetentionFieldBuilder(); getLowerBoundFieldBuilder(); getUpperBoundFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (seriesBuilder_ == null) { series_ = java.util.Collections.emptyList(); } else { series_ = null; seriesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); resolver_ = ""; datetimeFeature_ = ""; bucketDuration_ = null; if (bucketDurationBuilder_ != null) { bucketDurationBuilder_.dispose(); bucketDurationBuilder_ = null; } filtersDescription_ = ""; groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); maxRetention_ = null; if (maxRetentionBuilder_ != null) { maxRetentionBuilder_.dispose(); maxRetentionBuilder_ = null; } lowerBound_ = null; if (lowerBoundBuilder_ != null) { lowerBoundBuilder_.dispose(); lowerBoundBuilder_ = null; } upperBound_ = null; if (upperBoundBuilder_ != null) { upperBoundBuilder_.dispose(); upperBoundBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfill_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill build() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill result = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill result) { if (seriesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { series_ = java.util.Collections.unmodifiableList(series_); bitField0_ = (bitField0_ & ~0x00000001); } result.series_ = series_; } else { result.series_ = seriesBuilder_.build(); } } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { result.resolver_ = resolver_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.datetimeFeature_ = datetimeFeature_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.bucketDuration_ = bucketDurationBuilder_ == null ? bucketDuration_ : bucketDurationBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { result.filtersDescription_ = filtersDescription_; } if (((from_bitField0_ & 0x00000020) != 0)) { groupBy_.makeImmutable(); result.groupBy_ = groupBy_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.maxRetention_ = maxRetentionBuilder_ == null ? maxRetention_ : maxRetentionBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000080) != 0)) { result.lowerBound_ = lowerBoundBuilder_ == null ? lowerBound_ : lowerBoundBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000100) != 0)) { result.upperBound_ = upperBoundBuilder_ == null ? upperBound_ : upperBoundBuilder_.build(); to_bitField0_ |= 0x00000008; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance()) return this; if (seriesBuilder_ == null) { if (!other.series_.isEmpty()) { if (series_.isEmpty()) { series_ = other.series_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSeriesIsMutable(); series_.addAll(other.series_); } onChanged(); } } else { if (!other.series_.isEmpty()) { if (seriesBuilder_.isEmpty()) { seriesBuilder_.dispose(); seriesBuilder_ = null; series_ = other.series_; bitField0_ = (bitField0_ & ~0x00000001); seriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSeriesFieldBuilder() : null; } else { seriesBuilder_.addAllMessages(other.series_); } } } if (!other.getResolver().isEmpty()) { resolver_ = other.resolver_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getDatetimeFeature().isEmpty()) { datetimeFeature_ = other.datetimeFeature_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasBucketDuration()) { mergeBucketDuration(other.getBucketDuration()); } if (!other.getFiltersDescription().isEmpty()) { filtersDescription_ = other.filtersDescription_; bitField0_ |= 0x00000010; onChanged(); } if (!other.groupBy_.isEmpty()) { if (groupBy_.isEmpty()) { groupBy_ = other.groupBy_; bitField0_ |= 0x00000020; } else { ensureGroupByIsMutable(); groupBy_.addAll(other.groupBy_); } onChanged(); } if (other.hasMaxRetention()) { mergeMaxRetention(other.getMaxRetention()); } if (other.hasLowerBound()) { mergeLowerBound(other.getLowerBound()); } if (other.hasUpperBound()) { mergeUpperBound(other.getUpperBound()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries m = input.readMessage( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.parser(), extensionRegistry); if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.add(m); } else { seriesBuilder_.addMessage(m); } break; } // case 10 case 18: { resolver_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { datetimeFeature_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getBucketDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { filtersDescription_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { java.lang.String s = input.readStringRequireUtf8(); ensureGroupByIsMutable(); groupBy_.add(s); break; } // case 50 case 58: { input.readMessage( getMaxRetentionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 case 66: { input.readMessage( getLowerBoundFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 66 case 74: { input.readMessage( getUpperBoundFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> series_ = java.util.Collections.emptyList(); private void ensureSeriesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { series_ = new java.util.ArrayList<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries>(series_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> seriesBuilder_; /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> getSeriesList() { if (seriesBuilder_ == null) { return java.util.Collections.unmodifiableList(series_); } else { return seriesBuilder_.getMessageList(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public int getSeriesCount() { if (seriesBuilder_ == null) { return series_.size(); } else { return seriesBuilder_.getCount(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getSeries(int index) { if (seriesBuilder_ == null) { return series_.get(index); } else { return seriesBuilder_.getMessage(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder setSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries value) { if (seriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSeriesIsMutable(); series_.set(index, value); onChanged(); } else { seriesBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder setSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder builderForValue) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.set(index, builderForValue.build()); onChanged(); } else { seriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries value) { if (seriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSeriesIsMutable(); series_.add(value); onChanged(); } else { seriesBuilder_.addMessage(value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries value) { if (seriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSeriesIsMutable(); series_.add(index, value); onChanged(); } else { seriesBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder builderForValue) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.add(builderForValue.build()); onChanged(); } else { seriesBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder builderForValue) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.add(index, builderForValue.build()); onChanged(); } else { seriesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addAllSeries( java.lang.Iterable<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> values) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, series_); onChanged(); } else { seriesBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder clearSeries() { if (seriesBuilder_ == null) { series_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { seriesBuilder_.clear(); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder removeSeries(int index) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.remove(index); onChanged(); } else { seriesBuilder_.remove(index); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder getSeriesBuilder( int index) { return getSeriesFieldBuilder().getBuilder(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder getSeriesOrBuilder( int index) { if (seriesBuilder_ == null) { return series_.get(index); } else { return seriesBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesOrBuilderList() { if (seriesBuilder_ != null) { return seriesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(series_); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder addSeriesBuilder() { return getSeriesFieldBuilder().addBuilder( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder addSeriesBuilder( int index) { return getSeriesFieldBuilder().addBuilder( index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder> getSeriesBuilderList() { return getSeriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesFieldBuilder() { if (seriesBuilder_ == null) { seriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder>( series_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); series_ = null; } return seriesBuilder_; } private java.lang.Object resolver_ = ""; /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return The resolver. */ public java.lang.String getResolver() { java.lang.Object ref = resolver_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resolver_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return The bytes for resolver. */ public com.google.protobuf.ByteString getResolverBytes() { java.lang.Object ref = resolver_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resolver_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @param value The resolver to set. * @return This builder for chaining. */ public Builder setResolver( java.lang.String value) { if (value == null) { throw new NullPointerException(); } resolver_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return This builder for chaining. */ public Builder clearResolver() { resolver_ = getDefaultInstance().getResolver(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @param value The bytes for resolver to set. * @return This builder for chaining. */ public Builder setResolverBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resolver_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object datetimeFeature_ = ""; /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return The datetimeFeature. */ public java.lang.String getDatetimeFeature() { java.lang.Object ref = datetimeFeature_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); datetimeFeature_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return The bytes for datetimeFeature. */ public com.google.protobuf.ByteString getDatetimeFeatureBytes() { java.lang.Object ref = datetimeFeature_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); datetimeFeature_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @param value The datetimeFeature to set. * @return This builder for chaining. */ public Builder setDatetimeFeature( java.lang.String value) { if (value == null) { throw new NullPointerException(); } datetimeFeature_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return This builder for chaining. */ public Builder clearDatetimeFeature() { datetimeFeature_ = getDefaultInstance().getDatetimeFeature(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @param value The bytes for datetimeFeature to set. * @return This builder for chaining. */ public Builder setDatetimeFeatureBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); datetimeFeature_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.Duration bucketDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> bucketDurationBuilder_; /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> * @return Whether the bucketDuration field is set. */ public boolean hasBucketDuration() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> * @return The bucketDuration. */ public com.google.protobuf.Duration getBucketDuration() { if (bucketDurationBuilder_ == null) { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } else { return bucketDurationBuilder_.getMessage(); } } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ public Builder setBucketDuration(com.google.protobuf.Duration value) { if (bucketDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } bucketDuration_ = value; } else { bucketDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ public Builder setBucketDuration( com.google.protobuf.Duration.Builder builderForValue) { if (bucketDurationBuilder_ == null) { bucketDuration_ = builderForValue.build(); } else { bucketDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ public Builder mergeBucketDuration(com.google.protobuf.Duration value) { if (bucketDurationBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && bucketDuration_ != null && bucketDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getBucketDurationBuilder().mergeFrom(value); } else { bucketDuration_ = value; } } else { bucketDurationBuilder_.mergeFrom(value); } if (bucketDuration_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ public Builder clearBucketDuration() { bitField0_ = (bitField0_ & ~0x00000008); bucketDuration_ = null; if (bucketDurationBuilder_ != null) { bucketDurationBuilder_.dispose(); bucketDurationBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ public com.google.protobuf.Duration.Builder getBucketDurationBuilder() { bitField0_ |= 0x00000008; onChanged(); return getBucketDurationFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ public com.google.protobuf.DurationOrBuilder getBucketDurationOrBuilder() { if (bucketDurationBuilder_ != null) { return bucketDurationBuilder_.getMessageOrBuilder(); } else { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } } /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getBucketDurationFieldBuilder() { if (bucketDurationBuilder_ == null) { bucketDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getBucketDuration(), getParentForChildren(), isClean()); bucketDuration_ = null; } return bucketDurationBuilder_; } private java.lang.Object filtersDescription_ = ""; /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return The filtersDescription. */ public java.lang.String getFiltersDescription() { java.lang.Object ref = filtersDescription_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filtersDescription_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return The bytes for filtersDescription. */ public com.google.protobuf.ByteString getFiltersDescriptionBytes() { java.lang.Object ref = filtersDescription_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); filtersDescription_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @param value The filtersDescription to set. * @return This builder for chaining. */ public Builder setFiltersDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } filtersDescription_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return This builder for chaining. */ public Builder clearFiltersDescription() { filtersDescription_ = getDefaultInstance().getFiltersDescription(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @param value The bytes for filtersDescription to set. * @return This builder for chaining. */ public Builder setFiltersDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); filtersDescription_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureGroupByIsMutable() { if (!groupBy_.isModifiable()) { groupBy_ = new com.google.protobuf.LazyStringArrayList(groupBy_); } bitField0_ |= 0x00000020; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return A list containing the groupBy. */ public com.google.protobuf.ProtocolStringList getGroupByList() { groupBy_.makeImmutable(); return groupBy_; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return The count of groupBy. */ public int getGroupByCount() { return groupBy_.size(); } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index of the element to return. * @return The groupBy at the given index. */ public java.lang.String getGroupBy(int index) { return groupBy_.get(index); } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index of the value to return. * @return The bytes of the groupBy at the given index. */ public com.google.protobuf.ByteString getGroupByBytes(int index) { return groupBy_.getByteString(index); } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index to set the value at. * @param value The groupBy to set. * @return This builder for chaining. */ public Builder setGroupBy( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureGroupByIsMutable(); groupBy_.set(index, value); bitField0_ |= 0x00000020; onChanged(); return this; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param value The groupBy to add. * @return This builder for chaining. */ public Builder addGroupBy( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureGroupByIsMutable(); groupBy_.add(value); bitField0_ |= 0x00000020; onChanged(); return this; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param values The groupBy to add. * @return This builder for chaining. */ public Builder addAllGroupBy( java.lang.Iterable<java.lang.String> values) { ensureGroupByIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, groupBy_); bitField0_ |= 0x00000020; onChanged(); return this; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return This builder for chaining. */ public Builder clearGroupBy() { groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000020);; onChanged(); return this; } /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param value The bytes of the groupBy to add. * @return This builder for chaining. */ public Builder addGroupByBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureGroupByIsMutable(); groupBy_.add(value); bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.protobuf.Duration maxRetention_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxRetentionBuilder_; /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> * @return Whether the maxRetention field is set. */ public boolean hasMaxRetention() { return ((bitField0_ & 0x00000040) != 0); } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> * @return The maxRetention. */ public com.google.protobuf.Duration getMaxRetention() { if (maxRetentionBuilder_ == null) { return maxRetention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRetention_; } else { return maxRetentionBuilder_.getMessage(); } } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ public Builder setMaxRetention(com.google.protobuf.Duration value) { if (maxRetentionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxRetention_ = value; } else { maxRetentionBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ public Builder setMaxRetention( com.google.protobuf.Duration.Builder builderForValue) { if (maxRetentionBuilder_ == null) { maxRetention_ = builderForValue.build(); } else { maxRetentionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ public Builder mergeMaxRetention(com.google.protobuf.Duration value) { if (maxRetentionBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && maxRetention_ != null && maxRetention_ != com.google.protobuf.Duration.getDefaultInstance()) { getMaxRetentionBuilder().mergeFrom(value); } else { maxRetention_ = value; } } else { maxRetentionBuilder_.mergeFrom(value); } if (maxRetention_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ public Builder clearMaxRetention() { bitField0_ = (bitField0_ & ~0x00000040); maxRetention_ = null; if (maxRetentionBuilder_ != null) { maxRetentionBuilder_.dispose(); maxRetentionBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ public com.google.protobuf.Duration.Builder getMaxRetentionBuilder() { bitField0_ |= 0x00000040; onChanged(); return getMaxRetentionFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ public com.google.protobuf.DurationOrBuilder getMaxRetentionOrBuilder() { if (maxRetentionBuilder_ != null) { return maxRetentionBuilder_.getMessageOrBuilder(); } else { return maxRetention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRetention_; } } /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getMaxRetentionFieldBuilder() { if (maxRetentionBuilder_ == null) { maxRetentionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getMaxRetention(), getParentForChildren(), isClean()); maxRetention_ = null; } return maxRetentionBuilder_; } private com.google.protobuf.Timestamp lowerBound_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lowerBoundBuilder_; /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> * @return Whether the lowerBound field is set. */ public boolean hasLowerBound() { return ((bitField0_ & 0x00000080) != 0); } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> * @return The lowerBound. */ public com.google.protobuf.Timestamp getLowerBound() { if (lowerBoundBuilder_ == null) { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } else { return lowerBoundBuilder_.getMessage(); } } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ public Builder setLowerBound(com.google.protobuf.Timestamp value) { if (lowerBoundBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lowerBound_ = value; } else { lowerBoundBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ public Builder setLowerBound( com.google.protobuf.Timestamp.Builder builderForValue) { if (lowerBoundBuilder_ == null) { lowerBound_ = builderForValue.build(); } else { lowerBoundBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ public Builder mergeLowerBound(com.google.protobuf.Timestamp value) { if (lowerBoundBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && lowerBound_ != null && lowerBound_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getLowerBoundBuilder().mergeFrom(value); } else { lowerBound_ = value; } } else { lowerBoundBuilder_.mergeFrom(value); } if (lowerBound_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ public Builder clearLowerBound() { bitField0_ = (bitField0_ & ~0x00000080); lowerBound_ = null; if (lowerBoundBuilder_ != null) { lowerBoundBuilder_.dispose(); lowerBoundBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ public com.google.protobuf.Timestamp.Builder getLowerBoundBuilder() { bitField0_ |= 0x00000080; onChanged(); return getLowerBoundFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ public com.google.protobuf.TimestampOrBuilder getLowerBoundOrBuilder() { if (lowerBoundBuilder_ != null) { return lowerBoundBuilder_.getMessageOrBuilder(); } else { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } } /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getLowerBoundFieldBuilder() { if (lowerBoundBuilder_ == null) { lowerBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getLowerBound(), getParentForChildren(), isClean()); lowerBound_ = null; } return lowerBoundBuilder_; } private com.google.protobuf.Timestamp upperBound_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> upperBoundBuilder_; /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> * @return Whether the upperBound field is set. */ public boolean hasUpperBound() { return ((bitField0_ & 0x00000100) != 0); } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> * @return The upperBound. */ public com.google.protobuf.Timestamp getUpperBound() { if (upperBoundBuilder_ == null) { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } else { return upperBoundBuilder_.getMessage(); } } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ public Builder setUpperBound(com.google.protobuf.Timestamp value) { if (upperBoundBuilder_ == null) { if (value == null) { throw new NullPointerException(); } upperBound_ = value; } else { upperBoundBuilder_.setMessage(value); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ public Builder setUpperBound( com.google.protobuf.Timestamp.Builder builderForValue) { if (upperBoundBuilder_ == null) { upperBound_ = builderForValue.build(); } else { upperBoundBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ public Builder mergeUpperBound(com.google.protobuf.Timestamp value) { if (upperBoundBuilder_ == null) { if (((bitField0_ & 0x00000100) != 0) && upperBound_ != null && upperBound_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpperBoundBuilder().mergeFrom(value); } else { upperBound_ = value; } } else { upperBoundBuilder_.mergeFrom(value); } if (upperBound_ != null) { bitField0_ |= 0x00000100; onChanged(); } return this; } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ public Builder clearUpperBound() { bitField0_ = (bitField0_ & ~0x00000100); upperBound_ = null; if (upperBoundBuilder_ != null) { upperBoundBuilder_.dispose(); upperBoundBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ public com.google.protobuf.Timestamp.Builder getUpperBoundBuilder() { bitField0_ |= 0x00000100; onChanged(); return getUpperBoundFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ public com.google.protobuf.TimestampOrBuilder getUpperBoundOrBuilder() { if (upperBoundBuilder_ != null) { return upperBoundBuilder_.getMessageOrBuilder(); } else { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } } /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpperBoundFieldBuilder() { if (upperBoundBuilder_ == null) { upperBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpperBound(), getParentForChildren(), isClean()); upperBound_ = null; } return upperBoundBuilder_; } @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:chalk.aggregate.v1.AggregateBackfill) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateBackfill) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateBackfill> PARSER = new com.google.protobuf.AbstractParser<AggregateBackfill>() { @java.lang.Override public AggregateBackfill parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateBackfill> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateBackfill> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillCostEstimate.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateBackfillCostEstimate} */ public final class AggregateBackfillCostEstimate extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateBackfillCostEstimate) AggregateBackfillCostEstimateOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateBackfillCostEstimate.newBuilder() to construct. private AggregateBackfillCostEstimate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateBackfillCostEstimate() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateBackfillCostEstimate(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder.class); } private int bitField0_; public static final int MAX_BUCKETS_FIELD_NUMBER = 1; private long maxBuckets_ = 0L; /** * <code>int64 max_buckets = 1 [json_name = "maxBuckets"];</code> * @return The maxBuckets. */ @java.lang.Override public long getMaxBuckets() { return maxBuckets_; } public static final int EXPECTED_BUCKETS_FIELD_NUMBER = 2; private long expectedBuckets_ = 0L; /** * <code>int64 expected_buckets = 2 [json_name = "expectedBuckets"];</code> * @return The expectedBuckets. */ @java.lang.Override public long getExpectedBuckets() { return expectedBuckets_; } public static final int EXPECTED_BYTES_FIELD_NUMBER = 3; private long expectedBytes_ = 0L; /** * <code>int64 expected_bytes = 3 [json_name = "expectedBytes"];</code> * @return The expectedBytes. */ @java.lang.Override public long getExpectedBytes() { return expectedBytes_; } public static final int EXPECTED_STORAGE_COST_FIELD_NUMBER = 4; private double expectedStorageCost_ = 0D; /** * <code>double expected_storage_cost = 4 [json_name = "expectedStorageCost"];</code> * @return The expectedStorageCost. */ @java.lang.Override public double getExpectedStorageCost() { return expectedStorageCost_; } public static final int EXPECTED_RUNTIME_FIELD_NUMBER = 5; private com.google.protobuf.Duration expectedRuntime_; /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> * @return Whether the expectedRuntime field is set. */ @java.lang.Override public boolean hasExpectedRuntime() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> * @return The expectedRuntime. */ @java.lang.Override public com.google.protobuf.Duration getExpectedRuntime() { return expectedRuntime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expectedRuntime_; } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getExpectedRuntimeOrBuilder() { return expectedRuntime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expectedRuntime_; } 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 (maxBuckets_ != 0L) { output.writeInt64(1, maxBuckets_); } if (expectedBuckets_ != 0L) { output.writeInt64(2, expectedBuckets_); } if (expectedBytes_ != 0L) { output.writeInt64(3, expectedBytes_); } if (java.lang.Double.doubleToRawLongBits(expectedStorageCost_) != 0) { output.writeDouble(4, expectedStorageCost_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getExpectedRuntime()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (maxBuckets_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, maxBuckets_); } if (expectedBuckets_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, expectedBuckets_); } if (expectedBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, expectedBytes_); } if (java.lang.Double.doubleToRawLongBits(expectedStorageCost_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(4, expectedStorageCost_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getExpectedRuntime()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate other = (ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate) obj; if (getMaxBuckets() != other.getMaxBuckets()) return false; if (getExpectedBuckets() != other.getExpectedBuckets()) return false; if (getExpectedBytes() != other.getExpectedBytes()) return false; if (java.lang.Double.doubleToLongBits(getExpectedStorageCost()) != java.lang.Double.doubleToLongBits( other.getExpectedStorageCost())) return false; if (hasExpectedRuntime() != other.hasExpectedRuntime()) return false; if (hasExpectedRuntime()) { if (!getExpectedRuntime() .equals(other.getExpectedRuntime())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MAX_BUCKETS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxBuckets()); hash = (37 * hash) + EXPECTED_BUCKETS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getExpectedBuckets()); hash = (37 * hash) + EXPECTED_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getExpectedBytes()); hash = (37 * hash) + EXPECTED_STORAGE_COST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getExpectedStorageCost())); if (hasExpectedRuntime()) { hash = (37 * hash) + EXPECTED_RUNTIME_FIELD_NUMBER; hash = (53 * hash) + getExpectedRuntime().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate 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(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate 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 chalk.aggregate.v1.AggregateBackfillCostEstimate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateBackfillCostEstimate) ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getExpectedRuntimeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; maxBuckets_ = 0L; expectedBuckets_ = 0L; expectedBytes_ = 0L; expectedStorageCost_ = 0D; expectedRuntime_ = null; if (expectedRuntimeBuilder_ != null) { expectedRuntimeBuilder_.dispose(); expectedRuntimeBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate build() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate result = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.maxBuckets_ = maxBuckets_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.expectedBuckets_ = expectedBuckets_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.expectedBytes_ = expectedBytes_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.expectedStorageCost_ = expectedStorageCost_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.expectedRuntime_ = expectedRuntimeBuilder_ == null ? expectedRuntime_ : expectedRuntimeBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance()) return this; if (other.getMaxBuckets() != 0L) { setMaxBuckets(other.getMaxBuckets()); } if (other.getExpectedBuckets() != 0L) { setExpectedBuckets(other.getExpectedBuckets()); } if (other.getExpectedBytes() != 0L) { setExpectedBytes(other.getExpectedBytes()); } if (other.getExpectedStorageCost() != 0D) { setExpectedStorageCost(other.getExpectedStorageCost()); } if (other.hasExpectedRuntime()) { mergeExpectedRuntime(other.getExpectedRuntime()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { maxBuckets_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { expectedBuckets_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { expectedBytes_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 33: { expectedStorageCost_ = input.readDouble(); bitField0_ |= 0x00000008; break; } // case 33 case 42: { input.readMessage( getExpectedRuntimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long maxBuckets_ ; /** * <code>int64 max_buckets = 1 [json_name = "maxBuckets"];</code> * @return The maxBuckets. */ @java.lang.Override public long getMaxBuckets() { return maxBuckets_; } /** * <code>int64 max_buckets = 1 [json_name = "maxBuckets"];</code> * @param value The maxBuckets to set. * @return This builder for chaining. */ public Builder setMaxBuckets(long value) { maxBuckets_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>int64 max_buckets = 1 [json_name = "maxBuckets"];</code> * @return This builder for chaining. */ public Builder clearMaxBuckets() { bitField0_ = (bitField0_ & ~0x00000001); maxBuckets_ = 0L; onChanged(); return this; } private long expectedBuckets_ ; /** * <code>int64 expected_buckets = 2 [json_name = "expectedBuckets"];</code> * @return The expectedBuckets. */ @java.lang.Override public long getExpectedBuckets() { return expectedBuckets_; } /** * <code>int64 expected_buckets = 2 [json_name = "expectedBuckets"];</code> * @param value The expectedBuckets to set. * @return This builder for chaining. */ public Builder setExpectedBuckets(long value) { expectedBuckets_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>int64 expected_buckets = 2 [json_name = "expectedBuckets"];</code> * @return This builder for chaining. */ public Builder clearExpectedBuckets() { bitField0_ = (bitField0_ & ~0x00000002); expectedBuckets_ = 0L; onChanged(); return this; } private long expectedBytes_ ; /** * <code>int64 expected_bytes = 3 [json_name = "expectedBytes"];</code> * @return The expectedBytes. */ @java.lang.Override public long getExpectedBytes() { return expectedBytes_; } /** * <code>int64 expected_bytes = 3 [json_name = "expectedBytes"];</code> * @param value The expectedBytes to set. * @return This builder for chaining. */ public Builder setExpectedBytes(long value) { expectedBytes_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>int64 expected_bytes = 3 [json_name = "expectedBytes"];</code> * @return This builder for chaining. */ public Builder clearExpectedBytes() { bitField0_ = (bitField0_ & ~0x00000004); expectedBytes_ = 0L; onChanged(); return this; } private double expectedStorageCost_ ; /** * <code>double expected_storage_cost = 4 [json_name = "expectedStorageCost"];</code> * @return The expectedStorageCost. */ @java.lang.Override public double getExpectedStorageCost() { return expectedStorageCost_; } /** * <code>double expected_storage_cost = 4 [json_name = "expectedStorageCost"];</code> * @param value The expectedStorageCost to set. * @return This builder for chaining. */ public Builder setExpectedStorageCost(double value) { expectedStorageCost_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>double expected_storage_cost = 4 [json_name = "expectedStorageCost"];</code> * @return This builder for chaining. */ public Builder clearExpectedStorageCost() { bitField0_ = (bitField0_ & ~0x00000008); expectedStorageCost_ = 0D; onChanged(); return this; } private com.google.protobuf.Duration expectedRuntime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> expectedRuntimeBuilder_; /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> * @return Whether the expectedRuntime field is set. */ public boolean hasExpectedRuntime() { return ((bitField0_ & 0x00000010) != 0); } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> * @return The expectedRuntime. */ public com.google.protobuf.Duration getExpectedRuntime() { if (expectedRuntimeBuilder_ == null) { return expectedRuntime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expectedRuntime_; } else { return expectedRuntimeBuilder_.getMessage(); } } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ public Builder setExpectedRuntime(com.google.protobuf.Duration value) { if (expectedRuntimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expectedRuntime_ = value; } else { expectedRuntimeBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ public Builder setExpectedRuntime( com.google.protobuf.Duration.Builder builderForValue) { if (expectedRuntimeBuilder_ == null) { expectedRuntime_ = builderForValue.build(); } else { expectedRuntimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ public Builder mergeExpectedRuntime(com.google.protobuf.Duration value) { if (expectedRuntimeBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && expectedRuntime_ != null && expectedRuntime_ != com.google.protobuf.Duration.getDefaultInstance()) { getExpectedRuntimeBuilder().mergeFrom(value); } else { expectedRuntime_ = value; } } else { expectedRuntimeBuilder_.mergeFrom(value); } if (expectedRuntime_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ public Builder clearExpectedRuntime() { bitField0_ = (bitField0_ & ~0x00000010); expectedRuntime_ = null; if (expectedRuntimeBuilder_ != null) { expectedRuntimeBuilder_.dispose(); expectedRuntimeBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ public com.google.protobuf.Duration.Builder getExpectedRuntimeBuilder() { bitField0_ |= 0x00000010; onChanged(); return getExpectedRuntimeFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ public com.google.protobuf.DurationOrBuilder getExpectedRuntimeOrBuilder() { if (expectedRuntimeBuilder_ != null) { return expectedRuntimeBuilder_.getMessageOrBuilder(); } else { return expectedRuntime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expectedRuntime_; } } /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getExpectedRuntimeFieldBuilder() { if (expectedRuntimeBuilder_ == null) { expectedRuntimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getExpectedRuntime(), getParentForChildren(), isClean()); expectedRuntime_ = null; } return expectedRuntimeBuilder_; } @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:chalk.aggregate.v1.AggregateBackfillCostEstimate) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateBackfillCostEstimate) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateBackfillCostEstimate> PARSER = new com.google.protobuf.AbstractParser<AggregateBackfillCostEstimate>() { @java.lang.Override public AggregateBackfillCostEstimate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateBackfillCostEstimate> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateBackfillCostEstimate> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillCostEstimateOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateBackfillCostEstimateOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateBackfillCostEstimate) com.google.protobuf.MessageOrBuilder { /** * <code>int64 max_buckets = 1 [json_name = "maxBuckets"];</code> * @return The maxBuckets. */ long getMaxBuckets(); /** * <code>int64 expected_buckets = 2 [json_name = "expectedBuckets"];</code> * @return The expectedBuckets. */ long getExpectedBuckets(); /** * <code>int64 expected_bytes = 3 [json_name = "expectedBytes"];</code> * @return The expectedBytes. */ long getExpectedBytes(); /** * <code>double expected_storage_cost = 4 [json_name = "expectedStorageCost"];</code> * @return The expectedStorageCost. */ double getExpectedStorageCost(); /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> * @return Whether the expectedRuntime field is set. */ boolean hasExpectedRuntime(); /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> * @return The expectedRuntime. */ com.google.protobuf.Duration getExpectedRuntime(); /** * <code>.google.protobuf.Duration expected_runtime = 5 [json_name = "expectedRuntime"];</code> */ com.google.protobuf.DurationOrBuilder getExpectedRuntimeOrBuilder(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillJob.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateBackfillJob} */ public final class AggregateBackfillJob extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateBackfillJob) AggregateBackfillJobOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateBackfillJob.newBuilder() to construct. private AggregateBackfillJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateBackfillJob() { id_ = ""; environmentId_ = ""; resolver_ = ""; features_ = com.google.protobuf.LazyStringArrayList.emptyList(); agentId_ = ""; deploymentId_ = ""; resolvers_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateBackfillJob(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillJob_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillJob_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder.class); } private int bitField0_; public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * <code>string id = 1 [json_name = "id"];</code> * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * <code>string id = 1 [json_name = "id"];</code> * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ENVIRONMENT_ID_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object environmentId_ = ""; /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return The environmentId. */ @java.lang.Override public java.lang.String getEnvironmentId() { java.lang.Object ref = environmentId_; 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(); environmentId_ = s; return s; } } /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return The bytes for environmentId. */ @java.lang.Override public com.google.protobuf.ByteString getEnvironmentIdBytes() { java.lang.Object ref = environmentId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); environmentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOLVER_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object resolver_ = ""; /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return Whether the resolver field is set. */ @java.lang.Override public boolean hasResolver() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return The resolver. */ @java.lang.Override public java.lang.String getResolver() { java.lang.Object ref = resolver_; 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(); resolver_ = s; return s; } } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return The bytes for resolver. */ @java.lang.Override public com.google.protobuf.ByteString getResolverBytes() { java.lang.Object ref = resolver_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resolver_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FEATURES_FIELD_NUMBER = 4; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList features_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return A list containing the features. */ public com.google.protobuf.ProtocolStringList getFeaturesList() { return features_; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return The count of features. */ public int getFeaturesCount() { return features_.size(); } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index of the element to return. * @return The features at the given index. */ public java.lang.String getFeatures(int index) { return features_.get(index); } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index of the value to return. * @return The bytes of the features at the given index. */ public com.google.protobuf.ByteString getFeaturesBytes(int index) { return features_.getByteString(index); } public static final int AGENT_ID_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object agentId_ = ""; /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return Whether the agentId field is set. */ @java.lang.Override public boolean hasAgentId() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return The agentId. */ @java.lang.Override public java.lang.String getAgentId() { java.lang.Object ref = agentId_; 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(); agentId_ = s; return s; } } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return The bytes for agentId. */ @java.lang.Override public com.google.protobuf.ByteString getAgentIdBytes() { java.lang.Object ref = agentId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); agentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEPLOYMENT_ID_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object deploymentId_ = ""; /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return Whether the deploymentId field is set. */ @java.lang.Override public boolean hasDeploymentId() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return The deploymentId. */ @java.lang.Override public java.lang.String getDeploymentId() { java.lang.Object ref = deploymentId_; 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(); deploymentId_ = s; return s; } } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return The bytes for deploymentId. */ @java.lang.Override public com.google.protobuf.ByteString getDeploymentIdBytes() { java.lang.Object ref = deploymentId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deploymentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATED_AT_FIELD_NUMBER = 7; private com.google.protobuf.Timestamp createdAt_; /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> * @return Whether the createdAt field is set. */ @java.lang.Override public boolean hasCreatedAt() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> * @return The createdAt. */ @java.lang.Override public com.google.protobuf.Timestamp getCreatedAt() { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } public static final int UPDATED_AT_FIELD_NUMBER = 8; private com.google.protobuf.Timestamp updatedAt_; /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> * @return Whether the updatedAt field is set. */ @java.lang.Override public boolean hasUpdatedAt() { return ((bitField0_ & 0x00000010) != 0); } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> * @return The updatedAt. */ @java.lang.Override public com.google.protobuf.Timestamp getUpdatedAt() { return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() { return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; } public static final int RESOLVERS_FIELD_NUMBER = 9; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList resolvers_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return A list containing the resolvers. */ public com.google.protobuf.ProtocolStringList getResolversList() { return resolvers_; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return The count of resolvers. */ public int getResolversCount() { return resolvers_.size(); } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index of the element to return. * @return The resolvers at the given index. */ public java.lang.String getResolvers(int index) { return resolvers_.get(index); } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index of the value to return. * @return The bytes of the resolvers at the given index. */ public com.google.protobuf.ByteString getResolversBytes(int index) { return resolvers_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environmentId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environmentId_); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resolver_); } for (int i = 0; i < features_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, features_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentId_); } if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, deploymentId_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(7, getCreatedAt()); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(8, getUpdatedAt()); } for (int i = 0; i < resolvers_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, resolvers_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environmentId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environmentId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resolver_); } { int dataSize = 0; for (int i = 0; i < features_.size(); i++) { dataSize += computeStringSizeNoTag(features_.getRaw(i)); } size += dataSize; size += 1 * getFeaturesList().size(); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentId_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, deploymentId_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getCreatedAt()); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getUpdatedAt()); } { int dataSize = 0; for (int i = 0; i < resolvers_.size(); i++) { dataSize += computeStringSizeNoTag(resolvers_.getRaw(i)); } size += dataSize; size += 1 * getResolversList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob other = (ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob) obj; if (!getId() .equals(other.getId())) return false; if (!getEnvironmentId() .equals(other.getEnvironmentId())) return false; if (hasResolver() != other.hasResolver()) return false; if (hasResolver()) { if (!getResolver() .equals(other.getResolver())) return false; } if (!getFeaturesList() .equals(other.getFeaturesList())) return false; if (hasAgentId() != other.hasAgentId()) return false; if (hasAgentId()) { if (!getAgentId() .equals(other.getAgentId())) return false; } if (hasDeploymentId() != other.hasDeploymentId()) return false; if (hasDeploymentId()) { if (!getDeploymentId() .equals(other.getDeploymentId())) return false; } if (hasCreatedAt() != other.hasCreatedAt()) return false; if (hasCreatedAt()) { if (!getCreatedAt() .equals(other.getCreatedAt())) return false; } if (hasUpdatedAt() != other.hasUpdatedAt()) return false; if (hasUpdatedAt()) { if (!getUpdatedAt() .equals(other.getUpdatedAt())) return false; } if (!getResolversList() .equals(other.getResolversList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + ENVIRONMENT_ID_FIELD_NUMBER; hash = (53 * hash) + getEnvironmentId().hashCode(); if (hasResolver()) { hash = (37 * hash) + RESOLVER_FIELD_NUMBER; hash = (53 * hash) + getResolver().hashCode(); } if (getFeaturesCount() > 0) { hash = (37 * hash) + FEATURES_FIELD_NUMBER; hash = (53 * hash) + getFeaturesList().hashCode(); } if (hasAgentId()) { hash = (37 * hash) + AGENT_ID_FIELD_NUMBER; hash = (53 * hash) + getAgentId().hashCode(); } if (hasDeploymentId()) { hash = (37 * hash) + DEPLOYMENT_ID_FIELD_NUMBER; hash = (53 * hash) + getDeploymentId().hashCode(); } if (hasCreatedAt()) { hash = (37 * hash) + CREATED_AT_FIELD_NUMBER; hash = (53 * hash) + getCreatedAt().hashCode(); } if (hasUpdatedAt()) { hash = (37 * hash) + UPDATED_AT_FIELD_NUMBER; hash = (53 * hash) + getUpdatedAt().hashCode(); } if (getResolversCount() > 0) { hash = (37 * hash) + RESOLVERS_FIELD_NUMBER; hash = (53 * hash) + getResolversList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob 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(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob 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 chalk.aggregate.v1.AggregateBackfillJob} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateBackfillJob) ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillJob_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillJob_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getCreatedAtFieldBuilder(); getUpdatedAtFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; environmentId_ = ""; resolver_ = ""; features_ = com.google.protobuf.LazyStringArrayList.emptyList(); agentId_ = ""; deploymentId_ = ""; createdAt_ = null; if (createdAtBuilder_ != null) { createdAtBuilder_.dispose(); createdAtBuilder_ = null; } updatedAt_ = null; if (updatedAtBuilder_ != null) { updatedAtBuilder_.dispose(); updatedAtBuilder_ = null; } resolvers_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillJob_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob build() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob result = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.environmentId_ = environmentId_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.resolver_ = resolver_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { features_.makeImmutable(); result.features_ = features_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.agentId_ = agentId_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000020) != 0)) { result.deploymentId_ = deploymentId_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000040) != 0)) { result.createdAt_ = createdAtBuilder_ == null ? createdAt_ : createdAtBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000080) != 0)) { result.updatedAt_ = updatedAtBuilder_ == null ? updatedAt_ : updatedAtBuilder_.build(); to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000100) != 0)) { resolvers_.makeImmutable(); result.resolvers_ = resolvers_; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getEnvironmentId().isEmpty()) { environmentId_ = other.environmentId_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasResolver()) { resolver_ = other.resolver_; bitField0_ |= 0x00000004; onChanged(); } if (!other.features_.isEmpty()) { if (features_.isEmpty()) { features_ = other.features_; bitField0_ |= 0x00000008; } else { ensureFeaturesIsMutable(); features_.addAll(other.features_); } onChanged(); } if (other.hasAgentId()) { agentId_ = other.agentId_; bitField0_ |= 0x00000010; onChanged(); } if (other.hasDeploymentId()) { deploymentId_ = other.deploymentId_; bitField0_ |= 0x00000020; onChanged(); } if (other.hasCreatedAt()) { mergeCreatedAt(other.getCreatedAt()); } if (other.hasUpdatedAt()) { mergeUpdatedAt(other.getUpdatedAt()); } if (!other.resolvers_.isEmpty()) { if (resolvers_.isEmpty()) { resolvers_ = other.resolvers_; bitField0_ |= 0x00000100; } else { ensureResolversIsMutable(); resolvers_.addAll(other.resolvers_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { environmentId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { resolver_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { java.lang.String s = input.readStringRequireUtf8(); ensureFeaturesIsMutable(); features_.add(s); break; } // case 34 case 42: { agentId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { deploymentId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage( getCreatedAtFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 case 66: { input.readMessage( getUpdatedAtFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 66 case 74: { java.lang.String s = input.readStringRequireUtf8(); ensureResolversIsMutable(); resolvers_.add(s); break; } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object id_ = ""; /** * <code>string id = 1 [json_name = "id"];</code> * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string id = 1 [json_name = "id"];</code> * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string id = 1 [json_name = "id"];</code> * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>string id = 1 [json_name = "id"];</code> * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <code>string id = 1 [json_name = "id"];</code> * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object environmentId_ = ""; /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return The environmentId. */ public java.lang.String getEnvironmentId() { java.lang.Object ref = environmentId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); environmentId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return The bytes for environmentId. */ public com.google.protobuf.ByteString getEnvironmentIdBytes() { java.lang.Object ref = environmentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); environmentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @param value The environmentId to set. * @return This builder for chaining. */ public Builder setEnvironmentId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } environmentId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return This builder for chaining. */ public Builder clearEnvironmentId() { environmentId_ = getDefaultInstance().getEnvironmentId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @param value The bytes for environmentId to set. * @return This builder for chaining. */ public Builder setEnvironmentIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); environmentId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object resolver_ = ""; /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return Whether the resolver field is set. */ public boolean hasResolver() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return The resolver. */ public java.lang.String getResolver() { java.lang.Object ref = resolver_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resolver_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return The bytes for resolver. */ public com.google.protobuf.ByteString getResolverBytes() { java.lang.Object ref = resolver_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resolver_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @param value The resolver to set. * @return This builder for chaining. */ public Builder setResolver( java.lang.String value) { if (value == null) { throw new NullPointerException(); } resolver_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return This builder for chaining. */ public Builder clearResolver() { resolver_ = getDefaultInstance().getResolver(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @param value The bytes for resolver to set. * @return This builder for chaining. */ public Builder setResolverBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resolver_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList features_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureFeaturesIsMutable() { if (!features_.isModifiable()) { features_ = new com.google.protobuf.LazyStringArrayList(features_); } bitField0_ |= 0x00000008; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return A list containing the features. */ public com.google.protobuf.ProtocolStringList getFeaturesList() { features_.makeImmutable(); return features_; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return The count of features. */ public int getFeaturesCount() { return features_.size(); } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index of the element to return. * @return The features at the given index. */ public java.lang.String getFeatures(int index) { return features_.get(index); } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index of the value to return. * @return The bytes of the features at the given index. */ public com.google.protobuf.ByteString getFeaturesBytes(int index) { return features_.getByteString(index); } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index to set the value at. * @param value The features to set. * @return This builder for chaining. */ public Builder setFeatures( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureFeaturesIsMutable(); features_.set(index, value); bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param value The features to add. * @return This builder for chaining. */ public Builder addFeatures( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureFeaturesIsMutable(); features_.add(value); bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param values The features to add. * @return This builder for chaining. */ public Builder addAllFeatures( java.lang.Iterable<java.lang.String> values) { ensureFeaturesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, features_); bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return This builder for chaining. */ public Builder clearFeatures() { features_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000008);; onChanged(); return this; } /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param value The bytes of the features to add. * @return This builder for chaining. */ public Builder addFeaturesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureFeaturesIsMutable(); features_.add(value); bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object agentId_ = ""; /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return Whether the agentId field is set. */ public boolean hasAgentId() { return ((bitField0_ & 0x00000010) != 0); } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return The agentId. */ public java.lang.String getAgentId() { java.lang.Object ref = agentId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); agentId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return The bytes for agentId. */ public com.google.protobuf.ByteString getAgentIdBytes() { java.lang.Object ref = agentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); agentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @param value The agentId to set. * @return This builder for chaining. */ public Builder setAgentId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } agentId_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return This builder for chaining. */ public Builder clearAgentId() { agentId_ = getDefaultInstance().getAgentId(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @param value The bytes for agentId to set. * @return This builder for chaining. */ public Builder setAgentIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); agentId_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object deploymentId_ = ""; /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return Whether the deploymentId field is set. */ public boolean hasDeploymentId() { return ((bitField0_ & 0x00000020) != 0); } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return The deploymentId. */ public java.lang.String getDeploymentId() { java.lang.Object ref = deploymentId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deploymentId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return The bytes for deploymentId. */ public com.google.protobuf.ByteString getDeploymentIdBytes() { java.lang.Object ref = deploymentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deploymentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @param value The deploymentId to set. * @return This builder for chaining. */ public Builder setDeploymentId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } deploymentId_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return This builder for chaining. */ public Builder clearDeploymentId() { deploymentId_ = getDefaultInstance().getDeploymentId(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @param value The bytes for deploymentId to set. * @return This builder for chaining. */ public Builder setDeploymentIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); deploymentId_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.protobuf.Timestamp createdAt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_; /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> * @return Whether the createdAt field is set. */ public boolean hasCreatedAt() { return ((bitField0_ & 0x00000040) != 0); } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> * @return The createdAt. */ public com.google.protobuf.Timestamp getCreatedAt() { if (createdAtBuilder_ == null) { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } else { return createdAtBuilder_.getMessage(); } } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ public Builder setCreatedAt(com.google.protobuf.Timestamp value) { if (createdAtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createdAt_ = value; } else { createdAtBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ public Builder setCreatedAt( com.google.protobuf.Timestamp.Builder builderForValue) { if (createdAtBuilder_ == null) { createdAt_ = builderForValue.build(); } else { createdAtBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) { if (createdAtBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && createdAt_ != null && createdAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreatedAtBuilder().mergeFrom(value); } else { createdAt_ = value; } } else { createdAtBuilder_.mergeFrom(value); } if (createdAt_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ public Builder clearCreatedAt() { bitField0_ = (bitField0_ & ~0x00000040); createdAt_ = null; if (createdAtBuilder_ != null) { createdAtBuilder_.dispose(); createdAtBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() { bitField0_ |= 0x00000040; onChanged(); return getCreatedAtFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { if (createdAtBuilder_ != null) { return createdAtBuilder_.getMessageOrBuilder(); } else { return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; } } /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreatedAtFieldBuilder() { if (createdAtBuilder_ == null) { createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreatedAt(), getParentForChildren(), isClean()); createdAt_ = null; } return createdAtBuilder_; } private com.google.protobuf.Timestamp updatedAt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updatedAtBuilder_; /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> * @return Whether the updatedAt field is set. */ public boolean hasUpdatedAt() { return ((bitField0_ & 0x00000080) != 0); } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> * @return The updatedAt. */ public com.google.protobuf.Timestamp getUpdatedAt() { if (updatedAtBuilder_ == null) { return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; } else { return updatedAtBuilder_.getMessage(); } } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ public Builder setUpdatedAt(com.google.protobuf.Timestamp value) { if (updatedAtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updatedAt_ = value; } else { updatedAtBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ public Builder setUpdatedAt( com.google.protobuf.Timestamp.Builder builderForValue) { if (updatedAtBuilder_ == null) { updatedAt_ = builderForValue.build(); } else { updatedAtBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ public Builder mergeUpdatedAt(com.google.protobuf.Timestamp value) { if (updatedAtBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && updatedAt_ != null && updatedAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdatedAtBuilder().mergeFrom(value); } else { updatedAt_ = value; } } else { updatedAtBuilder_.mergeFrom(value); } if (updatedAt_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ public Builder clearUpdatedAt() { bitField0_ = (bitField0_ & ~0x00000080); updatedAt_ = null; if (updatedAtBuilder_ != null) { updatedAtBuilder_.dispose(); updatedAtBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ public com.google.protobuf.Timestamp.Builder getUpdatedAtBuilder() { bitField0_ |= 0x00000080; onChanged(); return getUpdatedAtFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() { if (updatedAtBuilder_ != null) { return updatedAtBuilder_.getMessageOrBuilder(); } else { return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; } } /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpdatedAtFieldBuilder() { if (updatedAtBuilder_ == null) { updatedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpdatedAt(), getParentForChildren(), isClean()); updatedAt_ = null; } return updatedAtBuilder_; } private com.google.protobuf.LazyStringArrayList resolvers_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureResolversIsMutable() { if (!resolvers_.isModifiable()) { resolvers_ = new com.google.protobuf.LazyStringArrayList(resolvers_); } bitField0_ |= 0x00000100; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return A list containing the resolvers. */ public com.google.protobuf.ProtocolStringList getResolversList() { resolvers_.makeImmutable(); return resolvers_; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return The count of resolvers. */ public int getResolversCount() { return resolvers_.size(); } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index of the element to return. * @return The resolvers at the given index. */ public java.lang.String getResolvers(int index) { return resolvers_.get(index); } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index of the value to return. * @return The bytes of the resolvers at the given index. */ public com.google.protobuf.ByteString getResolversBytes(int index) { return resolvers_.getByteString(index); } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index to set the value at. * @param value The resolvers to set. * @return This builder for chaining. */ public Builder setResolvers( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureResolversIsMutable(); resolvers_.set(index, value); bitField0_ |= 0x00000100; onChanged(); return this; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param value The resolvers to add. * @return This builder for chaining. */ public Builder addResolvers( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureResolversIsMutable(); resolvers_.add(value); bitField0_ |= 0x00000100; onChanged(); return this; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param values The resolvers to add. * @return This builder for chaining. */ public Builder addAllResolvers( java.lang.Iterable<java.lang.String> values) { ensureResolversIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, resolvers_); bitField0_ |= 0x00000100; onChanged(); return this; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return This builder for chaining. */ public Builder clearResolvers() { resolvers_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000100);; onChanged(); return this; } /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param value The bytes of the resolvers to add. * @return This builder for chaining. */ public Builder addResolversBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureResolversIsMutable(); resolvers_.add(value); bitField0_ |= 0x00000100; 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:chalk.aggregate.v1.AggregateBackfillJob) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateBackfillJob) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateBackfillJob> PARSER = new com.google.protobuf.AbstractParser<AggregateBackfillJob>() { @java.lang.Override public AggregateBackfillJob parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateBackfillJob> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateBackfillJob> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillJobOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateBackfillJobOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateBackfillJob) com.google.protobuf.MessageOrBuilder { /** * <code>string id = 1 [json_name = "id"];</code> * @return The id. */ java.lang.String getId(); /** * <code>string id = 1 [json_name = "id"];</code> * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return The environmentId. */ java.lang.String getEnvironmentId(); /** * <code>string environment_id = 2 [json_name = "environmentId"];</code> * @return The bytes for environmentId. */ com.google.protobuf.ByteString getEnvironmentIdBytes(); /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return Whether the resolver field is set. */ boolean hasResolver(); /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return The resolver. */ java.lang.String getResolver(); /** * <code>optional string resolver = 3 [json_name = "resolver"];</code> * @return The bytes for resolver. */ com.google.protobuf.ByteString getResolverBytes(); /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return A list containing the features. */ java.util.List<java.lang.String> getFeaturesList(); /** * <code>repeated string features = 4 [json_name = "features"];</code> * @return The count of features. */ int getFeaturesCount(); /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index of the element to return. * @return The features at the given index. */ java.lang.String getFeatures(int index); /** * <code>repeated string features = 4 [json_name = "features"];</code> * @param index The index of the value to return. * @return The bytes of the features at the given index. */ com.google.protobuf.ByteString getFeaturesBytes(int index); /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return Whether the agentId field is set. */ boolean hasAgentId(); /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return The agentId. */ java.lang.String getAgentId(); /** * <code>optional string agent_id = 5 [json_name = "agentId"];</code> * @return The bytes for agentId. */ com.google.protobuf.ByteString getAgentIdBytes(); /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return Whether the deploymentId field is set. */ boolean hasDeploymentId(); /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return The deploymentId. */ java.lang.String getDeploymentId(); /** * <code>optional string deployment_id = 6 [json_name = "deploymentId"];</code> * @return The bytes for deploymentId. */ com.google.protobuf.ByteString getDeploymentIdBytes(); /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> * @return Whether the createdAt field is set. */ boolean hasCreatedAt(); /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> * @return The createdAt. */ com.google.protobuf.Timestamp getCreatedAt(); /** * <code>.google.protobuf.Timestamp created_at = 7 [json_name = "createdAt"];</code> */ com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder(); /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> * @return Whether the updatedAt field is set. */ boolean hasUpdatedAt(); /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> * @return The updatedAt. */ com.google.protobuf.Timestamp getUpdatedAt(); /** * <code>.google.protobuf.Timestamp updated_at = 8 [json_name = "updatedAt"];</code> */ com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder(); /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return A list containing the resolvers. */ java.util.List<java.lang.String> getResolversList(); /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @return The count of resolvers. */ int getResolversCount(); /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index of the element to return. * @return The resolvers at the given index. */ java.lang.String getResolvers(int index); /** * <code>repeated string resolvers = 9 [json_name = "resolvers"];</code> * @param index The index of the value to return. * @return The bytes of the resolvers at the given index. */ com.google.protobuf.ByteString getResolversBytes(int index); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateBackfillOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateBackfill) com.google.protobuf.MessageOrBuilder { /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> getSeriesList(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getSeries(int index); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ int getSeriesCount(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesOrBuilderList(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder getSeriesOrBuilder( int index); /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return The resolver. */ java.lang.String getResolver(); /** * <code>string resolver = 2 [json_name = "resolver"];</code> * @return The bytes for resolver. */ com.google.protobuf.ByteString getResolverBytes(); /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return The datetimeFeature. */ java.lang.String getDatetimeFeature(); /** * <code>string datetime_feature = 3 [json_name = "datetimeFeature"];</code> * @return The bytes for datetimeFeature. */ com.google.protobuf.ByteString getDatetimeFeatureBytes(); /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> * @return Whether the bucketDuration field is set. */ boolean hasBucketDuration(); /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> * @return The bucketDuration. */ com.google.protobuf.Duration getBucketDuration(); /** * <code>.google.protobuf.Duration bucket_duration = 4 [json_name = "bucketDuration"];</code> */ com.google.protobuf.DurationOrBuilder getBucketDurationOrBuilder(); /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return The filtersDescription. */ java.lang.String getFiltersDescription(); /** * <code>string filters_description = 5 [json_name = "filtersDescription"];</code> * @return The bytes for filtersDescription. */ com.google.protobuf.ByteString getFiltersDescriptionBytes(); /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return A list containing the groupBy. */ java.util.List<java.lang.String> getGroupByList(); /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @return The count of groupBy. */ int getGroupByCount(); /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index of the element to return. * @return The groupBy at the given index. */ java.lang.String getGroupBy(int index); /** * <code>repeated string group_by = 6 [json_name = "groupBy"];</code> * @param index The index of the value to return. * @return The bytes of the groupBy at the given index. */ com.google.protobuf.ByteString getGroupByBytes(int index); /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> * @return Whether the maxRetention field is set. */ boolean hasMaxRetention(); /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> * @return The maxRetention. */ com.google.protobuf.Duration getMaxRetention(); /** * <code>.google.protobuf.Duration max_retention = 7 [json_name = "maxRetention"];</code> */ com.google.protobuf.DurationOrBuilder getMaxRetentionOrBuilder(); /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> * @return Whether the lowerBound field is set. */ boolean hasLowerBound(); /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> * @return The lowerBound. */ com.google.protobuf.Timestamp getLowerBound(); /** * <code>.google.protobuf.Timestamp lower_bound = 8 [json_name = "lowerBound"];</code> */ com.google.protobuf.TimestampOrBuilder getLowerBoundOrBuilder(); /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> * @return Whether the upperBound field is set. */ boolean hasUpperBound(); /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> * @return The upperBound. */ com.google.protobuf.Timestamp getUpperBound(); /** * <code>.google.protobuf.Timestamp upper_bound = 9 [json_name = "upperBound"];</code> */ com.google.protobuf.TimestampOrBuilder getUpperBoundOrBuilder(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillUserParams.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateBackfillUserParams} */ public final class AggregateBackfillUserParams extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateBackfillUserParams) AggregateBackfillUserParamsOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateBackfillUserParams.newBuilder() to construct. private AggregateBackfillUserParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateBackfillUserParams() { features_ = com.google.protobuf.LazyStringArrayList.emptyList(); resolver_ = ""; timestampColumnName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateBackfillUserParams(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder.class); } private int bitField0_; public static final int FEATURES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList features_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return A list containing the features. */ public com.google.protobuf.ProtocolStringList getFeaturesList() { return features_; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return The count of features. */ public int getFeaturesCount() { return features_.size(); } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index of the element to return. * @return The features at the given index. */ public java.lang.String getFeatures(int index) { return features_.get(index); } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index of the value to return. * @return The bytes of the features at the given index. */ public com.google.protobuf.ByteString getFeaturesBytes(int index) { return features_.getByteString(index); } public static final int RESOLVER_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object resolver_ = ""; /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return Whether the resolver field is set. */ @java.lang.Override public boolean hasResolver() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return The resolver. */ @java.lang.Override public java.lang.String getResolver() { java.lang.Object ref = resolver_; 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(); resolver_ = s; return s; } } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return The bytes for resolver. */ @java.lang.Override public com.google.protobuf.ByteString getResolverBytes() { java.lang.Object ref = resolver_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resolver_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TIMESTAMP_COLUMN_NAME_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object timestampColumnName_ = ""; /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return Whether the timestampColumnName field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasTimestampColumnName() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return The timestampColumnName. */ @java.lang.Override @java.lang.Deprecated public java.lang.String getTimestampColumnName() { java.lang.Object ref = timestampColumnName_; 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(); timestampColumnName_ = s; return s; } } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return The bytes for timestampColumnName. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.ByteString getTimestampColumnNameBytes() { java.lang.Object ref = timestampColumnName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); timestampColumnName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOWER_BOUND_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp lowerBound_; /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> * @return Whether the lowerBound field is set. */ @java.lang.Override public boolean hasLowerBound() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> * @return The lowerBound. */ @java.lang.Override public com.google.protobuf.Timestamp getLowerBound() { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLowerBoundOrBuilder() { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } public static final int UPPER_BOUND_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp upperBound_; /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> * @return Whether the upperBound field is set. */ @java.lang.Override public boolean hasUpperBound() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> * @return The upperBound. */ @java.lang.Override public com.google.protobuf.Timestamp getUpperBound() { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpperBoundOrBuilder() { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } public static final int EXACT_FIELD_NUMBER = 6; private boolean exact_ = false; /** * <code>bool exact = 6 [json_name = "exact"];</code> * @return The exact. */ @java.lang.Override public boolean getExact() { return exact_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < features_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, features_.getRaw(i)); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resolver_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, timestampColumnName_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getLowerBound()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(5, getUpperBound()); } if (exact_ != false) { output.writeBool(6, exact_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < features_.size(); i++) { dataSize += computeStringSizeNoTag(features_.getRaw(i)); } size += dataSize; size += 1 * getFeaturesList().size(); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resolver_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, timestampColumnName_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getLowerBound()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getUpperBound()); } if (exact_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, exact_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams other = (ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams) obj; if (!getFeaturesList() .equals(other.getFeaturesList())) return false; if (hasResolver() != other.hasResolver()) return false; if (hasResolver()) { if (!getResolver() .equals(other.getResolver())) return false; } if (hasTimestampColumnName() != other.hasTimestampColumnName()) return false; if (hasTimestampColumnName()) { if (!getTimestampColumnName() .equals(other.getTimestampColumnName())) return false; } if (hasLowerBound() != other.hasLowerBound()) return false; if (hasLowerBound()) { if (!getLowerBound() .equals(other.getLowerBound())) return false; } if (hasUpperBound() != other.hasUpperBound()) return false; if (hasUpperBound()) { if (!getUpperBound() .equals(other.getUpperBound())) return false; } if (getExact() != other.getExact()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getFeaturesCount() > 0) { hash = (37 * hash) + FEATURES_FIELD_NUMBER; hash = (53 * hash) + getFeaturesList().hashCode(); } if (hasResolver()) { hash = (37 * hash) + RESOLVER_FIELD_NUMBER; hash = (53 * hash) + getResolver().hashCode(); } if (hasTimestampColumnName()) { hash = (37 * hash) + TIMESTAMP_COLUMN_NAME_FIELD_NUMBER; hash = (53 * hash) + getTimestampColumnName().hashCode(); } if (hasLowerBound()) { hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; hash = (53 * hash) + getLowerBound().hashCode(); } if (hasUpperBound()) { hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; hash = (53 * hash) + getUpperBound().hashCode(); } hash = (37 * hash) + EXACT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getExact()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams 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(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams 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 chalk.aggregate.v1.AggregateBackfillUserParams} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateBackfillUserParams) ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getLowerBoundFieldBuilder(); getUpperBoundFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; features_ = com.google.protobuf.LazyStringArrayList.emptyList(); resolver_ = ""; timestampColumnName_ = ""; lowerBound_ = null; if (lowerBoundBuilder_ != null) { lowerBoundBuilder_.dispose(); lowerBoundBuilder_ = null; } upperBound_ = null; if (upperBoundBuilder_ != null) { upperBoundBuilder_.dispose(); upperBoundBuilder_ = null; } exact_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams build() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams result = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { features_.makeImmutable(); result.features_ = features_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.resolver_ = resolver_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.timestampColumnName_ = timestampColumnName_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.lowerBound_ = lowerBoundBuilder_ == null ? lowerBound_ : lowerBoundBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { result.upperBound_ = upperBoundBuilder_ == null ? upperBound_ : upperBoundBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { result.exact_ = exact_; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance()) return this; if (!other.features_.isEmpty()) { if (features_.isEmpty()) { features_ = other.features_; bitField0_ |= 0x00000001; } else { ensureFeaturesIsMutable(); features_.addAll(other.features_); } onChanged(); } if (other.hasResolver()) { resolver_ = other.resolver_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasTimestampColumnName()) { timestampColumnName_ = other.timestampColumnName_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasLowerBound()) { mergeLowerBound(other.getLowerBound()); } if (other.hasUpperBound()) { mergeUpperBound(other.getUpperBound()); } if (other.getExact() != false) { setExact(other.getExact()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); ensureFeaturesIsMutable(); features_.add(s); break; } // case 10 case 18: { resolver_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { timestampColumnName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getLowerBoundFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( getUpperBoundFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 48: { exact_ = input.readBool(); bitField0_ |= 0x00000020; break; } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.LazyStringArrayList features_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureFeaturesIsMutable() { if (!features_.isModifiable()) { features_ = new com.google.protobuf.LazyStringArrayList(features_); } bitField0_ |= 0x00000001; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return A list containing the features. */ public com.google.protobuf.ProtocolStringList getFeaturesList() { features_.makeImmutable(); return features_; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return The count of features. */ public int getFeaturesCount() { return features_.size(); } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index of the element to return. * @return The features at the given index. */ public java.lang.String getFeatures(int index) { return features_.get(index); } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index of the value to return. * @return The bytes of the features at the given index. */ public com.google.protobuf.ByteString getFeaturesBytes(int index) { return features_.getByteString(index); } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index to set the value at. * @param value The features to set. * @return This builder for chaining. */ public Builder setFeatures( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureFeaturesIsMutable(); features_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param value The features to add. * @return This builder for chaining. */ public Builder addFeatures( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureFeaturesIsMutable(); features_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param values The features to add. * @return This builder for chaining. */ public Builder addAllFeatures( java.lang.Iterable<java.lang.String> values) { ensureFeaturesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, features_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return This builder for chaining. */ public Builder clearFeatures() { features_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001);; onChanged(); return this; } /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param value The bytes of the features to add. * @return This builder for chaining. */ public Builder addFeaturesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureFeaturesIsMutable(); features_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object resolver_ = ""; /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return Whether the resolver field is set. */ public boolean hasResolver() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return The resolver. */ public java.lang.String getResolver() { java.lang.Object ref = resolver_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resolver_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return The bytes for resolver. */ public com.google.protobuf.ByteString getResolverBytes() { java.lang.Object ref = resolver_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resolver_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @param value The resolver to set. * @return This builder for chaining. */ public Builder setResolver( java.lang.String value) { if (value == null) { throw new NullPointerException(); } resolver_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return This builder for chaining. */ public Builder clearResolver() { resolver_ = getDefaultInstance().getResolver(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @param value The bytes for resolver to set. * @return This builder for chaining. */ public Builder setResolverBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resolver_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object timestampColumnName_ = ""; /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return Whether the timestampColumnName field is set. */ @java.lang.Deprecated public boolean hasTimestampColumnName() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return The timestampColumnName. */ @java.lang.Deprecated public java.lang.String getTimestampColumnName() { java.lang.Object ref = timestampColumnName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); timestampColumnName_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return The bytes for timestampColumnName. */ @java.lang.Deprecated public com.google.protobuf.ByteString getTimestampColumnNameBytes() { java.lang.Object ref = timestampColumnName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); timestampColumnName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @param value The timestampColumnName to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setTimestampColumnName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } timestampColumnName_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearTimestampColumnName() { timestampColumnName_ = getDefaultInstance().getTimestampColumnName(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @param value The bytes for timestampColumnName to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setTimestampColumnNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); timestampColumnName_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.Timestamp lowerBound_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lowerBoundBuilder_; /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> * @return Whether the lowerBound field is set. */ public boolean hasLowerBound() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> * @return The lowerBound. */ public com.google.protobuf.Timestamp getLowerBound() { if (lowerBoundBuilder_ == null) { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } else { return lowerBoundBuilder_.getMessage(); } } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ public Builder setLowerBound(com.google.protobuf.Timestamp value) { if (lowerBoundBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lowerBound_ = value; } else { lowerBoundBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ public Builder setLowerBound( com.google.protobuf.Timestamp.Builder builderForValue) { if (lowerBoundBuilder_ == null) { lowerBound_ = builderForValue.build(); } else { lowerBoundBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ public Builder mergeLowerBound(com.google.protobuf.Timestamp value) { if (lowerBoundBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && lowerBound_ != null && lowerBound_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getLowerBoundBuilder().mergeFrom(value); } else { lowerBound_ = value; } } else { lowerBoundBuilder_.mergeFrom(value); } if (lowerBound_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ public Builder clearLowerBound() { bitField0_ = (bitField0_ & ~0x00000008); lowerBound_ = null; if (lowerBoundBuilder_ != null) { lowerBoundBuilder_.dispose(); lowerBoundBuilder_ = null; } onChanged(); return this; } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ public com.google.protobuf.Timestamp.Builder getLowerBoundBuilder() { bitField0_ |= 0x00000008; onChanged(); return getLowerBoundFieldBuilder().getBuilder(); } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ public com.google.protobuf.TimestampOrBuilder getLowerBoundOrBuilder() { if (lowerBoundBuilder_ != null) { return lowerBoundBuilder_.getMessageOrBuilder(); } else { return lowerBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lowerBound_; } } /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getLowerBoundFieldBuilder() { if (lowerBoundBuilder_ == null) { lowerBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getLowerBound(), getParentForChildren(), isClean()); lowerBound_ = null; } return lowerBoundBuilder_; } private com.google.protobuf.Timestamp upperBound_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> upperBoundBuilder_; /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> * @return Whether the upperBound field is set. */ public boolean hasUpperBound() { return ((bitField0_ & 0x00000010) != 0); } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> * @return The upperBound. */ public com.google.protobuf.Timestamp getUpperBound() { if (upperBoundBuilder_ == null) { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } else { return upperBoundBuilder_.getMessage(); } } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ public Builder setUpperBound(com.google.protobuf.Timestamp value) { if (upperBoundBuilder_ == null) { if (value == null) { throw new NullPointerException(); } upperBound_ = value; } else { upperBoundBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ public Builder setUpperBound( com.google.protobuf.Timestamp.Builder builderForValue) { if (upperBoundBuilder_ == null) { upperBound_ = builderForValue.build(); } else { upperBoundBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ public Builder mergeUpperBound(com.google.protobuf.Timestamp value) { if (upperBoundBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && upperBound_ != null && upperBound_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpperBoundBuilder().mergeFrom(value); } else { upperBound_ = value; } } else { upperBoundBuilder_.mergeFrom(value); } if (upperBound_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ public Builder clearUpperBound() { bitField0_ = (bitField0_ & ~0x00000010); upperBound_ = null; if (upperBoundBuilder_ != null) { upperBoundBuilder_.dispose(); upperBoundBuilder_ = null; } onChanged(); return this; } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ public com.google.protobuf.Timestamp.Builder getUpperBoundBuilder() { bitField0_ |= 0x00000010; onChanged(); return getUpperBoundFieldBuilder().getBuilder(); } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ public com.google.protobuf.TimestampOrBuilder getUpperBoundOrBuilder() { if (upperBoundBuilder_ != null) { return upperBoundBuilder_.getMessageOrBuilder(); } else { return upperBound_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : upperBound_; } } /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpperBoundFieldBuilder() { if (upperBoundBuilder_ == null) { upperBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpperBound(), getParentForChildren(), isClean()); upperBound_ = null; } return upperBoundBuilder_; } private boolean exact_ ; /** * <code>bool exact = 6 [json_name = "exact"];</code> * @return The exact. */ @java.lang.Override public boolean getExact() { return exact_; } /** * <code>bool exact = 6 [json_name = "exact"];</code> * @param value The exact to set. * @return This builder for chaining. */ public Builder setExact(boolean value) { exact_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <code>bool exact = 6 [json_name = "exact"];</code> * @return This builder for chaining. */ public Builder clearExact() { bitField0_ = (bitField0_ & ~0x00000020); exact_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:chalk.aggregate.v1.AggregateBackfillUserParams) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateBackfillUserParams) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateBackfillUserParams> PARSER = new com.google.protobuf.AbstractParser<AggregateBackfillUserParams>() { @java.lang.Override public AggregateBackfillUserParams parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateBackfillUserParams> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateBackfillUserParams> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillUserParamsOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateBackfillUserParamsOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateBackfillUserParams) com.google.protobuf.MessageOrBuilder { /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return A list containing the features. */ java.util.List<java.lang.String> getFeaturesList(); /** * <code>repeated string features = 1 [json_name = "features"];</code> * @return The count of features. */ int getFeaturesCount(); /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index of the element to return. * @return The features at the given index. */ java.lang.String getFeatures(int index); /** * <code>repeated string features = 1 [json_name = "features"];</code> * @param index The index of the value to return. * @return The bytes of the features at the given index. */ com.google.protobuf.ByteString getFeaturesBytes(int index); /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return Whether the resolver field is set. */ boolean hasResolver(); /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return The resolver. */ java.lang.String getResolver(); /** * <code>optional string resolver = 2 [json_name = "resolver"];</code> * @return The bytes for resolver. */ com.google.protobuf.ByteString getResolverBytes(); /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return Whether the timestampColumnName field is set. */ @java.lang.Deprecated boolean hasTimestampColumnName(); /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return The timestampColumnName. */ @java.lang.Deprecated java.lang.String getTimestampColumnName(); /** * <code>optional string timestamp_column_name = 3 [json_name = "timestampColumnName", deprecated = true];</code> * @deprecated chalk.aggregate.v1.AggregateBackfillUserParams.timestamp_column_name is deprecated. * See chalk/aggregate/v1/backfill.proto;l=21 * @return The bytes for timestampColumnName. */ @java.lang.Deprecated com.google.protobuf.ByteString getTimestampColumnNameBytes(); /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> * @return Whether the lowerBound field is set. */ boolean hasLowerBound(); /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> * @return The lowerBound. */ com.google.protobuf.Timestamp getLowerBound(); /** * <code>optional .google.protobuf.Timestamp lower_bound = 4 [json_name = "lowerBound"];</code> */ com.google.protobuf.TimestampOrBuilder getLowerBoundOrBuilder(); /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> * @return Whether the upperBound field is set. */ boolean hasUpperBound(); /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> * @return The upperBound. */ com.google.protobuf.Timestamp getUpperBound(); /** * <code>optional .google.protobuf.Timestamp upper_bound = 5 [json_name = "upperBound"];</code> */ com.google.protobuf.TimestampOrBuilder getUpperBoundOrBuilder(); /** * <code>bool exact = 6 [json_name = "exact"];</code> * @return The exact. */ boolean getExact(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillWithCostEstimate.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateBackfillWithCostEstimate} */ public final class AggregateBackfillWithCostEstimate extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateBackfillWithCostEstimate) AggregateBackfillWithCostEstimateOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateBackfillWithCostEstimate.newBuilder() to construct. private AggregateBackfillWithCostEstimate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateBackfillWithCostEstimate() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateBackfillWithCostEstimate(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder.class); } private int bitField0_; public static final int BACKFILL_FIELD_NUMBER = 1; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill backfill_; /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> * @return Whether the backfill field is set. */ @java.lang.Override public boolean hasBackfill() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> * @return The backfill. */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill getBackfill() { return backfill_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance() : backfill_; } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder getBackfillOrBuilder() { return backfill_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance() : backfill_; } public static final int ESTIMATE_FIELD_NUMBER = 2; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate_; /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return Whether the estimate field is set. */ @java.lang.Override public boolean hasEstimate() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return The estimate. */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getEstimate() { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder getEstimateOrBuilder() { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } 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.writeMessage(1, getBackfill()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getEstimate()); } getUnknownFields().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, getBackfill()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getEstimate()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate other = (ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate) obj; if (hasBackfill() != other.hasBackfill()) return false; if (hasBackfill()) { if (!getBackfill() .equals(other.getBackfill())) return false; } if (hasEstimate() != other.hasEstimate()) return false; if (hasEstimate()) { if (!getEstimate() .equals(other.getEstimate())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasBackfill()) { hash = (37 * hash) + BACKFILL_FIELD_NUMBER; hash = (53 * hash) + getBackfill().hashCode(); } if (hasEstimate()) { hash = (37 * hash) + ESTIMATE_FIELD_NUMBER; hash = (53 * hash) + getEstimate().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate 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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate 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(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate 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 chalk.aggregate.v1.AggregateBackfillWithCostEstimate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateBackfillWithCostEstimate) ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.class, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getBackfillFieldBuilder(); getEstimateFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; backfill_ = null; if (backfillBuilder_ != null) { backfillBuilder_.dispose(); backfillBuilder_ = null; } estimate_ = null; if (estimateBuilder_ != null) { estimateBuilder_.dispose(); estimateBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.BackfillProto.internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate build() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate result = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.backfill_ = backfillBuilder_ == null ? backfill_ : backfillBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.estimate_ = estimateBuilder_ == null ? estimate_ : estimateBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.getDefaultInstance()) return this; if (other.hasBackfill()) { mergeBackfill(other.getBackfill()); } if (other.hasEstimate()) { mergeEstimate(other.getEstimate()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getBackfillFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getEstimateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill backfill_; private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder> backfillBuilder_; /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> * @return Whether the backfill field is set. */ public boolean hasBackfill() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> * @return The backfill. */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill getBackfill() { if (backfillBuilder_ == null) { return backfill_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance() : backfill_; } else { return backfillBuilder_.getMessage(); } } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ public Builder setBackfill(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill value) { if (backfillBuilder_ == null) { if (value == null) { throw new NullPointerException(); } backfill_ = value; } else { backfillBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ public Builder setBackfill( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder builderForValue) { if (backfillBuilder_ == null) { backfill_ = builderForValue.build(); } else { backfillBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ public Builder mergeBackfill(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill value) { if (backfillBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && backfill_ != null && backfill_ != ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance()) { getBackfillBuilder().mergeFrom(value); } else { backfill_ = value; } } else { backfillBuilder_.mergeFrom(value); } if (backfill_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ public Builder clearBackfill() { bitField0_ = (bitField0_ & ~0x00000001); backfill_ = null; if (backfillBuilder_ != null) { backfillBuilder_.dispose(); backfillBuilder_ = null; } onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder getBackfillBuilder() { bitField0_ |= 0x00000001; onChanged(); return getBackfillFieldBuilder().getBuilder(); } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder getBackfillOrBuilder() { if (backfillBuilder_ != null) { return backfillBuilder_.getMessageOrBuilder(); } else { return backfill_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.getDefaultInstance() : backfill_; } } /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder> getBackfillFieldBuilder() { if (backfillBuilder_ == null) { backfillBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder>( getBackfill(), getParentForChildren(), isClean()); backfill_ = null; } return backfillBuilder_; } private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate_; private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder> estimateBuilder_; /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return Whether the estimate field is set. */ public boolean hasEstimate() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return The estimate. */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getEstimate() { if (estimateBuilder_ == null) { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } else { return estimateBuilder_.getMessage(); } } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder setEstimate(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate value) { if (estimateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } estimate_ = value; } else { estimateBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder setEstimate( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder builderForValue) { if (estimateBuilder_ == null) { estimate_ = builderForValue.build(); } else { estimateBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder mergeEstimate(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate value) { if (estimateBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && estimate_ != null && estimate_ != ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance()) { getEstimateBuilder().mergeFrom(value); } else { estimate_ = value; } } else { estimateBuilder_.mergeFrom(value); } if (estimate_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder clearEstimate() { bitField0_ = (bitField0_ & ~0x00000002); estimate_ = null; if (estimateBuilder_ != null) { estimateBuilder_.dispose(); estimateBuilder_ = null; } onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder getEstimateBuilder() { bitField0_ |= 0x00000002; onChanged(); return getEstimateFieldBuilder().getBuilder(); } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder getEstimateOrBuilder() { if (estimateBuilder_ != null) { return estimateBuilder_.getMessageOrBuilder(); } else { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder> getEstimateFieldBuilder() { if (estimateBuilder_ == null) { estimateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder>( getEstimate(), getParentForChildren(), isClean()); estimate_ = null; } return estimateBuilder_; } @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:chalk.aggregate.v1.AggregateBackfillWithCostEstimate) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateBackfillWithCostEstimate) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateBackfillWithCostEstimate> PARSER = new com.google.protobuf.AbstractParser<AggregateBackfillWithCostEstimate>() { @java.lang.Override public AggregateBackfillWithCostEstimate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateBackfillWithCostEstimate> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateBackfillWithCostEstimate> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateBackfillWithCostEstimateOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateBackfillWithCostEstimateOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateBackfillWithCostEstimate) com.google.protobuf.MessageOrBuilder { /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> * @return Whether the backfill field is set. */ boolean hasBackfill(); /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> * @return The backfill. */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfill getBackfill(); /** * <code>.chalk.aggregate.v1.AggregateBackfill backfill = 1 [json_name = "backfill"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillOrBuilder getBackfillOrBuilder(); /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return Whether the estimate field is set. */ boolean hasEstimate(); /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return The estimate. */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getEstimate(); /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder getEstimateOrBuilder(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateServiceGrpc.java
package ai.chalk.protos.chalk.aggregate.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.64.0)", comments = "Source: chalk/aggregate/v1/service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class AggregateServiceGrpc { private AggregateServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "chalk.aggregate.v1.AggregateService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse> getPlanAggregateBackfillMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PlanAggregateBackfill", requestType = ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.class, responseType = ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse> getPlanAggregateBackfillMethod() { io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse> getPlanAggregateBackfillMethod; if ((getPlanAggregateBackfillMethod = AggregateServiceGrpc.getPlanAggregateBackfillMethod) == null) { synchronized (AggregateServiceGrpc.class) { if ((getPlanAggregateBackfillMethod = AggregateServiceGrpc.getPlanAggregateBackfillMethod) == null) { AggregateServiceGrpc.getPlanAggregateBackfillMethod = getPlanAggregateBackfillMethod = io.grpc.MethodDescriptor.<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PlanAggregateBackfill")) .setSafe(true) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.getDefaultInstance())) .setSchemaDescriptor(new AggregateServiceMethodDescriptorSupplier("PlanAggregateBackfill")) .build(); } } } return getPlanAggregateBackfillMethod; } private static volatile io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse> getGetAggregatesMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetAggregates", requestType = ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.class, responseType = ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse> getGetAggregatesMethod() { io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse> getGetAggregatesMethod; if ((getGetAggregatesMethod = AggregateServiceGrpc.getGetAggregatesMethod) == null) { synchronized (AggregateServiceGrpc.class) { if ((getGetAggregatesMethod = AggregateServiceGrpc.getGetAggregatesMethod) == null) { AggregateServiceGrpc.getGetAggregatesMethod = getGetAggregatesMethod = io.grpc.MethodDescriptor.<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAggregates")) .setSafe(true) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.getDefaultInstance())) .setSchemaDescriptor(new AggregateServiceMethodDescriptorSupplier("GetAggregates")) .build(); } } } return getGetAggregatesMethod; } private static volatile io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse> getGetAggregateBackfillJobsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetAggregateBackfillJobs", requestType = ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.class, responseType = ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse> getGetAggregateBackfillJobsMethod() { io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse> getGetAggregateBackfillJobsMethod; if ((getGetAggregateBackfillJobsMethod = AggregateServiceGrpc.getGetAggregateBackfillJobsMethod) == null) { synchronized (AggregateServiceGrpc.class) { if ((getGetAggregateBackfillJobsMethod = AggregateServiceGrpc.getGetAggregateBackfillJobsMethod) == null) { AggregateServiceGrpc.getGetAggregateBackfillJobsMethod = getGetAggregateBackfillJobsMethod = io.grpc.MethodDescriptor.<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAggregateBackfillJobs")) .setSafe(true) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.getDefaultInstance())) .setSchemaDescriptor(new AggregateServiceMethodDescriptorSupplier("GetAggregateBackfillJobs")) .build(); } } } return getGetAggregateBackfillJobsMethod; } private static volatile io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse> getGetAggregateBackfillJobMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetAggregateBackfillJob", requestType = ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.class, responseType = ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse> getGetAggregateBackfillJobMethod() { io.grpc.MethodDescriptor<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse> getGetAggregateBackfillJobMethod; if ((getGetAggregateBackfillJobMethod = AggregateServiceGrpc.getGetAggregateBackfillJobMethod) == null) { synchronized (AggregateServiceGrpc.class) { if ((getGetAggregateBackfillJobMethod = AggregateServiceGrpc.getGetAggregateBackfillJobMethod) == null) { AggregateServiceGrpc.getGetAggregateBackfillJobMethod = getGetAggregateBackfillJobMethod = io.grpc.MethodDescriptor.<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAggregateBackfillJob")) .setSafe(true) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.getDefaultInstance())) .setSchemaDescriptor(new AggregateServiceMethodDescriptorSupplier("GetAggregateBackfillJob")) .build(); } } } return getGetAggregateBackfillJobMethod; } /** * Creates a new async stub that supports all call types for the service */ public static AggregateServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<AggregateServiceStub> factory = new io.grpc.stub.AbstractStub.StubFactory<AggregateServiceStub>() { @java.lang.Override public AggregateServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AggregateServiceStub(channel, callOptions); } }; return AggregateServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static AggregateServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<AggregateServiceBlockingStub> factory = new io.grpc.stub.AbstractStub.StubFactory<AggregateServiceBlockingStub>() { @java.lang.Override public AggregateServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AggregateServiceBlockingStub(channel, callOptions); } }; return AggregateServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static AggregateServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<AggregateServiceFutureStub> factory = new io.grpc.stub.AbstractStub.StubFactory<AggregateServiceFutureStub>() { @java.lang.Override public AggregateServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AggregateServiceFutureStub(channel, callOptions); } }; return AggregateServiceFutureStub.newStub(factory, channel); } /** */ public interface AsyncService { /** * <pre> * PlanAggregateBackfill determines the estimated resources needed to backfill * an aggregate. * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ default void planAggregateBackfill(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPlanAggregateBackfillMethod(), responseObserver); } /** * <pre> * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ default void getAggregates(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAggregatesMethod(), responseObserver); } /** */ default void getAggregateBackfillJobs(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAggregateBackfillJobsMethod(), responseObserver); } /** */ default void getAggregateBackfillJob(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAggregateBackfillJobMethod(), responseObserver); } } /** * Base class for the server implementation of the service AggregateService. */ public static abstract class AggregateServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return AggregateServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service AggregateService. */ public static final class AggregateServiceStub extends io.grpc.stub.AbstractAsyncStub<AggregateServiceStub> { private AggregateServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AggregateServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AggregateServiceStub(channel, callOptions); } /** * <pre> * PlanAggregateBackfill determines the estimated resources needed to backfill * an aggregate. * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ public void planAggregateBackfill(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPlanAggregateBackfillMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ public void getAggregates(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAggregatesMethod(), getCallOptions()), request, responseObserver); } /** */ public void getAggregateBackfillJobs(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAggregateBackfillJobsMethod(), getCallOptions()), request, responseObserver); } /** */ public void getAggregateBackfillJob(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest request, io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAggregateBackfillJobMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service AggregateService. */ public static final class AggregateServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<AggregateServiceBlockingStub> { private AggregateServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AggregateServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AggregateServiceBlockingStub(channel, callOptions); } /** * <pre> * PlanAggregateBackfill determines the estimated resources needed to backfill * an aggregate. * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse planAggregateBackfill(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPlanAggregateBackfillMethod(), getCallOptions(), request); } /** * <pre> * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse getAggregates(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAggregatesMethod(), getCallOptions(), request); } /** */ public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse getAggregateBackfillJobs(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAggregateBackfillJobsMethod(), getCallOptions(), request); } /** */ public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse getAggregateBackfillJob(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAggregateBackfillJobMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service AggregateService. */ public static final class AggregateServiceFutureStub extends io.grpc.stub.AbstractFutureStub<AggregateServiceFutureStub> { private AggregateServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AggregateServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AggregateServiceFutureStub(channel, callOptions); } /** * <pre> * PlanAggregateBackfill determines the estimated resources needed to backfill * an aggregate. * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse> planAggregateBackfill( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPlanAggregateBackfillMethod(), getCallOptions()), request); } /** * <pre> * This method is a duplicate of the PlanAggregateBackfill method * in the query_server.proto file. We should remove the query_server.proto method * and move that request to this service instead. * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse> getAggregates( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAggregatesMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse> getAggregateBackfillJobs( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAggregateBackfillJobsMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse> getAggregateBackfillJob( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAggregateBackfillJobMethod(), getCallOptions()), request); } } private static final int METHODID_PLAN_AGGREGATE_BACKFILL = 0; private static final int METHODID_GET_AGGREGATES = 1; private static final int METHODID_GET_AGGREGATE_BACKFILL_JOBS = 2; private static final int METHODID_GET_AGGREGATE_BACKFILL_JOB = 3; private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { private final AsyncService serviceImpl; private final int methodId; MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_PLAN_AGGREGATE_BACKFILL: serviceImpl.planAggregateBackfill((ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest) request, (io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse>) responseObserver); break; case METHODID_GET_AGGREGATES: serviceImpl.getAggregates((ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest) request, (io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse>) responseObserver); break; case METHODID_GET_AGGREGATE_BACKFILL_JOBS: serviceImpl.getAggregateBackfillJobs((ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest) request, (io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse>) responseObserver); break; case METHODID_GET_AGGREGATE_BACKFILL_JOB: serviceImpl.getAggregateBackfillJob((ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest) request, (io.grpc.stub.StreamObserver<ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse>) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getPlanAggregateBackfillMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse>( service, METHODID_PLAN_AGGREGATE_BACKFILL))) .addMethod( getGetAggregatesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse>( service, METHODID_GET_AGGREGATES))) .addMethod( getGetAggregateBackfillJobsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse>( service, METHODID_GET_AGGREGATE_BACKFILL_JOBS))) .addMethod( getGetAggregateBackfillJobMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse>( service, METHODID_GET_AGGREGATE_BACKFILL_JOB))) .build(); } private static abstract class AggregateServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { AggregateServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("AggregateService"); } } private static final class AggregateServiceFileDescriptorSupplier extends AggregateServiceBaseDescriptorSupplier { AggregateServiceFileDescriptorSupplier() {} } private static final class AggregateServiceMethodDescriptorSupplier extends AggregateServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; AggregateServiceMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } @java.lang.Override public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (AggregateServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AggregateServiceFileDescriptorSupplier()) .addMethod(getPlanAggregateBackfillMethod()) .addMethod(getGetAggregatesMethod()) .addMethod(getGetAggregateBackfillJobsMethod()) .addMethod(getGetAggregateBackfillJobMethod()) .build(); } } } return result; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateTimeSeries.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/timeseries.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateTimeSeries} */ public final class AggregateTimeSeries extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateTimeSeries) AggregateTimeSeriesOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateTimeSeries.newBuilder() to construct. private AggregateTimeSeries(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateTimeSeries() { namespace_ = ""; aggregateOn_ = ""; groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); rules_ = java.util.Collections.emptyList(); filtersDescription_ = ""; bucketFeature_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateTimeSeries(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeries_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeries_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.class, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder.class); } public static final int NAMESPACE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object namespace_ = ""; /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return The namespace. */ @java.lang.Override public java.lang.String getNamespace() { java.lang.Object ref = namespace_; 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(); namespace_ = s; return s; } } /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return The bytes for namespace. */ @java.lang.Override public com.google.protobuf.ByteString getNamespaceBytes() { java.lang.Object ref = namespace_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); namespace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AGGREGATE_ON_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object aggregateOn_ = ""; /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return The aggregateOn. */ @java.lang.Override public java.lang.String getAggregateOn() { java.lang.Object ref = aggregateOn_; 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(); aggregateOn_ = s; return s; } } /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return The bytes for aggregateOn. */ @java.lang.Override public com.google.protobuf.ByteString getAggregateOnBytes() { java.lang.Object ref = aggregateOn_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregateOn_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GROUP_BY_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return A list containing the groupBy. */ public com.google.protobuf.ProtocolStringList getGroupByList() { return groupBy_; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return The count of groupBy. */ public int getGroupByCount() { return groupBy_.size(); } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index of the element to return. * @return The groupBy at the given index. */ public java.lang.String getGroupBy(int index) { return groupBy_.get(index); } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index of the value to return. * @return The bytes of the groupBy at the given index. */ public com.google.protobuf.ByteString getGroupByBytes(int index) { return groupBy_.getByteString(index); } public static final int RULES_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule> rules_; /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ @java.lang.Override public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule> getRulesList() { return rules_; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ @java.lang.Override public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder> getRulesOrBuilderList() { return rules_; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ @java.lang.Override public int getRulesCount() { return rules_.size(); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule getRules(int index) { return rules_.get(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder getRulesOrBuilder( int index) { return rules_.get(index); } public static final int FILTERS_DESCRIPTION_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object filtersDescription_ = ""; /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return The filtersDescription. */ @java.lang.Override public java.lang.String getFiltersDescription() { java.lang.Object ref = filtersDescription_; 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(); filtersDescription_ = s; return s; } } /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return The bytes for filtersDescription. */ @java.lang.Override public com.google.protobuf.ByteString getFiltersDescriptionBytes() { java.lang.Object ref = filtersDescription_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); filtersDescription_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BUCKET_FEATURE_FIELD_NUMBER = 7; @SuppressWarnings("serial") private volatile java.lang.Object bucketFeature_ = ""; /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return The bucketFeature. */ @java.lang.Override public java.lang.String getBucketFeature() { java.lang.Object ref = bucketFeature_; 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(); bucketFeature_ = s; return s; } } /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return The bytes for bucketFeature. */ @java.lang.Override public com.google.protobuf.ByteString getBucketFeatureBytes() { java.lang.Object ref = bucketFeature_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); bucketFeature_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregateOn_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, aggregateOn_); } for (int i = 0; i < groupBy_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, groupBy_.getRaw(i)); } for (int i = 0; i < rules_.size(); i++) { output.writeMessage(5, rules_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filtersDescription_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, filtersDescription_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucketFeature_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, bucketFeature_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregateOn_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, aggregateOn_); } { int dataSize = 0; for (int i = 0; i < groupBy_.size(); i++) { dataSize += computeStringSizeNoTag(groupBy_.getRaw(i)); } size += dataSize; size += 1 * getGroupByList().size(); } for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, rules_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filtersDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, filtersDescription_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucketFeature_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, bucketFeature_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries other = (ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries) obj; if (!getNamespace() .equals(other.getNamespace())) return false; if (!getAggregateOn() .equals(other.getAggregateOn())) return false; if (!getGroupByList() .equals(other.getGroupByList())) return false; if (!getRulesList() .equals(other.getRulesList())) return false; if (!getFiltersDescription() .equals(other.getFiltersDescription())) return false; if (!getBucketFeature() .equals(other.getBucketFeature())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; hash = (53 * hash) + getNamespace().hashCode(); hash = (37 * hash) + AGGREGATE_ON_FIELD_NUMBER; hash = (53 * hash) + getAggregateOn().hashCode(); if (getGroupByCount() > 0) { hash = (37 * hash) + GROUP_BY_FIELD_NUMBER; hash = (53 * hash) + getGroupByList().hashCode(); } if (getRulesCount() > 0) { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } hash = (37 * hash) + FILTERS_DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getFiltersDescription().hashCode(); hash = (37 * hash) + BUCKET_FEATURE_FIELD_NUMBER; hash = (53 * hash) + getBucketFeature().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries 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 ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries 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 ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries 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(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries 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 chalk.aggregate.v1.AggregateTimeSeries} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateTimeSeries) ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeries_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeries_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.class, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; namespace_ = ""; aggregateOn_ = ""; groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); } else { rules_ = null; rulesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); filtersDescription_ = ""; bucketFeature_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeries_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries build() { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries result = new ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries result) { if (rulesBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { rules_ = java.util.Collections.unmodifiableList(rules_); bitField0_ = (bitField0_ & ~0x00000008); } result.rules_ = rules_; } else { result.rules_ = rulesBuilder_.build(); } } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.namespace_ = namespace_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.aggregateOn_ = aggregateOn_; } if (((from_bitField0_ & 0x00000004) != 0)) { groupBy_.makeImmutable(); result.groupBy_ = groupBy_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.filtersDescription_ = filtersDescription_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.bucketFeature_ = bucketFeature_; } } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.getDefaultInstance()) return this; if (!other.getNamespace().isEmpty()) { namespace_ = other.namespace_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getAggregateOn().isEmpty()) { aggregateOn_ = other.aggregateOn_; bitField0_ |= 0x00000002; onChanged(); } if (!other.groupBy_.isEmpty()) { if (groupBy_.isEmpty()) { groupBy_ = other.groupBy_; bitField0_ |= 0x00000004; } else { ensureGroupByIsMutable(); groupBy_.addAll(other.groupBy_); } onChanged(); } if (rulesBuilder_ == null) { if (!other.rules_.isEmpty()) { if (rules_.isEmpty()) { rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureRulesIsMutable(); rules_.addAll(other.rules_); } onChanged(); } } else { if (!other.rules_.isEmpty()) { if (rulesBuilder_.isEmpty()) { rulesBuilder_.dispose(); rulesBuilder_ = null; rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000008); rulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRulesFieldBuilder() : null; } else { rulesBuilder_.addAllMessages(other.rules_); } } } if (!other.getFiltersDescription().isEmpty()) { filtersDescription_ = other.filtersDescription_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getBucketFeature().isEmpty()) { bucketFeature_ = other.bucketFeature_; bitField0_ |= 0x00000020; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { namespace_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { aggregateOn_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureGroupByIsMutable(); groupBy_.add(s); break; } // case 26 case 42: { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule m = input.readMessage( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.parser(), extensionRegistry); if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.add(m); } else { rulesBuilder_.addMessage(m); } break; } // case 42 case 50: { filtersDescription_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 50 case 58: { bucketFeature_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object namespace_ = ""; /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return The namespace. */ public java.lang.String getNamespace() { java.lang.Object ref = namespace_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); namespace_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return The bytes for namespace. */ public com.google.protobuf.ByteString getNamespaceBytes() { java.lang.Object ref = namespace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); namespace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @param value The namespace to set. * @return This builder for chaining. */ public Builder setNamespace( java.lang.String value) { if (value == null) { throw new NullPointerException(); } namespace_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return This builder for chaining. */ public Builder clearNamespace() { namespace_ = getDefaultInstance().getNamespace(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @param value The bytes for namespace to set. * @return This builder for chaining. */ public Builder setNamespaceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); namespace_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object aggregateOn_ = ""; /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return The aggregateOn. */ public java.lang.String getAggregateOn() { java.lang.Object ref = aggregateOn_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); aggregateOn_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return The bytes for aggregateOn. */ public com.google.protobuf.ByteString getAggregateOnBytes() { java.lang.Object ref = aggregateOn_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregateOn_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @param value The aggregateOn to set. * @return This builder for chaining. */ public Builder setAggregateOn( java.lang.String value) { if (value == null) { throw new NullPointerException(); } aggregateOn_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return This builder for chaining. */ public Builder clearAggregateOn() { aggregateOn_ = getDefaultInstance().getAggregateOn(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @param value The bytes for aggregateOn to set. * @return This builder for chaining. */ public Builder setAggregateOnBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); aggregateOn_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureGroupByIsMutable() { if (!groupBy_.isModifiable()) { groupBy_ = new com.google.protobuf.LazyStringArrayList(groupBy_); } bitField0_ |= 0x00000004; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return A list containing the groupBy. */ public com.google.protobuf.ProtocolStringList getGroupByList() { groupBy_.makeImmutable(); return groupBy_; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return The count of groupBy. */ public int getGroupByCount() { return groupBy_.size(); } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index of the element to return. * @return The groupBy at the given index. */ public java.lang.String getGroupBy(int index) { return groupBy_.get(index); } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index of the value to return. * @return The bytes of the groupBy at the given index. */ public com.google.protobuf.ByteString getGroupByBytes(int index) { return groupBy_.getByteString(index); } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index to set the value at. * @param value The groupBy to set. * @return This builder for chaining. */ public Builder setGroupBy( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureGroupByIsMutable(); groupBy_.set(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param value The groupBy to add. * @return This builder for chaining. */ public Builder addGroupBy( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureGroupByIsMutable(); groupBy_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param values The groupBy to add. * @return This builder for chaining. */ public Builder addAllGroupBy( java.lang.Iterable<java.lang.String> values) { ensureGroupByIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, groupBy_); bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return This builder for chaining. */ public Builder clearGroupBy() { groupBy_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000004);; onChanged(); return this; } /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param value The bytes of the groupBy to add. * @return This builder for chaining. */ public Builder addGroupByBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureGroupByIsMutable(); groupBy_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule> rules_ = java.util.Collections.emptyList(); private void ensureRulesIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { rules_ = new java.util.ArrayList<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule>(rules_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder> rulesBuilder_; /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule> getRulesList() { if (rulesBuilder_ == null) { return java.util.Collections.unmodifiableList(rules_); } else { return rulesBuilder_.getMessageList(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public int getRulesCount() { if (rulesBuilder_ == null) { return rules_.size(); } else { return rulesBuilder_.getCount(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule getRules(int index) { if (rulesBuilder_ == null) { return rules_.get(index); } else { return rulesBuilder_.getMessage(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder setRules( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule value) { if (rulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRulesIsMutable(); rules_.set(index, value); onChanged(); } else { rulesBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder setRules( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder builderForValue) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.set(index, builderForValue.build()); onChanged(); } else { rulesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder addRules(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule value) { if (rulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRulesIsMutable(); rules_.add(value); onChanged(); } else { rulesBuilder_.addMessage(value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder addRules( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule value) { if (rulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRulesIsMutable(); rules_.add(index, value); onChanged(); } else { rulesBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder addRules( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder builderForValue) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.add(builderForValue.build()); onChanged(); } else { rulesBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder addRules( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder builderForValue) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.add(index, builderForValue.build()); onChanged(); } else { rulesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder addAllRules( java.lang.Iterable<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule> values) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, rules_); onChanged(); } else { rulesBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder clearRules() { if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { rulesBuilder_.clear(); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public Builder removeRules(int index) { if (rulesBuilder_ == null) { ensureRulesIsMutable(); rules_.remove(index); onChanged(); } else { rulesBuilder_.remove(index); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder getRulesBuilder( int index) { return getRulesFieldBuilder().getBuilder(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder getRulesOrBuilder( int index) { if (rulesBuilder_ == null) { return rules_.get(index); } else { return rulesBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder> getRulesOrBuilderList() { if (rulesBuilder_ != null) { return rulesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(rules_); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder addRulesBuilder() { return getRulesFieldBuilder().addBuilder( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder addRulesBuilder( int index) { return getRulesFieldBuilder().addBuilder( index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder> getRulesBuilderList() { return getRulesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder> getRulesFieldBuilder() { if (rulesBuilder_ == null) { rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder>( rules_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); rules_ = null; } return rulesBuilder_; } private java.lang.Object filtersDescription_ = ""; /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return The filtersDescription. */ public java.lang.String getFiltersDescription() { java.lang.Object ref = filtersDescription_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); filtersDescription_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return The bytes for filtersDescription. */ public com.google.protobuf.ByteString getFiltersDescriptionBytes() { java.lang.Object ref = filtersDescription_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); filtersDescription_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @param value The filtersDescription to set. * @return This builder for chaining. */ public Builder setFiltersDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } filtersDescription_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return This builder for chaining. */ public Builder clearFiltersDescription() { filtersDescription_ = getDefaultInstance().getFiltersDescription(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @param value The bytes for filtersDescription to set. * @return This builder for chaining. */ public Builder setFiltersDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); filtersDescription_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object bucketFeature_ = ""; /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return The bucketFeature. */ public java.lang.String getBucketFeature() { java.lang.Object ref = bucketFeature_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); bucketFeature_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return The bytes for bucketFeature. */ public com.google.protobuf.ByteString getBucketFeatureBytes() { java.lang.Object ref = bucketFeature_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); bucketFeature_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @param value The bucketFeature to set. * @return This builder for chaining. */ public Builder setBucketFeature( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bucketFeature_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return This builder for chaining. */ public Builder clearBucketFeature() { bucketFeature_ = getDefaultInstance().getBucketFeature(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @param value The bytes for bucketFeature to set. * @return This builder for chaining. */ public Builder setBucketFeatureBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); bucketFeature_ = value; bitField0_ |= 0x00000020; 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:chalk.aggregate.v1.AggregateTimeSeries) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateTimeSeries) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateTimeSeries> PARSER = new com.google.protobuf.AbstractParser<AggregateTimeSeries>() { @java.lang.Override public AggregateTimeSeries parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateTimeSeries> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateTimeSeries> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateTimeSeriesOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/timeseries.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateTimeSeriesOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateTimeSeries) com.google.protobuf.MessageOrBuilder { /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return The namespace. */ java.lang.String getNamespace(); /** * <code>string namespace = 1 [json_name = "namespace"];</code> * @return The bytes for namespace. */ com.google.protobuf.ByteString getNamespaceBytes(); /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return The aggregateOn. */ java.lang.String getAggregateOn(); /** * <code>string aggregate_on = 2 [json_name = "aggregateOn"];</code> * @return The bytes for aggregateOn. */ com.google.protobuf.ByteString getAggregateOnBytes(); /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return A list containing the groupBy. */ java.util.List<java.lang.String> getGroupByList(); /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @return The count of groupBy. */ int getGroupByCount(); /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index of the element to return. * @return The groupBy at the given index. */ java.lang.String getGroupBy(int index); /** * <code>repeated string group_by = 3 [json_name = "groupBy"];</code> * @param index The index of the value to return. * @return The bytes of the groupBy at the given index. */ com.google.protobuf.ByteString getGroupByBytes(int index); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule> getRulesList(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule getRules(int index); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ int getRulesCount(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder> getRulesOrBuilderList(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeriesRule rules = 5 [json_name = "rules"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder getRulesOrBuilder( int index); /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return The filtersDescription. */ java.lang.String getFiltersDescription(); /** * <code>string filters_description = 6 [json_name = "filtersDescription"];</code> * @return The bytes for filtersDescription. */ com.google.protobuf.ByteString getFiltersDescriptionBytes(); /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return The bucketFeature. */ java.lang.String getBucketFeature(); /** * <code>string bucket_feature = 7 [json_name = "bucketFeature"];</code> * @return The bytes for bucketFeature. */ com.google.protobuf.ByteString getBucketFeatureBytes(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateTimeSeriesRule.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/timeseries.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.AggregateTimeSeriesRule} */ public final class AggregateTimeSeriesRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.AggregateTimeSeriesRule) AggregateTimeSeriesRuleOrBuilder { private static final long serialVersionUID = 0L; // Use AggregateTimeSeriesRule.newBuilder() to construct. private AggregateTimeSeriesRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AggregateTimeSeriesRule() { aggregation_ = ""; dependentFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); datetimeFeature_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AggregateTimeSeriesRule(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeriesRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeriesRule_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.class, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder.class); } private int bitField0_; public static final int AGGREGATION_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object aggregation_ = ""; /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return The aggregation. */ @java.lang.Override public java.lang.String getAggregation() { java.lang.Object ref = aggregation_; 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(); aggregation_ = s; return s; } } /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return The bytes for aggregation. */ @java.lang.Override public com.google.protobuf.ByteString getAggregationBytes() { java.lang.Object ref = aggregation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BUCKET_DURATION_FIELD_NUMBER = 2; private com.google.protobuf.Duration bucketDuration_; /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> * @return Whether the bucketDuration field is set. */ @java.lang.Override public boolean hasBucketDuration() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> * @return The bucketDuration. */ @java.lang.Override public com.google.protobuf.Duration getBucketDuration() { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getBucketDurationOrBuilder() { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } public static final int DEPENDENT_FEATURES_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList dependentFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return A list containing the dependentFeatures. */ public com.google.protobuf.ProtocolStringList getDependentFeaturesList() { return dependentFeatures_; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return The count of dependentFeatures. */ public int getDependentFeaturesCount() { return dependentFeatures_.size(); } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index of the element to return. * @return The dependentFeatures at the given index. */ public java.lang.String getDependentFeatures(int index) { return dependentFeatures_.get(index); } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index of the value to return. * @return The bytes of the dependentFeatures at the given index. */ public com.google.protobuf.ByteString getDependentFeaturesBytes(int index) { return dependentFeatures_.getByteString(index); } public static final int RETENTION_FIELD_NUMBER = 4; private com.google.protobuf.Duration retention_; /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> * @return Whether the retention field is set. */ @java.lang.Override public boolean hasRetention() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> * @return The retention. */ @java.lang.Override public com.google.protobuf.Duration getRetention() { return retention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retention_; } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { return retention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retention_; } public static final int DATETIME_FEATURE_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object datetimeFeature_ = ""; /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return The datetimeFeature. */ @java.lang.Override public java.lang.String getDatetimeFeature() { java.lang.Object ref = datetimeFeature_; 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(); datetimeFeature_ = s; return s; } } /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return The bytes for datetimeFeature. */ @java.lang.Override public com.google.protobuf.ByteString getDatetimeFeatureBytes() { java.lang.Object ref = datetimeFeature_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); datetimeFeature_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, aggregation_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getBucketDuration()); } for (int i = 0; i < dependentFeatures_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dependentFeatures_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getRetention()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datetimeFeature_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, datetimeFeature_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregation_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, aggregation_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getBucketDuration()); } { int dataSize = 0; for (int i = 0; i < dependentFeatures_.size(); i++) { dataSize += computeStringSizeNoTag(dependentFeatures_.getRaw(i)); } size += dataSize; size += 1 * getDependentFeaturesList().size(); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getRetention()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datetimeFeature_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, datetimeFeature_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule other = (ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule) obj; if (!getAggregation() .equals(other.getAggregation())) return false; if (hasBucketDuration() != other.hasBucketDuration()) return false; if (hasBucketDuration()) { if (!getBucketDuration() .equals(other.getBucketDuration())) return false; } if (!getDependentFeaturesList() .equals(other.getDependentFeaturesList())) return false; if (hasRetention() != other.hasRetention()) return false; if (hasRetention()) { if (!getRetention() .equals(other.getRetention())) return false; } if (!getDatetimeFeature() .equals(other.getDatetimeFeature())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + AGGREGATION_FIELD_NUMBER; hash = (53 * hash) + getAggregation().hashCode(); if (hasBucketDuration()) { hash = (37 * hash) + BUCKET_DURATION_FIELD_NUMBER; hash = (53 * hash) + getBucketDuration().hashCode(); } if (getDependentFeaturesCount() > 0) { hash = (37 * hash) + DEPENDENT_FEATURES_FIELD_NUMBER; hash = (53 * hash) + getDependentFeaturesList().hashCode(); } if (hasRetention()) { hash = (37 * hash) + RETENTION_FIELD_NUMBER; hash = (53 * hash) + getRetention().hashCode(); } hash = (37 * hash) + DATETIME_FEATURE_FIELD_NUMBER; hash = (53 * hash) + getDatetimeFeature().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule 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 ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule 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 ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule 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(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule 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 chalk.aggregate.v1.AggregateTimeSeriesRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.AggregateTimeSeriesRule) ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeriesRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeriesRule_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.class, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getBucketDurationFieldBuilder(); getRetentionFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; aggregation_ = ""; bucketDuration_ = null; if (bucketDurationBuilder_ != null) { bucketDurationBuilder_.dispose(); bucketDurationBuilder_ = null; } dependentFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); retention_ = null; if (retentionBuilder_ != null) { retentionBuilder_.dispose(); retentionBuilder_ = null; } datetimeFeature_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.internal_static_chalk_aggregate_v1_AggregateTimeSeriesRule_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule build() { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule buildPartial() { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule result = new ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.aggregation_ = aggregation_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.bucketDuration_ = bucketDurationBuilder_ == null ? bucketDuration_ : bucketDurationBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { dependentFeatures_.makeImmutable(); result.dependentFeatures_ = dependentFeatures_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.retention_ = retentionBuilder_ == null ? retention_ : retentionBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { result.datetimeFeature_ = datetimeFeature_; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule other) { if (other == ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule.getDefaultInstance()) return this; if (!other.getAggregation().isEmpty()) { aggregation_ = other.aggregation_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasBucketDuration()) { mergeBucketDuration(other.getBucketDuration()); } if (!other.dependentFeatures_.isEmpty()) { if (dependentFeatures_.isEmpty()) { dependentFeatures_ = other.dependentFeatures_; bitField0_ |= 0x00000004; } else { ensureDependentFeaturesIsMutable(); dependentFeatures_.addAll(other.dependentFeatures_); } onChanged(); } if (other.hasRetention()) { mergeRetention(other.getRetention()); } if (!other.getDatetimeFeature().isEmpty()) { datetimeFeature_ = other.datetimeFeature_; bitField0_ |= 0x00000010; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { aggregation_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getBucketDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureDependentFeaturesIsMutable(); dependentFeatures_.add(s); break; } // case 26 case 34: { input.readMessage( getRetentionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { datetimeFeature_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object aggregation_ = ""; /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return The aggregation. */ public java.lang.String getAggregation() { java.lang.Object ref = aggregation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); aggregation_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return The bytes for aggregation. */ public com.google.protobuf.ByteString getAggregationBytes() { java.lang.Object ref = aggregation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @param value The aggregation to set. * @return This builder for chaining. */ public Builder setAggregation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } aggregation_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return This builder for chaining. */ public Builder clearAggregation() { aggregation_ = getDefaultInstance().getAggregation(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @param value The bytes for aggregation to set. * @return This builder for chaining. */ public Builder setAggregationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); aggregation_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.Duration bucketDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> bucketDurationBuilder_; /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> * @return Whether the bucketDuration field is set. */ public boolean hasBucketDuration() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> * @return The bucketDuration. */ public com.google.protobuf.Duration getBucketDuration() { if (bucketDurationBuilder_ == null) { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } else { return bucketDurationBuilder_.getMessage(); } } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ public Builder setBucketDuration(com.google.protobuf.Duration value) { if (bucketDurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } bucketDuration_ = value; } else { bucketDurationBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ public Builder setBucketDuration( com.google.protobuf.Duration.Builder builderForValue) { if (bucketDurationBuilder_ == null) { bucketDuration_ = builderForValue.build(); } else { bucketDurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ public Builder mergeBucketDuration(com.google.protobuf.Duration value) { if (bucketDurationBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && bucketDuration_ != null && bucketDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { getBucketDurationBuilder().mergeFrom(value); } else { bucketDuration_ = value; } } else { bucketDurationBuilder_.mergeFrom(value); } if (bucketDuration_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ public Builder clearBucketDuration() { bitField0_ = (bitField0_ & ~0x00000002); bucketDuration_ = null; if (bucketDurationBuilder_ != null) { bucketDurationBuilder_.dispose(); bucketDurationBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ public com.google.protobuf.Duration.Builder getBucketDurationBuilder() { bitField0_ |= 0x00000002; onChanged(); return getBucketDurationFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ public com.google.protobuf.DurationOrBuilder getBucketDurationOrBuilder() { if (bucketDurationBuilder_ != null) { return bucketDurationBuilder_.getMessageOrBuilder(); } else { return bucketDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : bucketDuration_; } } /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getBucketDurationFieldBuilder() { if (bucketDurationBuilder_ == null) { bucketDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getBucketDuration(), getParentForChildren(), isClean()); bucketDuration_ = null; } return bucketDurationBuilder_; } private com.google.protobuf.LazyStringArrayList dependentFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureDependentFeaturesIsMutable() { if (!dependentFeatures_.isModifiable()) { dependentFeatures_ = new com.google.protobuf.LazyStringArrayList(dependentFeatures_); } bitField0_ |= 0x00000004; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return A list containing the dependentFeatures. */ public com.google.protobuf.ProtocolStringList getDependentFeaturesList() { dependentFeatures_.makeImmutable(); return dependentFeatures_; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return The count of dependentFeatures. */ public int getDependentFeaturesCount() { return dependentFeatures_.size(); } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index of the element to return. * @return The dependentFeatures at the given index. */ public java.lang.String getDependentFeatures(int index) { return dependentFeatures_.get(index); } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index of the value to return. * @return The bytes of the dependentFeatures at the given index. */ public com.google.protobuf.ByteString getDependentFeaturesBytes(int index) { return dependentFeatures_.getByteString(index); } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index to set the value at. * @param value The dependentFeatures to set. * @return This builder for chaining. */ public Builder setDependentFeatures( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureDependentFeaturesIsMutable(); dependentFeatures_.set(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param value The dependentFeatures to add. * @return This builder for chaining. */ public Builder addDependentFeatures( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureDependentFeaturesIsMutable(); dependentFeatures_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param values The dependentFeatures to add. * @return This builder for chaining. */ public Builder addAllDependentFeatures( java.lang.Iterable<java.lang.String> values) { ensureDependentFeaturesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, dependentFeatures_); bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return This builder for chaining. */ public Builder clearDependentFeatures() { dependentFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000004);; onChanged(); return this; } /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param value The bytes of the dependentFeatures to add. * @return This builder for chaining. */ public Builder addDependentFeaturesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureDependentFeaturesIsMutable(); dependentFeatures_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.Duration retention_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retentionBuilder_; /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> * @return Whether the retention field is set. */ public boolean hasRetention() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> * @return The retention. */ public com.google.protobuf.Duration getRetention() { if (retentionBuilder_ == null) { return retention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retention_; } else { return retentionBuilder_.getMessage(); } } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ public Builder setRetention(com.google.protobuf.Duration value) { if (retentionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } retention_ = value; } else { retentionBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ public Builder setRetention( com.google.protobuf.Duration.Builder builderForValue) { if (retentionBuilder_ == null) { retention_ = builderForValue.build(); } else { retentionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ public Builder mergeRetention(com.google.protobuf.Duration value) { if (retentionBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && retention_ != null && retention_ != com.google.protobuf.Duration.getDefaultInstance()) { getRetentionBuilder().mergeFrom(value); } else { retention_ = value; } } else { retentionBuilder_.mergeFrom(value); } if (retention_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ public Builder clearRetention() { bitField0_ = (bitField0_ & ~0x00000008); retention_ = null; if (retentionBuilder_ != null) { retentionBuilder_.dispose(); retentionBuilder_ = null; } onChanged(); return this; } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ public com.google.protobuf.Duration.Builder getRetentionBuilder() { bitField0_ |= 0x00000008; onChanged(); return getRetentionFieldBuilder().getBuilder(); } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ public com.google.protobuf.DurationOrBuilder getRetentionOrBuilder() { if (retentionBuilder_ != null) { return retentionBuilder_.getMessageOrBuilder(); } else { return retention_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retention_; } } /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getRetentionFieldBuilder() { if (retentionBuilder_ == null) { retentionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getRetention(), getParentForChildren(), isClean()); retention_ = null; } return retentionBuilder_; } private java.lang.Object datetimeFeature_ = ""; /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return The datetimeFeature. */ public java.lang.String getDatetimeFeature() { java.lang.Object ref = datetimeFeature_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); datetimeFeature_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return The bytes for datetimeFeature. */ public com.google.protobuf.ByteString getDatetimeFeatureBytes() { java.lang.Object ref = datetimeFeature_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); datetimeFeature_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @param value The datetimeFeature to set. * @return This builder for chaining. */ public Builder setDatetimeFeature( java.lang.String value) { if (value == null) { throw new NullPointerException(); } datetimeFeature_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return This builder for chaining. */ public Builder clearDatetimeFeature() { datetimeFeature_ = getDefaultInstance().getDatetimeFeature(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @param value The bytes for datetimeFeature to set. * @return This builder for chaining. */ public Builder setDatetimeFeatureBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); datetimeFeature_ = value; bitField0_ |= 0x00000010; 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:chalk.aggregate.v1.AggregateTimeSeriesRule) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.AggregateTimeSeriesRule) private static final ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule(); } public static ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AggregateTimeSeriesRule> PARSER = new com.google.protobuf.AbstractParser<AggregateTimeSeriesRule>() { @java.lang.Override public AggregateTimeSeriesRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AggregateTimeSeriesRule> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AggregateTimeSeriesRule> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/AggregateTimeSeriesRuleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/timeseries.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface AggregateTimeSeriesRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.AggregateTimeSeriesRule) com.google.protobuf.MessageOrBuilder { /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return The aggregation. */ java.lang.String getAggregation(); /** * <code>string aggregation = 1 [json_name = "aggregation"];</code> * @return The bytes for aggregation. */ com.google.protobuf.ByteString getAggregationBytes(); /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> * @return Whether the bucketDuration field is set. */ boolean hasBucketDuration(); /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> * @return The bucketDuration. */ com.google.protobuf.Duration getBucketDuration(); /** * <code>.google.protobuf.Duration bucket_duration = 2 [json_name = "bucketDuration"];</code> */ com.google.protobuf.DurationOrBuilder getBucketDurationOrBuilder(); /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return A list containing the dependentFeatures. */ java.util.List<java.lang.String> getDependentFeaturesList(); /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @return The count of dependentFeatures. */ int getDependentFeaturesCount(); /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index of the element to return. * @return The dependentFeatures at the given index. */ java.lang.String getDependentFeatures(int index); /** * <pre> * The features which depend on this rule. * </pre> * * <code>repeated string dependent_features = 3 [json_name = "dependentFeatures"];</code> * @param index The index of the value to return. * @return The bytes of the dependentFeatures at the given index. */ com.google.protobuf.ByteString getDependentFeaturesBytes(int index); /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> * @return Whether the retention field is set. */ boolean hasRetention(); /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> * @return The retention. */ com.google.protobuf.Duration getRetention(); /** * <code>.google.protobuf.Duration retention = 4 [json_name = "retention"];</code> */ com.google.protobuf.DurationOrBuilder getRetentionOrBuilder(); /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return The datetimeFeature. */ java.lang.String getDatetimeFeature(); /** * <code>string datetime_feature = 5 [json_name = "datetimeFeature"];</code> * @return The bytes for datetimeFeature. */ com.google.protobuf.ByteString getDatetimeFeatureBytes(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/BackfillProto.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/backfill.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public final class BackfillProto { private BackfillProto() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } static final com.google.protobuf.Descriptors.Descriptor internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_chalk_aggregate_v1_AggregateBackfill_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_chalk_aggregate_v1_AggregateBackfill_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_chalk_aggregate_v1_AggregateBackfillJob_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_chalk_aggregate_v1_AggregateBackfillJob_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!chalk/aggregate/v1/backfill.proto\022\022cha" + "lk.aggregate.v1\032#chalk/aggregate/v1/time" + "series.proto\032\036google/protobuf/duration.p" + "roto\032\037google/protobuf/timestamp.proto\"\214\002" + "\n\035AggregateBackfillCostEstimate\022\037\n\013max_b" + "uckets\030\001 \001(\003R\nmaxBuckets\022)\n\020expected_buc" + "kets\030\002 \001(\003R\017expectedBuckets\022%\n\016expected_" + "bytes\030\003 \001(\003R\rexpectedBytes\0222\n\025expected_s" + "torage_cost\030\004 \001(\001R\023expectedStorageCost\022D" + "\n\020expected_runtime\030\005 \001(\0132\031.google.protob" + "uf.DurationR\017expectedRuntime\"\370\002\n\033Aggrega" + "teBackfillUserParams\022\032\n\010features\030\001 \003(\tR\010" + "features\022\037\n\010resolver\030\002 \001(\tH\000R\010resolver\210\001" + "\001\022;\n\025timestamp_column_name\030\003 \001(\tB\002\030\001H\001R\023" + "timestampColumnName\210\001\001\022@\n\013lower_bound\030\004 " + "\001(\0132\032.google.protobuf.TimestampH\002R\nlower" + "Bound\210\001\001\022@\n\013upper_bound\030\005 \001(\0132\032.google.p" + "rotobuf.TimestampH\003R\nupperBound\210\001\001\022\024\n\005ex" + "act\030\006 \001(\010R\005exactB\013\n\t_resolverB\030\n\026_timest" + "amp_column_nameB\016\n\014_lower_boundB\016\n\014_uppe" + "r_bound\"\345\003\n\021AggregateBackfill\022?\n\006series\030" + "\001 \003(\0132\'.chalk.aggregate.v1.AggregateTime" + "SeriesR\006series\022\032\n\010resolver\030\002 \001(\tR\010resolv" + "er\022)\n\020datetime_feature\030\003 \001(\tR\017datetimeFe" + "ature\022B\n\017bucket_duration\030\004 \001(\0132\031.google." + "protobuf.DurationR\016bucketDuration\022/\n\023fil" + "ters_description\030\005 \001(\tR\022filtersDescripti" + "on\022\031\n\010group_by\030\006 \003(\tR\007groupBy\022>\n\rmax_ret" + "ention\030\007 \001(\0132\031.google.protobuf.DurationR" + "\014maxRetention\022;\n\013lower_bound\030\010 \001(\0132\032.goo" + "gle.protobuf.TimestampR\nlowerBound\022;\n\013up" + "per_bound\030\t \001(\0132\032.google.protobuf.Timest" + "ampR\nupperBound\"\265\001\n!AggregateBackfillWit" + "hCostEstimate\022A\n\010backfill\030\001 \001(\0132%.chalk." + "aggregate.v1.AggregateBackfillR\010backfill" + "\022M\n\010estimate\030\002 \001(\01321.chalk.aggregate.v1." + "AggregateBackfillCostEstimateR\010estimate\"" + "\224\003\n\024AggregateBackfillJob\022\016\n\002id\030\001 \001(\tR\002id" + "\022%\n\016environment_id\030\002 \001(\tR\renvironmentId\022" + "\037\n\010resolver\030\003 \001(\tH\000R\010resolver\210\001\001\022\032\n\010feat" + "ures\030\004 \003(\tR\010features\022\036\n\010agent_id\030\005 \001(\tH\001" + "R\007agentId\210\001\001\022(\n\rdeployment_id\030\006 \001(\tH\002R\014d" + "eploymentId\210\001\001\0229\n\ncreated_at\030\007 \001(\0132\032.goo" + "gle.protobuf.TimestampR\tcreatedAt\0229\n\nupd" + "ated_at\030\010 \001(\0132\032.google.protobuf.Timestam" + "pR\tupdatedAt\022\034\n\tresolvers\030\t \003(\tR\tresolve" + "rsB\013\n\t_resolverB\013\n\t_agent_idB\020\n\016_deploym" + "ent_idB\267\001\n\"ai.chalk.protos.chalk.aggrega" + "te.v1B\rBackfillProtoP\001Z\030aggregate/v1;agg" + "regatev1\242\002\003CAX\252\002\022Chalk.Aggregate.V1\312\002\022Ch" + "alk\\Aggregate\\V1\342\002\036Chalk\\Aggregate\\V1\\GP" + "BMetadata\352\002\024Chalk::Aggregate::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_chalk_aggregate_v1_AggregateBackfillCostEstimate_descriptor, new java.lang.String[] { "MaxBuckets", "ExpectedBuckets", "ExpectedBytes", "ExpectedStorageCost", "ExpectedRuntime", }); internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_chalk_aggregate_v1_AggregateBackfillUserParams_descriptor, new java.lang.String[] { "Features", "Resolver", "TimestampColumnName", "LowerBound", "UpperBound", "Exact", }); internal_static_chalk_aggregate_v1_AggregateBackfill_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_chalk_aggregate_v1_AggregateBackfill_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_chalk_aggregate_v1_AggregateBackfill_descriptor, new java.lang.String[] { "Series", "Resolver", "DatetimeFeature", "BucketDuration", "FiltersDescription", "GroupBy", "MaxRetention", "LowerBound", "UpperBound", }); internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_chalk_aggregate_v1_AggregateBackfillWithCostEstimate_descriptor, new java.lang.String[] { "Backfill", "Estimate", }); internal_static_chalk_aggregate_v1_AggregateBackfillJob_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_chalk_aggregate_v1_AggregateBackfillJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_chalk_aggregate_v1_AggregateBackfillJob_descriptor, new java.lang.String[] { "Id", "EnvironmentId", "Resolver", "Features", "AgentId", "DeploymentId", "CreatedAt", "UpdatedAt", "Resolvers", }); ai.chalk.protos.chalk.aggregate.v1.TimeseriesProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.GetAggregateBackfillJobRequest} */ public final class GetAggregateBackfillJobRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.GetAggregateBackfillJobRequest) GetAggregateBackfillJobRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetAggregateBackfillJobRequest.newBuilder() to construct. private GetAggregateBackfillJobRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetAggregateBackfillJobRequest() { aggregateBackfillId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAggregateBackfillJobRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.Builder.class); } public static final int AGGREGATE_BACKFILL_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object aggregateBackfillId_ = ""; /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return The aggregateBackfillId. */ @java.lang.Override public java.lang.String getAggregateBackfillId() { java.lang.Object ref = aggregateBackfillId_; 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(); aggregateBackfillId_ = s; return s; } } /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return The bytes for aggregateBackfillId. */ @java.lang.Override public com.google.protobuf.ByteString getAggregateBackfillIdBytes() { java.lang.Object ref = aggregateBackfillId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregateBackfillId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregateBackfillId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, aggregateBackfillId_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregateBackfillId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, aggregateBackfillId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest other = (ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest) obj; if (!getAggregateBackfillId() .equals(other.getAggregateBackfillId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + AGGREGATE_BACKFILL_ID_FIELD_NUMBER; hash = (53 * hash) + getAggregateBackfillId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest 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(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest 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 chalk.aggregate.v1.GetAggregateBackfillJobRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.GetAggregateBackfillJobRequest) ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; aggregateBackfillId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobRequest_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest build() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest buildPartial() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest result = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.aggregateBackfillId_ = aggregateBackfillId_; } } @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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest other) { if (other == ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest.getDefaultInstance()) return this; if (!other.getAggregateBackfillId().isEmpty()) { aggregateBackfillId_ = other.aggregateBackfillId_; bitField0_ |= 0x00000001; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { aggregateBackfillId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object aggregateBackfillId_ = ""; /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return The aggregateBackfillId. */ public java.lang.String getAggregateBackfillId() { java.lang.Object ref = aggregateBackfillId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); aggregateBackfillId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return The bytes for aggregateBackfillId. */ public com.google.protobuf.ByteString getAggregateBackfillIdBytes() { java.lang.Object ref = aggregateBackfillId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregateBackfillId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @param value The aggregateBackfillId to set. * @return This builder for chaining. */ public Builder setAggregateBackfillId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } aggregateBackfillId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return This builder for chaining. */ public Builder clearAggregateBackfillId() { aggregateBackfillId_ = getDefaultInstance().getAggregateBackfillId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @param value The bytes for aggregateBackfillId to set. * @return This builder for chaining. */ public Builder setAggregateBackfillIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); aggregateBackfillId_ = value; bitField0_ |= 0x00000001; 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:chalk.aggregate.v1.GetAggregateBackfillJobRequest) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.GetAggregateBackfillJobRequest) private static final ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest(); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetAggregateBackfillJobRequest> PARSER = new com.google.protobuf.AbstractParser<GetAggregateBackfillJobRequest>() { @java.lang.Override public GetAggregateBackfillJobRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetAggregateBackfillJobRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetAggregateBackfillJobRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface GetAggregateBackfillJobRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.GetAggregateBackfillJobRequest) com.google.protobuf.MessageOrBuilder { /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return The aggregateBackfillId. */ java.lang.String getAggregateBackfillId(); /** * <code>string aggregate_backfill_id = 1 [json_name = "aggregateBackfillId"];</code> * @return The bytes for aggregateBackfillId. */ com.google.protobuf.ByteString getAggregateBackfillIdBytes(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.GetAggregateBackfillJobResponse} */ public final class GetAggregateBackfillJobResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.GetAggregateBackfillJobResponse) GetAggregateBackfillJobResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetAggregateBackfillJobResponse.newBuilder() to construct. private GetAggregateBackfillJobResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetAggregateBackfillJobResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAggregateBackfillJobResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.Builder.class); } private int bitField0_; public static final int JOB_FIELD_NUMBER = 1; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob job_; /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> * @return Whether the job field is set. */ @java.lang.Override public boolean hasJob() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> * @return The job. */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getJob() { return job_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance() : job_; } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder getJobOrBuilder() { return job_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance() : job_; } 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.writeMessage(1, getJob()); } getUnknownFields().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, getJob()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse other = (ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse) obj; if (hasJob() != other.hasJob()) return false; if (hasJob()) { if (!getJob() .equals(other.getJob())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasJob()) { hash = (37 * hash) + JOB_FIELD_NUMBER; hash = (53 * hash) + getJob().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse 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(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse 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 chalk.aggregate.v1.GetAggregateBackfillJobResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.GetAggregateBackfillJobResponse) ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getJobFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; job_ = null; if (jobBuilder_ != null) { jobBuilder_.dispose(); jobBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobResponse_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse build() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse buildPartial() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse result = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.job_ = jobBuilder_ == null ? job_ : jobBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse other) { if (other == ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse.getDefaultInstance()) return this; if (other.hasJob()) { mergeJob(other.getJob()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getJobFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob job_; private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> jobBuilder_; /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> * @return Whether the job field is set. */ public boolean hasJob() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> * @return The job. */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getJob() { if (jobBuilder_ == null) { return job_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance() : job_; } else { return jobBuilder_.getMessage(); } } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ public Builder setJob(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob value) { if (jobBuilder_ == null) { if (value == null) { throw new NullPointerException(); } job_ = value; } else { jobBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ public Builder setJob( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder builderForValue) { if (jobBuilder_ == null) { job_ = builderForValue.build(); } else { jobBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ public Builder mergeJob(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob value) { if (jobBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && job_ != null && job_ != ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance()) { getJobBuilder().mergeFrom(value); } else { job_ = value; } } else { jobBuilder_.mergeFrom(value); } if (job_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ public Builder clearJob() { bitField0_ = (bitField0_ & ~0x00000001); job_ = null; if (jobBuilder_ != null) { jobBuilder_.dispose(); jobBuilder_ = null; } onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder getJobBuilder() { bitField0_ |= 0x00000001; onChanged(); return getJobFieldBuilder().getBuilder(); } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder getJobOrBuilder() { if (jobBuilder_ != null) { return jobBuilder_.getMessageOrBuilder(); } else { return job_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance() : job_; } } /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> getJobFieldBuilder() { if (jobBuilder_ == null) { jobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder>( getJob(), getParentForChildren(), isClean()); job_ = null; } return jobBuilder_; } @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:chalk.aggregate.v1.GetAggregateBackfillJobResponse) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.GetAggregateBackfillJobResponse) private static final ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse(); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetAggregateBackfillJobResponse> PARSER = new com.google.protobuf.AbstractParser<GetAggregateBackfillJobResponse>() { @java.lang.Override public GetAggregateBackfillJobResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetAggregateBackfillJobResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetAggregateBackfillJobResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface GetAggregateBackfillJobResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.GetAggregateBackfillJobResponse) com.google.protobuf.MessageOrBuilder { /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> * @return Whether the job field is set. */ boolean hasJob(); /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> * @return The job. */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getJob(); /** * <code>.chalk.aggregate.v1.AggregateBackfillJob job = 1 [json_name = "job"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder getJobOrBuilder(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobsRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.GetAggregateBackfillJobsRequest} */ public final class GetAggregateBackfillJobsRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.GetAggregateBackfillJobsRequest) GetAggregateBackfillJobsRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetAggregateBackfillJobsRequest.newBuilder() to construct. private GetAggregateBackfillJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetAggregateBackfillJobsRequest() { cursor_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAggregateBackfillJobsRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.Builder.class); } public static final int LIMIT_FIELD_NUMBER = 1; private int limit_ = 0; /** * <code>int32 limit = 1 [json_name = "limit"];</code> * @return The limit. */ @java.lang.Override public int getLimit() { return limit_; } public static final int CURSOR_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object cursor_ = ""; /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The cursor. */ @java.lang.Override public java.lang.String getCursor() { java.lang.Object ref = cursor_; 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(); cursor_ = s; return s; } } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The bytes for cursor. */ @java.lang.Override public com.google.protobuf.ByteString getCursorBytes() { java.lang.Object ref = cursor_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cursor_ = 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 (limit_ != 0) { output.writeInt32(1, limit_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cursor_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (limit_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, limit_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cursor_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest other = (ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest) obj; if (getLimit() != other.getLimit()) return false; if (!getCursor() .equals(other.getCursor())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + getLimit(); hash = (37 * hash) + CURSOR_FIELD_NUMBER; hash = (53 * hash) + getCursor().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest 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(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest 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 chalk.aggregate.v1.GetAggregateBackfillJobsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.GetAggregateBackfillJobsRequest) ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; limit_ = 0; cursor_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsRequest_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest build() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest buildPartial() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest result = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.limit_ = limit_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.cursor_ = cursor_; } } @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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest other) { if (other == ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest.getDefaultInstance()) return this; if (other.getLimit() != 0) { setLimit(other.getLimit()); } if (!other.getCursor().isEmpty()) { cursor_ = other.cursor_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { limit_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { cursor_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int limit_ ; /** * <code>int32 limit = 1 [json_name = "limit"];</code> * @return The limit. */ @java.lang.Override public int getLimit() { return limit_; } /** * <code>int32 limit = 1 [json_name = "limit"];</code> * @param value The limit to set. * @return This builder for chaining. */ public Builder setLimit(int value) { limit_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>int32 limit = 1 [json_name = "limit"];</code> * @return This builder for chaining. */ public Builder clearLimit() { bitField0_ = (bitField0_ & ~0x00000001); limit_ = 0; onChanged(); return this; } private java.lang.Object cursor_ = ""; /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The cursor. */ public java.lang.String getCursor() { java.lang.Object ref = cursor_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cursor_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The bytes for cursor. */ public com.google.protobuf.ByteString getCursorBytes() { java.lang.Object ref = cursor_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cursor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @param value The cursor to set. * @return This builder for chaining. */ public Builder setCursor( java.lang.String value) { if (value == null) { throw new NullPointerException(); } cursor_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return This builder for chaining. */ public Builder clearCursor() { cursor_ = getDefaultInstance().getCursor(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @param value The bytes for cursor to set. * @return This builder for chaining. */ public Builder setCursorBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); cursor_ = value; bitField0_ |= 0x00000002; 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:chalk.aggregate.v1.GetAggregateBackfillJobsRequest) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.GetAggregateBackfillJobsRequest) private static final ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest(); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetAggregateBackfillJobsRequest> PARSER = new com.google.protobuf.AbstractParser<GetAggregateBackfillJobsRequest>() { @java.lang.Override public GetAggregateBackfillJobsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetAggregateBackfillJobsRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetAggregateBackfillJobsRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobsRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface GetAggregateBackfillJobsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.GetAggregateBackfillJobsRequest) com.google.protobuf.MessageOrBuilder { /** * <code>int32 limit = 1 [json_name = "limit"];</code> * @return The limit. */ int getLimit(); /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The cursor. */ java.lang.String getCursor(); /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The bytes for cursor. */ com.google.protobuf.ByteString getCursorBytes(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobsResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.GetAggregateBackfillJobsResponse} */ public final class GetAggregateBackfillJobsResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.GetAggregateBackfillJobsResponse) GetAggregateBackfillJobsResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetAggregateBackfillJobsResponse.newBuilder() to construct. private GetAggregateBackfillJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetAggregateBackfillJobsResponse() { jobs_ = java.util.Collections.emptyList(); cursor_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAggregateBackfillJobsResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.Builder.class); } public static final int JOBS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob> jobs_; /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ @java.lang.Override public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob> getJobsList() { return jobs_; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ @java.lang.Override public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> getJobsOrBuilderList() { return jobs_; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ @java.lang.Override public int getJobsCount() { return jobs_.size(); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getJobs(int index) { return jobs_.get(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder getJobsOrBuilder( int index) { return jobs_.get(index); } public static final int CURSOR_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object cursor_ = ""; /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The cursor. */ @java.lang.Override public java.lang.String getCursor() { java.lang.Object ref = cursor_; 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(); cursor_ = s; return s; } } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The bytes for cursor. */ @java.lang.Override public com.google.protobuf.ByteString getCursorBytes() { java.lang.Object ref = cursor_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cursor_ = 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 { for (int i = 0; i < jobs_.size(); i++) { output.writeMessage(1, jobs_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cursor_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < jobs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, jobs_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cursor_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse other = (ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse) obj; if (!getJobsList() .equals(other.getJobsList())) return false; if (!getCursor() .equals(other.getCursor())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getJobsCount() > 0) { hash = (37 * hash) + JOBS_FIELD_NUMBER; hash = (53 * hash) + getJobsList().hashCode(); } hash = (37 * hash) + CURSOR_FIELD_NUMBER; hash = (53 * hash) + getCursor().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse 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(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse 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 chalk.aggregate.v1.GetAggregateBackfillJobsResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.GetAggregateBackfillJobsResponse) ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (jobsBuilder_ == null) { jobs_ = java.util.Collections.emptyList(); } else { jobs_ = null; jobsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); cursor_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregateBackfillJobsResponse_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse build() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse buildPartial() { ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse result = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse result) { if (jobsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { jobs_ = java.util.Collections.unmodifiableList(jobs_); bitField0_ = (bitField0_ & ~0x00000001); } result.jobs_ = jobs_; } else { result.jobs_ = jobsBuilder_.build(); } } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { result.cursor_ = cursor_; } } @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 ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse other) { if (other == ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse.getDefaultInstance()) return this; if (jobsBuilder_ == null) { if (!other.jobs_.isEmpty()) { if (jobs_.isEmpty()) { jobs_ = other.jobs_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureJobsIsMutable(); jobs_.addAll(other.jobs_); } onChanged(); } } else { if (!other.jobs_.isEmpty()) { if (jobsBuilder_.isEmpty()) { jobsBuilder_.dispose(); jobsBuilder_ = null; jobs_ = other.jobs_; bitField0_ = (bitField0_ & ~0x00000001); jobsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getJobsFieldBuilder() : null; } else { jobsBuilder_.addAllMessages(other.jobs_); } } } if (!other.getCursor().isEmpty()) { cursor_ = other.cursor_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob m = input.readMessage( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.parser(), extensionRegistry); if (jobsBuilder_ == null) { ensureJobsIsMutable(); jobs_.add(m); } else { jobsBuilder_.addMessage(m); } break; } // case 10 case 18: { cursor_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob> jobs_ = java.util.Collections.emptyList(); private void ensureJobsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { jobs_ = new java.util.ArrayList<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob>(jobs_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> jobsBuilder_; /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob> getJobsList() { if (jobsBuilder_ == null) { return java.util.Collections.unmodifiableList(jobs_); } else { return jobsBuilder_.getMessageList(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public int getJobsCount() { if (jobsBuilder_ == null) { return jobs_.size(); } else { return jobsBuilder_.getCount(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getJobs(int index) { if (jobsBuilder_ == null) { return jobs_.get(index); } else { return jobsBuilder_.getMessage(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder setJobs( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob value) { if (jobsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureJobsIsMutable(); jobs_.set(index, value); onChanged(); } else { jobsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder setJobs( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder builderForValue) { if (jobsBuilder_ == null) { ensureJobsIsMutable(); jobs_.set(index, builderForValue.build()); onChanged(); } else { jobsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder addJobs(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob value) { if (jobsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureJobsIsMutable(); jobs_.add(value); onChanged(); } else { jobsBuilder_.addMessage(value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder addJobs( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob value) { if (jobsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureJobsIsMutable(); jobs_.add(index, value); onChanged(); } else { jobsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder addJobs( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder builderForValue) { if (jobsBuilder_ == null) { ensureJobsIsMutable(); jobs_.add(builderForValue.build()); onChanged(); } else { jobsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder addJobs( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder builderForValue) { if (jobsBuilder_ == null) { ensureJobsIsMutable(); jobs_.add(index, builderForValue.build()); onChanged(); } else { jobsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder addAllJobs( java.lang.Iterable<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob> values) { if (jobsBuilder_ == null) { ensureJobsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, jobs_); onChanged(); } else { jobsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder clearJobs() { if (jobsBuilder_ == null) { jobs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { jobsBuilder_.clear(); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public Builder removeJobs(int index) { if (jobsBuilder_ == null) { ensureJobsIsMutable(); jobs_.remove(index); onChanged(); } else { jobsBuilder_.remove(index); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder getJobsBuilder( int index) { return getJobsFieldBuilder().getBuilder(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder getJobsOrBuilder( int index) { if (jobsBuilder_ == null) { return jobs_.get(index); } else { return jobsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> getJobsOrBuilderList() { if (jobsBuilder_ != null) { return jobsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(jobs_); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder addJobsBuilder() { return getJobsFieldBuilder().addBuilder( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder addJobsBuilder( int index) { return getJobsFieldBuilder().addBuilder( index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder> getJobsBuilderList() { return getJobsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> getJobsFieldBuilder() { if (jobsBuilder_ == null) { jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder>( jobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); jobs_ = null; } return jobsBuilder_; } private java.lang.Object cursor_ = ""; /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The cursor. */ public java.lang.String getCursor() { java.lang.Object ref = cursor_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cursor_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The bytes for cursor. */ public com.google.protobuf.ByteString getCursorBytes() { java.lang.Object ref = cursor_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cursor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @param value The cursor to set. * @return This builder for chaining. */ public Builder setCursor( java.lang.String value) { if (value == null) { throw new NullPointerException(); } cursor_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return This builder for chaining. */ public Builder clearCursor() { cursor_ = getDefaultInstance().getCursor(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @param value The bytes for cursor to set. * @return This builder for chaining. */ public Builder setCursorBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); cursor_ = value; bitField0_ |= 0x00000002; 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:chalk.aggregate.v1.GetAggregateBackfillJobsResponse) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.GetAggregateBackfillJobsResponse) private static final ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse(); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetAggregateBackfillJobsResponse> PARSER = new com.google.protobuf.AbstractParser<GetAggregateBackfillJobsResponse>() { @java.lang.Override public GetAggregateBackfillJobsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetAggregateBackfillJobsResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetAggregateBackfillJobsResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregateBackfillJobsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregateBackfillJobsResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface GetAggregateBackfillJobsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.GetAggregateBackfillJobsResponse) com.google.protobuf.MessageOrBuilder { /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob> getJobsList(); /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJob getJobs(int index); /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ int getJobsCount(); /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder> getJobsOrBuilderList(); /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillJob jobs = 1 [json_name = "jobs"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillJobOrBuilder getJobsOrBuilder( int index); /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The cursor. */ java.lang.String getCursor(); /** * <code>string cursor = 2 [json_name = "cursor"];</code> * @return The bytes for cursor. */ com.google.protobuf.ByteString getCursorBytes(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregatesRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.GetAggregatesRequest} */ public final class GetAggregatesRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.GetAggregatesRequest) GetAggregatesRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetAggregatesRequest.newBuilder() to construct. private GetAggregatesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetAggregatesRequest() { forFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAggregatesRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.Builder.class); } public static final int FOR_FEATURES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList forFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return A list containing the forFeatures. */ public com.google.protobuf.ProtocolStringList getForFeaturesList() { return forFeatures_; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return The count of forFeatures. */ public int getForFeaturesCount() { return forFeatures_.size(); } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index of the element to return. * @return The forFeatures at the given index. */ public java.lang.String getForFeatures(int index) { return forFeatures_.get(index); } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index of the value to return. * @return The bytes of the forFeatures at the given index. */ public com.google.protobuf.ByteString getForFeaturesBytes(int index) { return forFeatures_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < forFeatures_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, forFeatures_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < forFeatures_.size(); i++) { dataSize += computeStringSizeNoTag(forFeatures_.getRaw(i)); } size += dataSize; size += 1 * getForFeaturesList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest other = (ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest) obj; if (!getForFeaturesList() .equals(other.getForFeaturesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getForFeaturesCount() > 0) { hash = (37 * hash) + FOR_FEATURES_FIELD_NUMBER; hash = (53 * hash) + getForFeaturesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest 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(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest 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 chalk.aggregate.v1.GetAggregatesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.GetAggregatesRequest) ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; forFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesRequest_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest build() { ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest buildPartial() { ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest result = new ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { forFeatures_.makeImmutable(); result.forFeatures_ = forFeatures_; } } @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 ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest other) { if (other == ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest.getDefaultInstance()) return this; if (!other.forFeatures_.isEmpty()) { if (forFeatures_.isEmpty()) { forFeatures_ = other.forFeatures_; bitField0_ |= 0x00000001; } else { ensureForFeaturesIsMutable(); forFeatures_.addAll(other.forFeatures_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); ensureForFeaturesIsMutable(); forFeatures_.add(s); break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.LazyStringArrayList forFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureForFeaturesIsMutable() { if (!forFeatures_.isModifiable()) { forFeatures_ = new com.google.protobuf.LazyStringArrayList(forFeatures_); } bitField0_ |= 0x00000001; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return A list containing the forFeatures. */ public com.google.protobuf.ProtocolStringList getForFeaturesList() { forFeatures_.makeImmutable(); return forFeatures_; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return The count of forFeatures. */ public int getForFeaturesCount() { return forFeatures_.size(); } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index of the element to return. * @return The forFeatures at the given index. */ public java.lang.String getForFeatures(int index) { return forFeatures_.get(index); } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index of the value to return. * @return The bytes of the forFeatures at the given index. */ public com.google.protobuf.ByteString getForFeaturesBytes(int index) { return forFeatures_.getByteString(index); } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index to set the value at. * @param value The forFeatures to set. * @return This builder for chaining. */ public Builder setForFeatures( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureForFeaturesIsMutable(); forFeatures_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param value The forFeatures to add. * @return This builder for chaining. */ public Builder addForFeatures( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureForFeaturesIsMutable(); forFeatures_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param values The forFeatures to add. * @return This builder for chaining. */ public Builder addAllForFeatures( java.lang.Iterable<java.lang.String> values) { ensureForFeaturesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, forFeatures_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return This builder for chaining. */ public Builder clearForFeatures() { forFeatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001);; onChanged(); return this; } /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param value The bytes of the forFeatures to add. * @return This builder for chaining. */ public Builder addForFeaturesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureForFeaturesIsMutable(); forFeatures_.add(value); bitField0_ |= 0x00000001; 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:chalk.aggregate.v1.GetAggregatesRequest) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.GetAggregatesRequest) private static final ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest(); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetAggregatesRequest> PARSER = new com.google.protobuf.AbstractParser<GetAggregatesRequest>() { @java.lang.Override public GetAggregatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetAggregatesRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetAggregatesRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregatesRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface GetAggregatesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.GetAggregatesRequest) com.google.protobuf.MessageOrBuilder { /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return A list containing the forFeatures. */ java.util.List<java.lang.String> getForFeaturesList(); /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @return The count of forFeatures. */ int getForFeaturesCount(); /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index of the element to return. * @return The forFeatures at the given index. */ java.lang.String getForFeatures(int index); /** * <code>repeated string for_features = 1 [json_name = "forFeatures"];</code> * @param index The index of the value to return. * @return The bytes of the forFeatures at the given index. */ com.google.protobuf.ByteString getForFeaturesBytes(int index); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregatesResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.GetAggregatesResponse} */ public final class GetAggregatesResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.GetAggregatesResponse) GetAggregatesResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetAggregatesResponse.newBuilder() to construct. private GetAggregatesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetAggregatesResponse() { series_ = java.util.Collections.emptyList(); errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAggregatesResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.Builder.class); } public static final int SERIES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> series_; /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> getSeriesList() { return series_; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesOrBuilderList() { return series_; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public int getSeriesCount() { return series_.size(); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getSeries(int index) { return series_.get(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder getSeriesOrBuilder( int index) { return series_.get(index); } public static final int ERRORS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return A list containing the errors. */ public com.google.protobuf.ProtocolStringList getErrorsList() { return errors_; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return The count of errors. */ public int getErrorsCount() { return errors_.size(); } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index of the element to return. * @return The errors at the given index. */ public java.lang.String getErrors(int index) { return errors_.get(index); } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index of the value to return. * @return The bytes of the errors at the given index. */ public com.google.protobuf.ByteString getErrorsBytes(int index) { return errors_.getByteString(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < series_.size(); i++) { output.writeMessage(1, series_.get(i)); } for (int i = 0; i < errors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errors_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < series_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, series_.get(i)); } { int dataSize = 0; for (int i = 0; i < errors_.size(); i++) { dataSize += computeStringSizeNoTag(errors_.getRaw(i)); } size += dataSize; size += 1 * getErrorsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse other = (ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse) obj; if (!getSeriesList() .equals(other.getSeriesList())) return false; if (!getErrorsList() .equals(other.getErrorsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getSeriesCount() > 0) { hash = (37 * hash) + SERIES_FIELD_NUMBER; hash = (53 * hash) + getSeriesList().hashCode(); } if (getErrorsCount() > 0) { hash = (37 * hash) + ERRORS_FIELD_NUMBER; hash = (53 * hash) + getErrorsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse 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 ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse 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(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse 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 chalk.aggregate.v1.GetAggregatesResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.GetAggregatesResponse) ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.class, ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (seriesBuilder_ == null) { series_ = java.util.Collections.emptyList(); } else { series_ = null; seriesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_GetAggregatesResponse_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse build() { ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse buildPartial() { ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse result = new ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse result) { if (seriesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { series_ = java.util.Collections.unmodifiableList(series_); bitField0_ = (bitField0_ & ~0x00000001); } result.series_ = series_; } else { result.series_ = seriesBuilder_.build(); } } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { errors_.makeImmutable(); result.errors_ = errors_; } } @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 ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse other) { if (other == ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse.getDefaultInstance()) return this; if (seriesBuilder_ == null) { if (!other.series_.isEmpty()) { if (series_.isEmpty()) { series_ = other.series_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSeriesIsMutable(); series_.addAll(other.series_); } onChanged(); } } else { if (!other.series_.isEmpty()) { if (seriesBuilder_.isEmpty()) { seriesBuilder_.dispose(); seriesBuilder_ = null; series_ = other.series_; bitField0_ = (bitField0_ & ~0x00000001); seriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSeriesFieldBuilder() : null; } else { seriesBuilder_.addAllMessages(other.series_); } } } if (!other.errors_.isEmpty()) { if (errors_.isEmpty()) { errors_ = other.errors_; bitField0_ |= 0x00000002; } else { ensureErrorsIsMutable(); errors_.addAll(other.errors_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries m = input.readMessage( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.parser(), extensionRegistry); if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.add(m); } else { seriesBuilder_.addMessage(m); } break; } // case 10 case 18: { java.lang.String s = input.readStringRequireUtf8(); ensureErrorsIsMutable(); errors_.add(s); break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> series_ = java.util.Collections.emptyList(); private void ensureSeriesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { series_ = new java.util.ArrayList<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries>(series_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> seriesBuilder_; /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> getSeriesList() { if (seriesBuilder_ == null) { return java.util.Collections.unmodifiableList(series_); } else { return seriesBuilder_.getMessageList(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public int getSeriesCount() { if (seriesBuilder_ == null) { return series_.size(); } else { return seriesBuilder_.getCount(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getSeries(int index) { if (seriesBuilder_ == null) { return series_.get(index); } else { return seriesBuilder_.getMessage(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder setSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries value) { if (seriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSeriesIsMutable(); series_.set(index, value); onChanged(); } else { seriesBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder setSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder builderForValue) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.set(index, builderForValue.build()); onChanged(); } else { seriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries(ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries value) { if (seriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSeriesIsMutable(); series_.add(value); onChanged(); } else { seriesBuilder_.addMessage(value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries value) { if (seriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSeriesIsMutable(); series_.add(index, value); onChanged(); } else { seriesBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder builderForValue) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.add(builderForValue.build()); onChanged(); } else { seriesBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addSeries( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder builderForValue) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.add(index, builderForValue.build()); onChanged(); } else { seriesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder addAllSeries( java.lang.Iterable<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> values) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, series_); onChanged(); } else { seriesBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder clearSeries() { if (seriesBuilder_ == null) { series_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { seriesBuilder_.clear(); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public Builder removeSeries(int index) { if (seriesBuilder_ == null) { ensureSeriesIsMutable(); series_.remove(index); onChanged(); } else { seriesBuilder_.remove(index); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder getSeriesBuilder( int index) { return getSeriesFieldBuilder().getBuilder(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder getSeriesOrBuilder( int index) { if (seriesBuilder_ == null) { return series_.get(index); } else { return seriesBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesOrBuilderList() { if (seriesBuilder_ != null) { return seriesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(series_); } } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder addSeriesBuilder() { return getSeriesFieldBuilder().addBuilder( ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder addSeriesBuilder( int index) { return getSeriesFieldBuilder().addBuilder( index, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder> getSeriesBuilderList() { return getSeriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesFieldBuilder() { if (seriesBuilder_ == null) { seriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder>( series_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); series_ = null; } return seriesBuilder_; } private com.google.protobuf.LazyStringArrayList errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureErrorsIsMutable() { if (!errors_.isModifiable()) { errors_ = new com.google.protobuf.LazyStringArrayList(errors_); } bitField0_ |= 0x00000002; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return A list containing the errors. */ public com.google.protobuf.ProtocolStringList getErrorsList() { errors_.makeImmutable(); return errors_; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return The count of errors. */ public int getErrorsCount() { return errors_.size(); } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index of the element to return. * @return The errors at the given index. */ public java.lang.String getErrors(int index) { return errors_.get(index); } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index of the value to return. * @return The bytes of the errors at the given index. */ public com.google.protobuf.ByteString getErrorsBytes(int index) { return errors_.getByteString(index); } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index to set the value at. * @param value The errors to set. * @return This builder for chaining. */ public Builder setErrors( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param value The errors to add. * @return This builder for chaining. */ public Builder addErrors( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param values The errors to add. * @return This builder for chaining. */ public Builder addAllErrors( java.lang.Iterable<java.lang.String> values) { ensureErrorsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, errors_); bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return This builder for chaining. */ public Builder clearErrors() { errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002);; onChanged(); return this; } /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param value The bytes of the errors to add. * @return This builder for chaining. */ public Builder addErrorsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureErrorsIsMutable(); errors_.add(value); bitField0_ |= 0x00000002; 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:chalk.aggregate.v1.GetAggregatesResponse) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.GetAggregatesResponse) private static final ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse(); } public static ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetAggregatesResponse> PARSER = new com.google.protobuf.AbstractParser<GetAggregatesResponse>() { @java.lang.Override public GetAggregatesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetAggregatesResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetAggregatesResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.GetAggregatesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/GetAggregatesResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface GetAggregatesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.GetAggregatesResponse) com.google.protobuf.MessageOrBuilder { /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries> getSeriesList(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeries getSeries(int index); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ int getSeriesCount(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder> getSeriesOrBuilderList(); /** * <code>repeated .chalk.aggregate.v1.AggregateTimeSeries series = 1 [json_name = "series"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateTimeSeriesOrBuilder getSeriesOrBuilder( int index); /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return A list containing the errors. */ java.util.List<java.lang.String> getErrorsList(); /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @return The count of errors. */ int getErrorsCount(); /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index of the element to return. * @return The errors at the given index. */ java.lang.String getErrors(int index); /** * <code>repeated string errors = 2 [json_name = "errors"];</code> * @param index The index of the value to return. * @return The bytes of the errors at the given index. */ com.google.protobuf.ByteString getErrorsBytes(int index); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/PlanAggregateBackfillRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.PlanAggregateBackfillRequest} */ public final class PlanAggregateBackfillRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.PlanAggregateBackfillRequest) PlanAggregateBackfillRequestOrBuilder { private static final long serialVersionUID = 0L; // Use PlanAggregateBackfillRequest.newBuilder() to construct. private PlanAggregateBackfillRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private PlanAggregateBackfillRequest() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PlanAggregateBackfillRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.class, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.Builder.class); } private int bitField0_; public static final int PARAMS_FIELD_NUMBER = 1; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams params_; /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> * @return Whether the params field is set. */ @java.lang.Override public boolean hasParams() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> * @return The params. */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams getParams() { return params_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance() : params_; } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder getParamsOrBuilder() { return params_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance() : params_; } 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.writeMessage(1, getParams()); } getUnknownFields().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, getParams()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest other = (ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest) obj; if (hasParams() != other.hasParams()) return false; if (hasParams()) { if (!getParams() .equals(other.getParams())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasParams()) { hash = (37 * hash) + PARAMS_FIELD_NUMBER; hash = (53 * hash) + getParams().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest 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 ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest 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 ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest 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(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest 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 chalk.aggregate.v1.PlanAggregateBackfillRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.PlanAggregateBackfillRequest) ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.class, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getParamsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; params_ = null; if (paramsBuilder_ != null) { paramsBuilder_.dispose(); paramsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillRequest_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest build() { ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest buildPartial() { ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest result = new ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.params_ = paramsBuilder_ == null ? params_ : paramsBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest other) { if (other == ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest.getDefaultInstance()) return this; if (other.hasParams()) { mergeParams(other.getParams()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams params_; private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder> paramsBuilder_; /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> * @return Whether the params field is set. */ public boolean hasParams() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> * @return The params. */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams getParams() { if (paramsBuilder_ == null) { return params_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance() : params_; } else { return paramsBuilder_.getMessage(); } } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ public Builder setParams(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams value) { if (paramsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } params_ = value; } else { paramsBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ public Builder setParams( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder builderForValue) { if (paramsBuilder_ == null) { params_ = builderForValue.build(); } else { paramsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ public Builder mergeParams(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams value) { if (paramsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && params_ != null && params_ != ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance()) { getParamsBuilder().mergeFrom(value); } else { params_ = value; } } else { paramsBuilder_.mergeFrom(value); } if (params_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ public Builder clearParams() { bitField0_ = (bitField0_ & ~0x00000001); params_ = null; if (paramsBuilder_ != null) { paramsBuilder_.dispose(); paramsBuilder_ = null; } onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder getParamsBuilder() { bitField0_ |= 0x00000001; onChanged(); return getParamsFieldBuilder().getBuilder(); } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder getParamsOrBuilder() { if (paramsBuilder_ != null) { return paramsBuilder_.getMessageOrBuilder(); } else { return params_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.getDefaultInstance() : params_; } } /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder> getParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder>( getParams(), getParentForChildren(), isClean()); params_ = null; } return paramsBuilder_; } @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:chalk.aggregate.v1.PlanAggregateBackfillRequest) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.PlanAggregateBackfillRequest) private static final ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest(); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<PlanAggregateBackfillRequest> PARSER = new com.google.protobuf.AbstractParser<PlanAggregateBackfillRequest>() { @java.lang.Override public PlanAggregateBackfillRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<PlanAggregateBackfillRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<PlanAggregateBackfillRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/PlanAggregateBackfillRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; public interface PlanAggregateBackfillRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:chalk.aggregate.v1.PlanAggregateBackfillRequest) com.google.protobuf.MessageOrBuilder { /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> * @return Whether the params field is set. */ boolean hasParams(); /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> * @return The params. */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParams getParams(); /** * <code>.chalk.aggregate.v1.AggregateBackfillUserParams params = 1 [json_name = "params"];</code> */ ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillUserParamsOrBuilder getParamsOrBuilder(); }
0
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate
java-sources/ai/chalk/chalk-java/1.2.1/ai/chalk/protos/chalk/aggregate/v1/PlanAggregateBackfillResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: chalk/aggregate/v1/service.proto // Protobuf Java Version: 3.25.1 package ai.chalk.protos.chalk.aggregate.v1; /** * Protobuf type {@code chalk.aggregate.v1.PlanAggregateBackfillResponse} */ public final class PlanAggregateBackfillResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:chalk.aggregate.v1.PlanAggregateBackfillResponse) PlanAggregateBackfillResponseOrBuilder { private static final long serialVersionUID = 0L; // Use PlanAggregateBackfillResponse.newBuilder() to construct. private PlanAggregateBackfillResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private PlanAggregateBackfillResponse() { errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); backfills_ = java.util.Collections.emptyList(); aggregateBackfillId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PlanAggregateBackfillResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.class, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.Builder.class); } private int bitField0_; public static final int ESTIMATE_FIELD_NUMBER = 2; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate_; /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return Whether the estimate field is set. */ @java.lang.Override public boolean hasEstimate() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return The estimate. */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getEstimate() { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder getEstimateOrBuilder() { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } public static final int ERRORS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @return A list containing the errors. */ public com.google.protobuf.ProtocolStringList getErrorsList() { return errors_; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @return The count of errors. */ public int getErrorsCount() { return errors_.size(); } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param index The index of the element to return. * @return The errors at the given index. */ public java.lang.String getErrors(int index) { return errors_.get(index); } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param index The index of the value to return. * @return The bytes of the errors at the given index. */ public com.google.protobuf.ByteString getErrorsBytes(int index) { return errors_.getByteString(index); } public static final int BACKFILLS_FIELD_NUMBER = 6; @SuppressWarnings("serial") private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate> backfills_; /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ @java.lang.Override public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate> getBackfillsList() { return backfills_; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ @java.lang.Override public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder> getBackfillsOrBuilderList() { return backfills_; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ @java.lang.Override public int getBackfillsCount() { return backfills_.size(); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate getBackfills(int index) { return backfills_.get(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder getBackfillsOrBuilder( int index) { return backfills_.get(index); } public static final int AGGREGATE_BACKFILL_ID_FIELD_NUMBER = 7; @SuppressWarnings("serial") private volatile java.lang.Object aggregateBackfillId_ = ""; /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @return The aggregateBackfillId. */ @java.lang.Override public java.lang.String getAggregateBackfillId() { java.lang.Object ref = aggregateBackfillId_; 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(); aggregateBackfillId_ = s; return s; } } /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @return The bytes for aggregateBackfillId. */ @java.lang.Override public com.google.protobuf.ByteString getAggregateBackfillIdBytes() { java.lang.Object ref = aggregateBackfillId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregateBackfillId_ = 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)) { output.writeMessage(2, getEstimate()); } for (int i = 0; i < errors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, errors_.getRaw(i)); } for (int i = 0; i < backfills_.size(); i++) { output.writeMessage(6, backfills_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregateBackfillId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, aggregateBackfillId_); } getUnknownFields().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(2, getEstimate()); } { int dataSize = 0; for (int i = 0; i < errors_.size(); i++) { dataSize += computeStringSizeNoTag(errors_.getRaw(i)); } size += dataSize; size += 1 * getErrorsList().size(); } for (int i = 0; i < backfills_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, backfills_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aggregateBackfillId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, aggregateBackfillId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse)) { return super.equals(obj); } ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse other = (ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse) obj; if (hasEstimate() != other.hasEstimate()) return false; if (hasEstimate()) { if (!getEstimate() .equals(other.getEstimate())) return false; } if (!getErrorsList() .equals(other.getErrorsList())) return false; if (!getBackfillsList() .equals(other.getBackfillsList())) return false; if (!getAggregateBackfillId() .equals(other.getAggregateBackfillId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasEstimate()) { hash = (37 * hash) + ESTIMATE_FIELD_NUMBER; hash = (53 * hash) + getEstimate().hashCode(); } if (getErrorsCount() > 0) { hash = (37 * hash) + ERRORS_FIELD_NUMBER; hash = (53 * hash) + getErrorsList().hashCode(); } if (getBackfillsCount() > 0) { hash = (37 * hash) + BACKFILLS_FIELD_NUMBER; hash = (53 * hash) + getBackfillsList().hashCode(); } hash = (37 * hash) + AGGREGATE_BACKFILL_ID_FIELD_NUMBER; hash = (53 * hash) + getAggregateBackfillId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse 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 ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse 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 ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse 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(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse 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 chalk.aggregate.v1.PlanAggregateBackfillResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:chalk.aggregate.v1.PlanAggregateBackfillResponse) ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.class, ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.Builder.class); } // Construct using ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getEstimateFieldBuilder(); getBackfillsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; estimate_ = null; if (estimateBuilder_ != null) { estimateBuilder_.dispose(); estimateBuilder_ = null; } errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (backfillsBuilder_ == null) { backfills_ = java.util.Collections.emptyList(); } else { backfills_ = null; backfillsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); aggregateBackfillId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.chalk.protos.chalk.aggregate.v1.ServiceProto.internal_static_chalk_aggregate_v1_PlanAggregateBackfillResponse_descriptor; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse getDefaultInstanceForType() { return ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.getDefaultInstance(); } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse build() { ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse buildPartial() { ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse result = new ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse result) { if (backfillsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { backfills_ = java.util.Collections.unmodifiableList(backfills_); bitField0_ = (bitField0_ & ~0x00000004); } result.backfills_ = backfills_; } else { result.backfills_ = backfillsBuilder_.build(); } } private void buildPartial0(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.estimate_ = estimateBuilder_ == null ? estimate_ : estimateBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { errors_.makeImmutable(); result.errors_ = errors_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.aggregateBackfillId_ = aggregateBackfillId_; } result.bitField0_ |= to_bitField0_; } @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 ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse) { return mergeFrom((ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse other) { if (other == ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse.getDefaultInstance()) return this; if (other.hasEstimate()) { mergeEstimate(other.getEstimate()); } if (!other.errors_.isEmpty()) { if (errors_.isEmpty()) { errors_ = other.errors_; bitField0_ |= 0x00000002; } else { ensureErrorsIsMutable(); errors_.addAll(other.errors_); } onChanged(); } if (backfillsBuilder_ == null) { if (!other.backfills_.isEmpty()) { if (backfills_.isEmpty()) { backfills_ = other.backfills_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureBackfillsIsMutable(); backfills_.addAll(other.backfills_); } onChanged(); } } else { if (!other.backfills_.isEmpty()) { if (backfillsBuilder_.isEmpty()) { backfillsBuilder_.dispose(); backfillsBuilder_ = null; backfills_ = other.backfills_; bitField0_ = (bitField0_ & ~0x00000004); backfillsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getBackfillsFieldBuilder() : null; } else { backfillsBuilder_.addAllMessages(other.backfills_); } } } if (!other.getAggregateBackfillId().isEmpty()) { aggregateBackfillId_ = other.aggregateBackfillId_; bitField0_ |= 0x00000008; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { input.readMessage( getEstimateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 18 case 34: { java.lang.String s = input.readStringRequireUtf8(); ensureErrorsIsMutable(); errors_.add(s); break; } // case 34 case 50: { ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate m = input.readMessage( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.parser(), extensionRegistry); if (backfillsBuilder_ == null) { ensureBackfillsIsMutable(); backfills_.add(m); } else { backfillsBuilder_.addMessage(m); } break; } // case 50 case 58: { aggregateBackfillId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate_; private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder> estimateBuilder_; /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return Whether the estimate field is set. */ public boolean hasEstimate() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> * @return The estimate. */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate getEstimate() { if (estimateBuilder_ == null) { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } else { return estimateBuilder_.getMessage(); } } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder setEstimate(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate value) { if (estimateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } estimate_ = value; } else { estimateBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder setEstimate( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder builderForValue) { if (estimateBuilder_ == null) { estimate_ = builderForValue.build(); } else { estimateBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder mergeEstimate(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate value) { if (estimateBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && estimate_ != null && estimate_ != ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance()) { getEstimateBuilder().mergeFrom(value); } else { estimate_ = value; } } else { estimateBuilder_.mergeFrom(value); } if (estimate_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public Builder clearEstimate() { bitField0_ = (bitField0_ & ~0x00000001); estimate_ = null; if (estimateBuilder_ != null) { estimateBuilder_.dispose(); estimateBuilder_ = null; } onChanged(); return this; } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder getEstimateBuilder() { bitField0_ |= 0x00000001; onChanged(); return getEstimateFieldBuilder().getBuilder(); } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder getEstimateOrBuilder() { if (estimateBuilder_ != null) { return estimateBuilder_.getMessageOrBuilder(); } else { return estimate_ == null ? ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.getDefaultInstance() : estimate_; } } /** * <code>.chalk.aggregate.v1.AggregateBackfillCostEstimate estimate = 2 [json_name = "estimate"];</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder> getEstimateFieldBuilder() { if (estimateBuilder_ == null) { estimateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillCostEstimateOrBuilder>( getEstimate(), getParentForChildren(), isClean()); estimate_ = null; } return estimateBuilder_; } private com.google.protobuf.LazyStringArrayList errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureErrorsIsMutable() { if (!errors_.isModifiable()) { errors_ = new com.google.protobuf.LazyStringArrayList(errors_); } bitField0_ |= 0x00000002; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @return A list containing the errors. */ public com.google.protobuf.ProtocolStringList getErrorsList() { errors_.makeImmutable(); return errors_; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @return The count of errors. */ public int getErrorsCount() { return errors_.size(); } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param index The index of the element to return. * @return The errors at the given index. */ public java.lang.String getErrors(int index) { return errors_.get(index); } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param index The index of the value to return. * @return The bytes of the errors at the given index. */ public com.google.protobuf.ByteString getErrorsBytes(int index) { return errors_.getByteString(index); } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param index The index to set the value at. * @param value The errors to set. * @return This builder for chaining. */ public Builder setErrors( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param value The errors to add. * @return This builder for chaining. */ public Builder addErrors( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureErrorsIsMutable(); errors_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param values The errors to add. * @return This builder for chaining. */ public Builder addAllErrors( java.lang.Iterable<java.lang.String> values) { ensureErrorsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, errors_); bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @return This builder for chaining. */ public Builder clearErrors() { errors_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002);; onChanged(); return this; } /** * <code>repeated string errors = 4 [json_name = "errors"];</code> * @param value The bytes of the errors to add. * @return This builder for chaining. */ public Builder addErrorsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureErrorsIsMutable(); errors_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } private java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate> backfills_ = java.util.Collections.emptyList(); private void ensureBackfillsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { backfills_ = new java.util.ArrayList<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate>(backfills_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder> backfillsBuilder_; /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate> getBackfillsList() { if (backfillsBuilder_ == null) { return java.util.Collections.unmodifiableList(backfills_); } else { return backfillsBuilder_.getMessageList(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public int getBackfillsCount() { if (backfillsBuilder_ == null) { return backfills_.size(); } else { return backfillsBuilder_.getCount(); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate getBackfills(int index) { if (backfillsBuilder_ == null) { return backfills_.get(index); } else { return backfillsBuilder_.getMessage(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder setBackfills( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate value) { if (backfillsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBackfillsIsMutable(); backfills_.set(index, value); onChanged(); } else { backfillsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder setBackfills( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder builderForValue) { if (backfillsBuilder_ == null) { ensureBackfillsIsMutable(); backfills_.set(index, builderForValue.build()); onChanged(); } else { backfillsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder addBackfills(ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate value) { if (backfillsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBackfillsIsMutable(); backfills_.add(value); onChanged(); } else { backfillsBuilder_.addMessage(value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder addBackfills( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate value) { if (backfillsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBackfillsIsMutable(); backfills_.add(index, value); onChanged(); } else { backfillsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder addBackfills( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder builderForValue) { if (backfillsBuilder_ == null) { ensureBackfillsIsMutable(); backfills_.add(builderForValue.build()); onChanged(); } else { backfillsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder addBackfills( int index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder builderForValue) { if (backfillsBuilder_ == null) { ensureBackfillsIsMutable(); backfills_.add(index, builderForValue.build()); onChanged(); } else { backfillsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder addAllBackfills( java.lang.Iterable<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate> values) { if (backfillsBuilder_ == null) { ensureBackfillsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, backfills_); onChanged(); } else { backfillsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder clearBackfills() { if (backfillsBuilder_ == null) { backfills_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { backfillsBuilder_.clear(); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public Builder removeBackfills(int index) { if (backfillsBuilder_ == null) { ensureBackfillsIsMutable(); backfills_.remove(index); onChanged(); } else { backfillsBuilder_.remove(index); } return this; } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder getBackfillsBuilder( int index) { return getBackfillsFieldBuilder().getBuilder(index); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder getBackfillsOrBuilder( int index) { if (backfillsBuilder_ == null) { return backfills_.get(index); } else { return backfillsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public java.util.List<? extends ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder> getBackfillsOrBuilderList() { if (backfillsBuilder_ != null) { return backfillsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(backfills_); } } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder addBackfillsBuilder() { return getBackfillsFieldBuilder().addBuilder( ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder addBackfillsBuilder( int index) { return getBackfillsFieldBuilder().addBuilder( index, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.getDefaultInstance()); } /** * <code>repeated .chalk.aggregate.v1.AggregateBackfillWithCostEstimate backfills = 6 [json_name = "backfills"];</code> */ public java.util.List<ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder> getBackfillsBuilderList() { return getBackfillsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder> getBackfillsFieldBuilder() { if (backfillsBuilder_ == null) { backfillsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimate.Builder, ai.chalk.protos.chalk.aggregate.v1.AggregateBackfillWithCostEstimateOrBuilder>( backfills_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); backfills_ = null; } return backfillsBuilder_; } private java.lang.Object aggregateBackfillId_ = ""; /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @return The aggregateBackfillId. */ public java.lang.String getAggregateBackfillId() { java.lang.Object ref = aggregateBackfillId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); aggregateBackfillId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @return The bytes for aggregateBackfillId. */ public com.google.protobuf.ByteString getAggregateBackfillIdBytes() { java.lang.Object ref = aggregateBackfillId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); aggregateBackfillId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @param value The aggregateBackfillId to set. * @return This builder for chaining. */ public Builder setAggregateBackfillId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } aggregateBackfillId_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @return This builder for chaining. */ public Builder clearAggregateBackfillId() { aggregateBackfillId_ = getDefaultInstance().getAggregateBackfillId(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * <code>string aggregate_backfill_id = 7 [json_name = "aggregateBackfillId"];</code> * @param value The bytes for aggregateBackfillId to set. * @return This builder for chaining. */ public Builder setAggregateBackfillIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); aggregateBackfillId_ = value; bitField0_ |= 0x00000008; 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:chalk.aggregate.v1.PlanAggregateBackfillResponse) } // @@protoc_insertion_point(class_scope:chalk.aggregate.v1.PlanAggregateBackfillResponse) private static final ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse(); } public static ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<PlanAggregateBackfillResponse> PARSER = new com.google.protobuf.AbstractParser<PlanAggregateBackfillResponse>() { @java.lang.Override public PlanAggregateBackfillResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<PlanAggregateBackfillResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<PlanAggregateBackfillResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.chalk.protos.chalk.aggregate.v1.PlanAggregateBackfillResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }