index
int64
repo_id
string
file_path
string
content
string
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/job/PriorityJobScheduler.java
package ai.preferred.venom.job; /** * For backwards compatibility. */ @Deprecated public class PriorityJobScheduler extends PriorityJobQueue { }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/job/Scheduler.java
/* * Copyright (c) 2019 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.job; import ai.preferred.venom.Handler; import ai.preferred.venom.request.Request; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.validation.constraints.NotNull; import java.util.concurrent.BlockingQueue; /** * This interface represents only the adding part a scheduler. * * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class Scheduler { /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(Scheduler.class); /** * The queue used for this scheduler. */ private final BlockingQueue<Job> queue; /** * Constructs an instance of Scheduler. * * @param queue an instance of BlockingQueue */ public Scheduler(final BlockingQueue<Job> queue) { this.queue = queue; } /** * Adds a request to the queue. * <p> * This request would be parsed by the handler specified. * </p> * * @param request request to fetch when dequeued. * @param handler handler to be used to parse the request. * @param jobAttributes attributes to insert to the job. */ public final void add(final @NotNull Request request, final Handler handler, final @NotNull JobAttribute... jobAttributes) { final Job job = new Job(request, handler, jobAttributes); queue.add(job); LOGGER.debug("Job {} - {} added to queue.", job.toString(), request.getUrl()); } /** * Adds a request to the queue. * <p> * This request would be parsed by the handler specified. * </p> * * @param request request to fetch when dequeued. * @param jobAttributes attributes to insert to the job. */ public final void add(final @NotNull Request request, final @NotNull JobAttribute... jobAttributes) { add(request, null, jobAttributes); } /** * Adds a request to the queue. * <p> * This request would be parsed by the handler specified. * </p> * * @param request request to fetch when dequeued. * @param handler handler to be used to parse the request. */ public final void add(final Request request, final @NotNull Handler handler) { add(request, handler, new JobAttribute[0]); } /** * Adds a request to the queue. * <p> * This request would be parsed by a handler defined in Router * or otherwise defined. * </p> * * @param request request to fetch when dequeued. */ public final void add(final @NotNull Request request) { add(request, null, new JobAttribute[0]); } /** * Adds a request to the queue. Will be removed in the next release. * <p> * This request would be parsed by the handler specified, and * its priority can be downgraded to a minimum priority specified. * </p> * * @param r request to fetch when dequeued * @param h handler to be used to parse the request * @param p initial priority of the request * @param pf the minimum (floor) priority of this request */ @Deprecated public final void add(final @NotNull Request r, final Handler h, final Priority p, final Priority pf) { add(r, h, new PriorityJobAttribute(p, pf)); } /** * Adds a request to the queue. Will be removed in the next release. * <p> * This request would be parsed by the handler specified, and * its priority can be downgraded to the default minimum priority. * </p> * * @param r request to fetch when dequeued * @param h handler to be used to parse the request * @param p initial priority of the request */ @Deprecated public final void add(final @NotNull Request r, final Handler h, final Priority p) { add(r, h, p, Priority.FLOOR); } /** * Adds a request to the queue. Will be removed in the next release. * <p> * This request would be parsed by a handler defined in Router * or otherwise, and its priority can be downgraded to a minimum * priority specified. * </p> * * @param r request to fetch when dequeued * @param p initial priority of the request * @param pf the minimum (floor) priority of this request */ @Deprecated public final void add(final @NotNull Request r, final Priority p, final Priority pf) { add(r, null, p, pf); } /** * Adds a request to the queue. Will be removed in the next release. * <p> * This request would be parsed by a handler defined in Router * or otherwise defined, and its priority can be downgraded to the * default minimum priority. * </p> * * @param r request to fetch when dequeued * @param p initial priority of the request */ @Deprecated public final void add(final @NotNull Request r, final Priority p) { add(r, (Handler) null, p); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/request/CrawlerRequest.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.request; import ai.preferred.venom.SleepScheduler; import org.apache.http.HttpHost; import java.util.Map; /** * This class allows the removal of proxy from request. * * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class CrawlerRequest implements Request, Unwrappable { /** * An instance of underlying request. */ private final Request inner; /** * The proxy to be used for this request. */ private HttpHost proxy; /** * Constructs an instance of crawler request with an underlying * request. * * @param request An instance of the underlying request */ public CrawlerRequest(final Request request) { this.inner = request; this.proxy = request.getProxy(); } @Override public final Method getMethod() { return inner.getMethod(); } @Override public final String getBody() { return inner.getBody(); } @Override public final String getUrl() { return inner.getUrl(); } @Override public final Map<String, String> getHeaders() { return inner.getHeaders(); } @Override public final HttpHost getProxy() { return proxy; } /** * Remove the proxy from this request. */ public final void removeProxy() { proxy = null; } @Override public final SleepScheduler getSleepScheduler() { return inner.getSleepScheduler(); } @Override public final Request getInner() { return inner; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/request/HttpFetcherRequest.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.request; import ai.preferred.venom.SleepScheduler; import org.apache.http.HttpHost; import javax.annotation.Nullable; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public class HttpFetcherRequest implements Request, Unwrappable { /** * An instance of underlying request. */ private final Request innerRequest; /** * The headers to append to global headers. */ private final Map<String, String> headers; /** * The proxy to be used for this request. */ private final HttpHost proxy; /** * Diagnostics for current request. */ private final Diagnostics diagnostics; /** * Constructs an instance of http fetcher request. * * @param innerRequest An instance of underlying request */ public HttpFetcherRequest(final Request innerRequest) { this(innerRequest, new HashMap<>(innerRequest.getHeaders()), innerRequest.getProxy()); } /** * Constructs an instance of http fetcher request. * * @param innerRequest An instance of underlying request * @param headers Headers to append to global headers * @param proxy Proxy to be used for this request */ private HttpFetcherRequest(final Request innerRequest, final Map<String, String> headers, final HttpHost proxy) { this.innerRequest = innerRequest; this.headers = headers; this.proxy = proxy; this.diagnostics = new Diagnostics(); } /** * Prepend headers to the current headers. * * @param preHeaders Headers to be prepended * @return A new instance of http fetcher request */ public final HttpFetcherRequest prependHeaders(final Map<String, String> preHeaders) { final Map<String, String> newHeaders = new HashMap<>(headers); preHeaders.forEach(newHeaders::putIfAbsent); return new HttpFetcherRequest(innerRequest, newHeaders, proxy); } @Override public final Method getMethod() { return innerRequest.getMethod(); } @Override public final String getBody() { return innerRequest.getBody(); } @Override public final String getUrl() { return innerRequest.getUrl(); } @Override public final Map<String, String> getHeaders() { return Collections.unmodifiableMap(headers); } @Override public final HttpHost getProxy() { return proxy; } /** * Sets proxy to be used for this request. * * @param proxy Proxy to be used for this request * @return A new instance of http fetcher request */ public final HttpFetcherRequest setProxy(final HttpHost proxy) { return new HttpFetcherRequest(innerRequest, headers, proxy); } @Override public final SleepScheduler getSleepScheduler() { return innerRequest.getSleepScheduler(); } @Override public final Request getInner() { return innerRequest; } /** * Get diagnostic information for this request. * * @return A instance of diagnostics */ public final Diagnostics getDiagnostics() { return diagnostics; } /** * This class contains the diagnostic information for this * request. */ public static final class Diagnostics { /** * Start time of the request. */ private Long start; /** * Acknowledge time of the request. */ private Long acknowledge; /** * Complete time of the request. */ private Long complete; /** * Size of the response in bytes. */ private Integer size; /** * Constructs an instance of diagnostics. */ private Diagnostics() { } /** * Set the start time to current nano time. */ public void setStart() { this.start = System.nanoTime(); } /** * Set the acknowledge time to current nano time. */ public void setAcknowledge() { this.acknowledge = System.nanoTime(); } /** * Set the complete time to current nano time. */ public void setComplete() { this.complete = System.nanoTime(); } /** * Get the start time of the request. Returns null * if the start time has not been set. * * @return Time started */ @Nullable public Long getStart() { return start; } /** * Get the acknowledge time of the request. Returns null * if the acknowledge time has not been set. * * @return Time acknowledged */ @Nullable public Long getAcknowledge() { return acknowledge; } /** * Get the complete time of the request. Returns null * if the complete time has not been set. * * @return Time completed */ @Nullable public Long getComplete() { return complete; } /** * Get the size the response. Returns null * if the response size has not been set. * * @return Response size */ @Nullable public Integer getSize() { return size; } /** * Set the size of the response in bytes. * * @param size Size of the response. */ public void setSize(final int size) { this.size = size; } /** * Get the latency between sending of the request and the first * response. Returns null if {@link #isAcknowledged} is false. * * @return Time acknowledged */ @Nullable public Long getLatency() { if (isAcknowledged()) { return acknowledge - start; } return null; } /** * Get download speed in bytes per second. Returns null if * {@link #isCompleted} is false. * * @return Download speed */ @Nullable public Double getSpeed() { if (isCompleted()) { return size / ((complete - acknowledge) / 1000000000.0); } return null; } /** * Check if request has been started. * * @return True if request is started */ public boolean isStarted() { return (start != null); } /** * Check if request has been started and acknowledged. * * @return True if request is started and acknowledged */ public boolean isAcknowledged() { return isStarted() && (acknowledge != null); } /** * Check if request has been started, acknowledged and completed. * * @return True if request is started, acknowledged and completed */ public boolean isCompleted() { return isStarted() && isAcknowledged() && (complete != null); } } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/request/Request.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.request; import ai.preferred.venom.SleepScheduler; import org.apache.http.HttpHost; import javax.annotation.Nullable; import javax.validation.constraints.NotNull; import java.util.Map; /** * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public interface Request { /** * Returns the method type of the request. * * @return method type */ @NotNull Method getMethod(); /** * Returns the request body of the request or null if none specified. * * @return request body */ @Nullable String getBody(); /** * Returns the url of the request. * * @return url */ @NotNull String getUrl(); /** * Returns the headers set for the request. * * @return a map of the headers set */ @NotNull Map<String, String> getHeaders(); /** * Returns the proxy set to be used for the request or default to * fetcher if none specified. * * @return proxy */ @Nullable HttpHost getProxy(); /** * Returns information about the amount of sleep before this request * is made. * * @return an instance of SleepScheduler */ @Nullable SleepScheduler getSleepScheduler(); /** * The method of the request to be made. */ enum Method { /** * GET method. */ GET, /** * POST method. */ POST, /** * HEAD method. */ HEAD, /** * PUT method. */ PUT, /** * DELETE method. */ DELETE, /** * OPTIONS method. */ OPTIONS } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/request/StorageFetcherRequest.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.request; import ai.preferred.venom.SleepScheduler; import org.apache.http.HttpHost; import javax.validation.constraints.NotNull; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * @author Ween Jiann Lee */ public class StorageFetcherRequest implements Request, Unwrappable { /** * An instance of underlying request. */ private final Request innerRequest; /** * The headers to append to global headers. */ private final Map<String, String> headers; /** * Constructs an instance of StorageFetcherRequest. * * @param innerRequest An instance of underlying request */ public StorageFetcherRequest(final Request innerRequest) { this(innerRequest, new HashMap<>(innerRequest.getHeaders())); } /** * Constructs an instance of StorageFetcherRequest. * * @param innerRequest An instance of underlying request * @param headers Headers to append to global headers */ private StorageFetcherRequest(final Request innerRequest, final Map<String, String> headers) { this.innerRequest = innerRequest; this.headers = headers; } /** * Prepend headers to the current headers. * * @param preHeaders Headers to be prepended * @return A new instance of http fetcher request */ public final StorageFetcherRequest prependHeaders(final Map<String, String> preHeaders) { final Map<String, String> newHeaders = new HashMap<>(headers); preHeaders.forEach(newHeaders::putIfAbsent); return new StorageFetcherRequest(innerRequest, newHeaders); } @Override public final @NotNull Request.Method getMethod() { return innerRequest.getMethod(); } @Override public final String getBody() { return innerRequest.getBody(); } @Override public final @NotNull String getUrl() { return innerRequest.getUrl(); } @Override public final @NotNull Map<String, String> getHeaders() { return Collections.unmodifiableMap(headers); } @Override public final HttpHost getProxy() { return innerRequest.getProxy(); } @Override public final @NotNull SleepScheduler getSleepScheduler() { return innerRequest.getSleepScheduler(); } @Override public final Request getInner() { return innerRequest; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/request/Unwrappable.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.request; import javax.validation.constraints.NotNull; /** * This interface represents that the request can be unwrapped. * * @author Ween Jiann Lee */ public interface Unwrappable extends Request { /** * Unwrap all wrapped request to an instance of base request. * * @param request any implementation of {@link Request}. * @return the first instance of request not implementing {@link Unwrappable}. */ @NotNull static Request unwrapRequest(@NotNull Request request) { Request baseRequest = request; while (baseRequest instanceof Unwrappable) { baseRequest = ((Unwrappable) baseRequest).getInner(); } return baseRequest; } /** * Returns the unwrapped version of this request. * * @return an instance of request */ @NotNull Request getInner(); }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/request/VRequest.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.request; import ai.preferred.venom.SleepScheduler; import org.apache.http.HttpHost; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * An implementation of HTTP request. * * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public class VRequest implements Request { /** * The method of this request. */ private final Method method; /** * The url for this request. */ private final String url; /** * The headers to append to global headers. */ private final Map<String, String> headers; /** * The body of this request. */ private final String body; /** * The proxy to be used for this request. */ private final HttpHost proxy; /** * The sleep scheduler to be used for this request. */ private final SleepScheduler sleepScheduler; /** * Constructs an instance of venom request. * * @param url The url for this request. */ public VRequest(final String url) { this(url, Collections.emptyMap()); } /** * Constructs an instance of venom request. * * @param url The url for this request * @param headers The headers to append for this request */ public VRequest(final String url, final Map<String, String> headers) { this(Method.GET, url, new HashMap<>(headers), null, null, null); } /** * Constructs an instance of venom request. * * @param builder An instance of builder */ protected VRequest(final Builder<?> builder) { this(builder.method == null ? Method.GET : builder.method, builder.url, new HashMap<>(builder.headers), builder.body, builder.scheduler, builder.proxy ); } /** * Constructs an instance of venom request. * * @param method The method for this request * @param url The url for this request * @param headers The headers to append for this request * @param body The body for this request * @param sleepScheduler The sleep scheduler to use * @param proxy The proxy to use */ private VRequest(final Method method, final String url, final Map<String, String> headers, final String body, final SleepScheduler sleepScheduler, final HttpHost proxy) { this.method = method; this.url = url; this.headers = headers; this.body = body; this.sleepScheduler = sleepScheduler; this.proxy = proxy; } /** * Create a new instance of builder with a method and url. * * @param method Request method * @param url Request url * @return A new instance of builder */ public static Builder<?> build(final Method method, final String url) { return new Builder<>(method, url); } @Override public final Method getMethod() { return method; } @Override public final String getBody() { return body; } @Override public final String getUrl() { return url; } @Override public final Map<String, String> getHeaders() { return Collections.unmodifiableMap(headers); } @Override public final HttpHost getProxy() { return proxy; } @Override public final SleepScheduler getSleepScheduler() { return sleepScheduler; } /** * A builder for VRequest class. * * @param <T> An class that extends builder */ public static class Builder<T extends Builder<T>> { /** * The headers to append to global headers. */ private final Map<String, String> headers = new HashMap<>(); /** * The method of this request. */ private final Method method; /** * The body of this request. */ private String body; /** * The url for this request. */ private String url; /** * The proxy to be used for this request. */ private HttpHost proxy; /** * The sleep scheduler to be used for this request. */ private SleepScheduler scheduler; /** * Constructs an instance of builder. * * @param method The method for this request * @param url The url for this request */ protected Builder(final Method method, final String url) { this.method = method; this.url = url; } /** * Creates a new instance of builder with method type get. * * @param url url to fetch. * @return an instance of builder. */ public static Builder<?> get(final String url) { return new Builder<>(Method.GET, url); } /** * Creates a new instance of builder with method type post. * * @param url url to fetch. * @return an instance of builder. */ public static Builder<?> post(final String url) { return new Builder<>(Method.POST, url); } /** * Creates a new instance of builder with method type head. * * @param url url to fetch. * @return an instance of builder. */ public static Builder<?> head(final String url) { return new Builder<>(Method.HEAD, url); } /** * Creates a new instance of builder with method type put. * * @param url url to fetch. * @return an instance of builder. */ public static Builder<?> put(final String url) { return new Builder<>(Method.PUT, url); } /** * Creates a new instance of builder with method type delete. * * @param url url to fetch. * @return an instance of builder. */ public static Builder<?> delete(final String url) { return new Builder<>(Method.DELETE, url); } /** * Creates a new instance of builder with method type options. * * @param url url to fetch. * @return an instance of builder. */ public static Builder<?> options(final String url) { return new Builder<>(Method.OPTIONS, url); } /** * Sets the request body to be used. * * @param body request body * @return this */ @SuppressWarnings("unchecked") public final T setBody(final String body) { this.body = body; return (T) this; } /** * Sets the sleep scheduler to be used, this will override the * sleep scheduler defined in Crawler for this request. Defaults * to none. * * @param scheduler sleep scheduler to be used. * @return this */ @SuppressWarnings("unchecked") public final T setSleepScheduler(final SleepScheduler scheduler) { this.scheduler = scheduler; return (T) this; } /** * Sets the proxy to be used, this will override the * proxy selected in Fetcher for this request. Defaults * to none. * * @param proxy proxy to be used. * @return this */ @SuppressWarnings("unchecked") public final T setProxy(final HttpHost proxy) { this.proxy = proxy; return (T) this; } /** * Remove a header from this request. * * @param name The key of the header to remove * @return this */ @SuppressWarnings("unchecked") public final T removeHeader(final String name) { headers.remove(name); return (T) this; } /** * Remove all headers from this request. * * @return this */ @SuppressWarnings("unchecked") public final T removeHeaders() { headers.clear(); return (T) this; } /** * Add headers to be used * <p> * This will merge with headers set in Crawler class. If * a same key is found, this will override that header in * Crawler class. * </p> * * @param headers request headers * @return this */ @SuppressWarnings("unchecked") public final T addHeaders(final Map<String, String> headers) { this.headers.putAll(headers); return (T) this; } /** * Adds header to be used * <p> * This will merge with headers set in Crawler class. If * a same key is found, this will override that header in * Crawler class. * </p> * * @param name name/key of the header * @param value value of the header * @return this */ @SuppressWarnings("unchecked") public final T addHeader(final String name, final String value) { headers.put(name, value); return (T) this; } /** * Sets the url to be fetched. * * @param url url to fetch. * @return this */ @SuppressWarnings("unchecked") public final T setUrl(final String url) { this.url = url; return (T) this; } /** * Builds the request with the options specified. * * @return an instance of Request. */ public VRequest build() { return new VRequest(this); } } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/response/BaseResponse.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.response; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.entity.ContentType; import javax.validation.constraints.NotNull; /** * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public class BaseResponse implements Response { /** * The status code of this response. */ private final int statusCode; /** * The content of this response. */ private final byte[] content; /** * The content type of this response. */ private final ContentType contentType; /** * The headers of this response. */ private final Header[] headers; /** * The base url of this response. */ private final String url; /** * The proxy used to obtain response. */ private final HttpHost proxy; /** * Constructs a base response. * * @param statusCode Status code of the response * @param url Base url of the response * @param content Content from the response * @param contentType Content type of the response * @param headers Headers from the response * @param proxy Proxy used to obtain the response */ public BaseResponse(final int statusCode, final String url, final byte[] content, final ContentType contentType, final Header[] headers, final HttpHost proxy) { this.statusCode = statusCode; this.url = url; this.content = content; this.contentType = contentType; this.headers = headers; this.proxy = proxy; } @Override public final int getStatusCode() { return statusCode; } @Override public final byte[] getContent() { return content; } @Override public final @NotNull ContentType getContentType() { return contentType; } @Override public final @NotNull Header[] getHeaders() { return headers; } @Override public final @NotNull String getUrl() { return url; } @Override public final @NotNull String getBaseUrl() { return getUrl(); } @Override public final HttpHost getProxy() { return proxy; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/response/Response.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.response; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.entity.ContentType; import javax.annotation.Nullable; import javax.validation.constraints.NotNull; /** * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public interface Response { /** * Returns status code of the response. * * @return int code */ int getStatusCode(); /** * Returns raw content of the response. * * @return byte[] content */ byte[] getContent(); /** * Returns the content type of the content fetched. * <p> * This is provided by the server or guessed by the server or an * amalgamation of both. * </p> * * @return an instance of ContentType */ @NotNull ContentType getContentType(); /** * Returns the headers that were used to trigger this response. * * @return an array of headers */ @NotNull Header[] getHeaders(); /** * Returns the url used to fetch the response, if the request * is redirected, this will be the final requested url. * * @return stripped down version of requested url */ @NotNull String getUrl(); /** * Returns the base form of the url used in this request. * * @return stripped down version of requested url */ @Deprecated @NotNull String getBaseUrl(); /** * Returns the proxy that was used to trigger this response. * * @return proxy used */ @Nullable HttpHost getProxy(); }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/response/Retrievable.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.response; import ai.preferred.venom.storage.Record; /** * This interface represents that the response can be/ has been stored. * * @author Ween Jiann Lee */ public interface Retrievable extends Response { /** * Returns record archive of this response that has been * insert into a persistent storage. * * @return record where an archive has been saved */ Record<?> getRecord(); }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/response/StorageResponse.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.response; import ai.preferred.venom.storage.Record; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.entity.ContentType; import javax.validation.constraints.NotNull; /** * @author Ween Jiann Lee */ public class StorageResponse implements Response, Retrievable { /** * The record holding this response. */ private final Record<?> record; /** * The url of this response. */ private final String url; /** * Constructs a base response. * * @param record record holding this response * @param url base URL of the response */ public StorageResponse(final Record<?> record, final String url) { this.record = record; this.url = url; } @Override public final int getStatusCode() { return record.getStatusCode(); } @Override public final byte[] getContent() { return record.getResponseContent(); } @Override public final @NotNull ContentType getContentType() { return record.getContentType(); } @Override public final @NotNull Header[] getHeaders() { return record.getResponseHeaders(); } @Override public final @NotNull String getUrl() { return url; } @Override public final @NotNull String getBaseUrl() { return getUrl(); } @Override public final HttpHost getProxy() { return null; } @Override public final Record<?> getRecord() { return record; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/response/Unwrappable.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.response; import javax.validation.constraints.NotNull; /** * This interface represents that the response can be unwrapped. * * @author Ween Jiann Lee */ public interface Unwrappable extends Response { /** * Returns the unwrapped version of this request. * * @return an instance of request */ @NotNull Response getInner(); }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/response/VResponse.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.response; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.entity.ContentType; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import javax.validation.constraints.NotNull; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; /** * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public class VResponse implements Response, Unwrappable { /** * The default charset to be used to decode response. */ public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; /** * An instance of underlying response. */ private final Response innerResponse; /** * Constructs a VResponse. * * @param response An instance of response */ public VResponse(final Response response) { this.innerResponse = response; } @Override public final int getStatusCode() { return getInner().getStatusCode(); } @Override public final byte[] getContent() { return getInner().getContent(); } @Override public final @NotNull ContentType getContentType() { return getInner().getContentType(); } @Override public final @NotNull Header[] getHeaders() { return getInner().getHeaders(); } @Override public final @NotNull String getUrl() { return getInner().getUrl(); } @Override public final @NotNull String getBaseUrl() { return getInner().getUrl(); } @Override public final HttpHost getProxy() { return getInner().getProxy(); } /** * Returns the html in string format. * * @return string of html response */ public final String getHtml() { final Charset charset = getContentType().getCharset(); if (charset == null) { return getHtml(DEFAULT_CHARSET); } return getHtml(charset); } /** * Returns the html in string format. * * @param charset use specified charset for this html document * @return string of html response */ public final String getHtml(final Charset charset) { return new String(getContent(), charset); } /** * Returns a jsoup document of this response. * * @return jsoup document of response */ public final Document getJsoup() { return Jsoup.parse(getHtml(), getUrl()); } /** * Returns a jsoup document of this response. * * @param charset use specified charset for this html document * @return jsoup document of response */ public final Document getJsoup(final Charset charset) { return Jsoup.parse(getHtml(charset), getUrl()); } @Override public final Response getInner() { return innerResponse; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/socks/SocksConnectingIOReactor.java
package ai.preferred.venom.socks; import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor; import org.apache.http.impl.nio.reactor.IOReactorConfig; import org.apache.http.nio.reactor.IOEventDispatch; import org.apache.http.nio.reactor.IOReactorException; import java.io.InterruptedIOException; import java.util.concurrent.ThreadFactory; /** * This IOReactor makes sure that the supplied {@link IOEventDispatch} is decorated with {@link SocksIOEventDispatch}. */ public class SocksConnectingIOReactor extends DefaultConnectingIOReactor { /** * Creates an instance of SocksConnectingIOReactor with the given configuration. * * @param config I/O reactor configuration. * @param threadFactory the factory to create threads. * Can be {@code null}. * @throws IOReactorException in case if a non-recoverable I/O error. */ public SocksConnectingIOReactor(IOReactorConfig config, ThreadFactory threadFactory) throws IOReactorException { super(config, threadFactory); } /** * Creates an instance of SocksConnectingIOReactor with the given configuration. * * @param config I/O reactor configuration. * Can be {@code null}. * @throws IOReactorException in case if a non-recoverable I/O error. */ public SocksConnectingIOReactor(IOReactorConfig config) throws IOReactorException { super(config); } /** * Creates an instance of SocksConnectingIOReactor with default configuration. * * @throws IOReactorException in case if a non-recoverable I/O error. */ public SocksConnectingIOReactor() throws IOReactorException { super(); } @Override public void execute(final IOEventDispatch eventDispatch) throws InterruptedIOException, IOReactorException { super.execute(new SocksIOEventDispatch(eventDispatch)); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/socks/SocksHttpRoutePlanner.java
package ai.preferred.venom.socks; import com.google.common.annotations.Beta; import org.apache.http.HttpException; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.routing.HttpRoutePlanner; import org.apache.http.protocol.HttpContext; /** * This route planners ensures that the connection to https server via socks proxy works. It prevents http client from * tunnelling the IO session twice ({@link SocksIOSessionStrategy} upgrades {@link SocksIOSession} to * {@link org.apache.http.nio.reactor.ssl.SSLIOSession} when necessary). */ @Beta public class SocksHttpRoutePlanner implements HttpRoutePlanner { private final HttpRoutePlanner rp; /** * Decorates {@link HttpRoutePlanner}. * * @param rp decorated route planner */ public SocksHttpRoutePlanner(final HttpRoutePlanner rp) { this.rp = rp; } @Override public HttpRoute determineRoute(HttpHost host, HttpRequest request, HttpContext context) throws HttpException { final HttpRoute route = rp.determineRoute(host, request, context); final boolean secure = "https".equalsIgnoreCase(route.getTargetHost().getSchemeName()); if (secure && route.getProxyHost() != null && "socks".equalsIgnoreCase(route.getProxyHost().getSchemeName())) { return new HttpRoute(route.getTargetHost(), route.getLocalAddress(), route.getProxyHost(), false); } return route; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/socks/SocksIOEventDispatch.java
package ai.preferred.venom.socks; import org.apache.http.nio.NHttpClientConnection; import org.apache.http.nio.NHttpClientEventHandler; import org.apache.http.nio.NHttpConnection; import org.apache.http.nio.protocol.HttpAsyncRequestExecutor; import org.apache.http.nio.reactor.IOEventDispatch; import org.apache.http.nio.reactor.IOSession; import java.io.IOException; /** * This class wraps and handles IO dispatch related to {@link SocksIOSession}. */ public class SocksIOEventDispatch implements IOEventDispatch { private final IOEventDispatch dispatch; /** * Decorates {@link IOEventDispatch}. * * @param dispatch delegated IO dispatch */ public SocksIOEventDispatch(IOEventDispatch dispatch) { this.dispatch = dispatch; } @Override public void connected(IOSession session) { dispatch.connected(session); } @Override public void inputReady(IOSession session) { try { if (initializeSocksSession(session)) { dispatch.inputReady(session); } } catch (RuntimeException e) { session.shutdown(); throw e; } } @Override public void outputReady(IOSession session) { try { if (initializeSocksSession(session)) { dispatch.outputReady(session); } } catch (RuntimeException e) { session.shutdown(); throw e; } } @Override public void timeout(IOSession session) { try { dispatch.timeout(session); final SocksIOSession socksIOSession = getSocksSession(session); if (socksIOSession != null) { socksIOSession.shutdown(); } } catch (RuntimeException e) { session.shutdown(); throw e; } } @Override public void disconnected(IOSession session) { dispatch.disconnected(session); } private boolean initializeSocksSession(IOSession session) { final SocksIOSession socksSession = getSocksSession(session); if (socksSession != null) { try { try { if (!socksSession.isInitialized()) { return socksSession.initialize(); } } catch (final IOException e) { onException(socksSession, e); throw new RuntimeException(e); } } catch (final RuntimeException e) { socksSession.shutdown(); throw e; } } return true; } private void onException(IOSession session, Exception ex) { final NHttpClientConnection conn = getConnection(session); if (conn != null) { final NHttpClientEventHandler handler = getEventHandler(conn); if (handler != null) { handler.exception(conn, ex); } } } private SocksIOSession getSocksSession(IOSession session) { return (SocksIOSession) session.getAttribute(SocksIOSession.SESSION_KEY); } private NHttpClientConnection getConnection(IOSession session) { return (NHttpClientConnection) session.getAttribute(IOEventDispatch.CONNECTION_KEY); } private NHttpClientEventHandler getEventHandler(NHttpConnection conn) { return (NHttpClientEventHandler) conn.getContext().getAttribute(HttpAsyncRequestExecutor.HTTP_HANDLER); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/socks/SocksIOSession.java
package ai.preferred.venom.socks; import org.apache.http.HttpHost; import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.util.InetAddressUtils; import org.apache.http.nio.reactor.IOSession; import org.apache.http.nio.reactor.SessionBufferStatus; import org.apache.http.util.Asserts; import java.io.IOException; import java.net.Inet4Address; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.ByteBuffer; import java.nio.channels.ByteChannel; import java.nio.charset.StandardCharsets; /** * The class establishes Socks4a connection and delegates the interface calls to a decorated {@link IOSession}. */ public class SocksIOSession implements IOSession { /** * SOCKS session key. */ public static final String SESSION_KEY = "http.session.socks"; private static final String DEFAULT_USER_ID = "USER"; private static final byte SOCKS_VERSION = 4; private static final byte CONNECT = 1; private static final byte NULL = 0; private static final byte[] DIST_IP_LOOKUP_REQUEST = new byte[]{0, 0, 0, 1}; private final IOSession innerSession; private final HttpHost targetHost; private final String userId; private final SocketAddress remoteAddress; private final ByteBuffer replyBuf = ByteBuffer.allocate(8); private volatile int status = IOSession.ACTIVE; private volatile boolean initialized; private boolean connectRequested; private boolean connectReceived; private boolean endOfStream = false; /** * Decorates {@link IOSession}, sets default user ID for a SOCKS proxy. * * @param innerSession decorated session */ public SocksIOSession(final IOSession innerSession) { this(innerSession, DEFAULT_USER_ID); } /** * Decorates {@link IOSession}, allows to specify user ID. * * @param innerSession decorated session * @param userId user id as in SOCKS4a specification */ public SocksIOSession(final IOSession innerSession, final String userId) { final HttpRoute route = (HttpRoute) innerSession.getAttribute(IOSession.ATTACHMENT_KEY); this.innerSession = innerSession; this.targetHost = route.getTargetHost(); this.userId = userId; if (targetHost.getAddress() != null) { remoteAddress = new InetSocketAddress(targetHost.getAddress(), targetHost.getPort()); } else { remoteAddress = InetSocketAddress.createUnresolved(targetHost.getHostName(), targetHost.getPort()); } innerSession.setAttribute(SESSION_KEY, this); } /** * Initializes Socks IO session. * * @return true if Socks IO session is successfully initialized, false - otherwise. * @throws IOException session IO exceptions */ synchronized boolean initialize() throws IOException { Asserts.check(!this.initialized, "Socks I/O session already initialized"); if (innerSession.getStatus() >= IOSession.CLOSING) { return false; } if (!connectRequested) { sendConnectRequest(); } if (!connectReceived) { initialized = receiveConnectReply(); } return initialized; } private void sendConnectRequest() throws IOException { Asserts.check(!this.connectRequested, "Socks CONNECT already sent"); final boolean isIPv4 = InetAddressUtils.isIPv4Address(targetHost.getHostName()); final byte[] userId = this.userId.getBytes(StandardCharsets.ISO_8859_1); final byte[] host = targetHost.getHostName().getBytes(StandardCharsets.ISO_8859_1); final int size = 9 + userId.length + (isIPv4 ? 0 : host.length + 1); final ByteBuffer buf = ByteBuffer.allocate(size); buf.put(SOCKS_VERSION); buf.put(CONNECT); buf.put((byte) ((targetHost.getPort() >> 8) & 0xff)); buf.put((byte) (targetHost.getPort() & 0xff)); buf.put(isIPv4 ? Inet4Address.getByName(targetHost.getHostName()).getAddress() : DIST_IP_LOOKUP_REQUEST); buf.put(userId); buf.put(NULL); if (!isIPv4) { buf.put(host); buf.put(NULL); } buf.flip(); if (innerSession.channel().write(buf) != size) { throw new IOException("Could not flush the buffer"); } connectRequested = true; } private boolean receiveConnectReply() throws IOException { final int read = innerSession.channel().read(replyBuf); if (!endOfStream && read == -1) { endOfStream = true; close(); throw new IOException("IO channel closed before connection established"); } if (replyBuf.position() < 8) { return false; } replyBuf.flip(); processConnectReply(); return true; } private void processConnectReply() throws IOException { Asserts.check(!this.connectReceived, "CONNECT reply has been already received"); Asserts.check(replyBuf.limit() == 8, "Response is expected of 8 bytes, but got {}", replyBuf.limit()); byte vn = replyBuf.get(); Asserts.check(vn == 0 || vn == 4, "Invalid socks version {}", vn); IOException ex = null; final byte cd = replyBuf.get(); switch (cd) { case 90: break; case 91: ex = new IOException("SOCKS request rejected"); break; case 92: ex = new IOException("SOCKS server couldn't reach destination"); break; case 93: ex = new IOException("SOCKS authentication failed"); break; default: ex = new IOException("Reply from SOCKS server contains bad status"); break; } if (ex != null) { close(); throw ex; } connectReceived = true; } /** * Checks if the session has been initialized. * * @return true if Socks IO session is successfully initialized, false - otherwise. */ boolean isInitialized() { return initialized; } @Override public ByteChannel channel() { return innerSession.channel(); } @Override public SocketAddress getRemoteAddress() { return remoteAddress; } @Override public SocketAddress getLocalAddress() { return innerSession.getLocalAddress(); } @Override public int getEventMask() { return innerSession.getEventMask(); } @Override public void setEventMask(int ops) { innerSession.setEventMask(ops); } @Override public void setEvent(int op) { innerSession.setEvent(op); } @Override public void clearEvent(int op) { innerSession.clearEvent(op); } @Override public synchronized void close() { if (status >= IOSession.CLOSING) { return; } status = IOSession.CLOSED; innerSession.close(); } @Override public synchronized void shutdown() { if (status >= IOSession.CLOSING) { return; } status = IOSession.CLOSED; innerSession.shutdown(); } @Override public int getStatus() { return status; } @Override public boolean isClosed() { return innerSession.isClosed(); } @Override public int getSocketTimeout() { return innerSession.getSocketTimeout(); } @Override public void setSocketTimeout(int timeout) { innerSession.setSocketTimeout(timeout); } @Override public void setBufferStatus(SessionBufferStatus status) { innerSession.setBufferStatus(status); } @Override public boolean hasBufferedInput() { return innerSession.hasBufferedInput(); } @Override public boolean hasBufferedOutput() { return innerSession.hasBufferedOutput(); } @Override public void setAttribute(final String name, final Object obj) { innerSession.setAttribute(name, obj); } @Override public Object getAttribute(final String name) { return innerSession.getAttribute(name); } @Override public Object removeAttribute(final String name) { return innerSession.removeAttribute(name); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/socks/SocksIOSessionStrategy.java
package ai.preferred.venom.socks; import org.apache.http.HttpHost; import org.apache.http.conn.routing.HttpRoute; import org.apache.http.nio.conn.SchemeIOSessionStrategy; import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy; import org.apache.http.nio.reactor.IOSession; import org.apache.http.nio.reactor.ssl.SSLIOSession; import java.io.IOException; /** * Socks + TSL/SSL layering strategy. */ public class SocksIOSessionStrategy implements SchemeIOSessionStrategy { private final SSLIOSessionStrategy sslioSessionStrategy; /** * @param sslioSessionStrategy TSL/SSL strategy */ public SocksIOSessionStrategy(final SSLIOSessionStrategy sslioSessionStrategy) { this.sslioSessionStrategy = sslioSessionStrategy; } @Override public IOSession upgrade(final HttpHost host, final IOSession session) throws IOException { final HttpRoute route = (HttpRoute) session.getAttribute(IOSession.ATTACHMENT_KEY); final SocksIOSession socksSession = new SocksIOSession(session); socksSession.initialize(); if ("https".equals(route.getTargetHost().getSchemeName())) { final SSLIOSession wrappedSocksSession = sslioSessionStrategy.upgrade(route.getTargetHost(), socksSession); wrappedSocksSession.setAttribute(SocksIOSession.SESSION_KEY, socksSession); return wrappedSocksSession; } return socksSession; } @Override public boolean isLayeringRequired() { return true; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/DummyFileManager.java
/* * Copyright 2017 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.fetcher.Callback; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; import org.apache.tika.mime.MimeTypeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; /** * This class implements a FileManager that writes response content to a * file on the file system. * <p> * This implementation is for debugging use and does not support get. * </p> * * @author Truong Quoc Tuan * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class DummyFileManager implements FileManager<Object> { /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(DummyFileManager.class); /** * The storage path on the file system to use for content storage. */ private final File storagePath; /** * The callback to trigger upon response. */ private final Callback callback; /** * Constructs an instance of DummyFileManager. * * @param storageDir storage directory to use for content storage */ public DummyFileManager(final String storageDir) { this(new File(storageDir)); } /** * Constructs an instance of DummyFileManager. * * @param storagePath storage path to use for content storage */ public DummyFileManager(final File storagePath) { this.storagePath = storagePath; this.callback = new FileManagerCallback(this); } /** * Write stream to file. * * @param in an instance of InputStream * @param parentDir the directory to save the file * @param filename the filename to write the file * @return path to the written file * @throws IOException if an I/O error occurs */ private String write(final InputStream in, final File parentDir, final String filename) throws IOException { if (!parentDir.exists() && !parentDir.mkdirs()) { throw new IOException("Cannot create the dir: " + parentDir); } if (parentDir.exists() && !parentDir.isDirectory()) { throw new IOException("The path is not a dir: " + parentDir); } final File htmlFile = new File(parentDir, filename); try (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(htmlFile))) { IOUtils.copy(in, out); } return htmlFile.getAbsolutePath(); } @Override public final Callback getCallback() { return callback; } @Override public final String put(final Request request, final Response response) throws StorageException { try { final InputStream content = new ByteArrayInputStream(response.getContent()); final String md5 = DigestUtils.md5Hex(content); content.reset(); final String subDirName = md5.substring(0, 2); String tryFileExtension; try { tryFileExtension = StorageUtil.getFileExtension(response); } catch (MimeTypeException e) { LOGGER.warn("Cannot find mime type defaulting to no extension"); tryFileExtension = ""; } final String fileExtension = tryFileExtension; LOGGER.info("Response from request {} has been saved to {}", request.getUrl(), md5 + fileExtension); return write(content, new File(storagePath, subDirName), md5 + fileExtension); } catch (IOException e) { throw new StorageException("Error in put.", e); } } @Override public final Record<Object> get(final Object i) { throw new UnsupportedOperationException("File not found"); } @Override public final Record<Object> get(final Request request) { throw new UnsupportedOperationException("File not found"); } @Override public final void close() { // no closing is required } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/FileManager.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.fetcher.Callback; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import javax.annotation.Nullable; import javax.validation.constraints.NotNull; /** * This interface represents the basic functions a FileManager should have. * * @param <T> type of id * @author Maksim Tkachenko * @author Truong Quoc Tuan */ public interface FileManager<T> extends AutoCloseable { /** * Get callback upon completion of request. * <p> * Please note that blocking callbacks will significantly reduce the rate * at which request are processed. Please implement your own executors on * I/O blocking callbacks. * </p> * * @return Callback for FileManager */ @NotNull Callback getCallback(); /** * Puts record into database. * * @param request request * @param response Response * @return id of record * @throws StorageException throws StorageException */ @NotNull String put(@NotNull Request request, @NotNull Response response) throws StorageException; /** * Returns record by the internal record id. * * @param id record id * @return stored record * @throws StorageException throws StorageException */ @Nullable Record<T> get(T id) throws StorageException; /** * Returns latest record matching request. * * @param request request * @return stored record * @throws StorageException throws StorageException */ @NotNull Record<T> get(@NotNull Request request) throws StorageException; }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/FileManagerCallback.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.fetcher.Callback; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * This class implements the default callback for file managers. * * @author Ween Jiann Lee */ public class FileManagerCallback implements Callback { /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(FileManagerCallback.class); /** * The file manager used to store raw responses. */ private final FileManager<?> fileManager; /** * Constructs an instance of file manager callback. * * @param fileManager an instance of file manager used to store raw responses */ public FileManagerCallback(final FileManager<?> fileManager) { this.fileManager = fileManager; } @Override public final void completed(final Request request, final Response response) { try { fileManager.put(request, response); } catch (StorageException e) { LOGGER.error("Unable to store response for {}", request.getUrl(), e); } } @Override public final void failed(final Request request, final Exception ex) { // do nothing } @Override public final void cancelled(final Request request) { // do nothing } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/MysqlFileManager.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.fetcher.Callback; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.zaxxer.hikari.HikariDataSource; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; import org.apache.http.Header; import org.apache.http.ParseException; import org.apache.http.entity.ContentType; import org.apache.http.message.BasicHeader; import org.apache.tika.mime.MimeTypeException; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.sql.DataSource; import javax.validation.constraints.NotNull; import java.io.*; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; import java.sql.*; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; /** * This class implements a FileManager that writes response content to a * file on the file system and a record in MySQL database pointing to the * record and allows retrieving the file using an id or request. * * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public class MysqlFileManager implements FileManager<Integer> { /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(MysqlFileManager.class); /** * Default content type of response if not given. */ private static final ContentType DEFAULT_CONTENT_TYPE = ContentType.APPLICATION_OCTET_STREAM; /** * The DataSource to use for connecting to database. */ private final DataSource dataSource; /** * The name of the table in the database to use for record storage. */ private final String table; /** * The storage path on the file system to use for content storage. */ private final File storagePath; /** * The callback to trigger upon response. */ private final Callback callback; /** * Constructs an instance of MysqlFileManager. * * @param url a JDBC URL to the database * @param table table in the database to use for record storage * @param username username for the database * @param password password for the database * @param storageDir storage directory to use for content storage */ public MysqlFileManager(final String url, final String table, final String username, final String password, final String storageDir) { this(url, table, username, password, new File(storageDir)); } /** * Constructs an instance of MysqlFileManager. * * @param url a JDBC URL to the database * @param table name of table in the database to use for record storage * @param username username for the database * @param password password for the database * @param storagePath storage path to use for content storage */ public MysqlFileManager(final String url, final String table, final String username, final String password, final File storagePath) { this(url, table, username, password, storagePath, 10); } /** * Constructs an instance of MysqlFileManager. * * @param url a JDBC URL to the database * @param table name of table in the database to use for record storage * @param username username for the database * @param password password for the database * @param storagePath storage path to use for content storage * @param maxPoolSize maximum connection pool size */ public MysqlFileManager(final String url, final String table, final String username, final String password, final File storagePath, final int maxPoolSize) { this.dataSource = setupDataSource(url, username, password, maxPoolSize); ensureTable(table); this.table = table; this.storagePath = storagePath; this.callback = new CompletedThreadedCallback(this); } /** * Creates a Hikari DataSource. * * @param url a JDBC URL to the database * @param username username for the database * @param password password for the database * @return an instance of DataSource */ private DataSource setupDataSource(final String url, final String username, final String password, final int maxPoolSize) { final HikariDataSource dataSource = new HikariDataSource(); dataSource.setJdbcUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); dataSource.setAutoCommit(false); dataSource.setMaximumPoolSize(maxPoolSize); return dataSource; } /** * Check if table exists, if not create it. * * @param table name of table in the database to use for record storage */ private void ensureTable(final String table) { try (Connection conn = dataSource.getConnection(); Statement statement = conn.createStatement()) { final String sql = "CREATE TABLE IF NOT EXISTS `" + table + "` (" + "`id` int(11) NOT NULL AUTO_INCREMENT,\n" + "`url` varchar(1024) NOT NULL,\n" + "`method` ENUM('GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'OPTIONS') NOT NULL,\n" + "`request_headers` JSON DEFAULT NULL,\n" + "`request_body` JSON DEFAULT NULL,\n" + "`status_code` int(3) NOT NULL DEFAULT 200,\n" + "`response_headers` JSON DEFAULT NULL,\n" + "`mime_type` varchar(255) NOT NULL,\n" + "`encoding` varchar(255) NULL DEFAULT NULL,\n" + "`md5` varchar(32) NOT NULL,\n" + "`location` varchar(3) NOT NULL,\n" + "`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n" + "PRIMARY KEY (`id`),\n" + "INDEX `url_idx` (`url` ASC)\n" + ") CHARACTER SET latin1 COLLATE latin1_swedish_ci;"; statement.execute(sql); conn.commit(); } catch (SQLException e) { LOGGER.error("Unable to execute ensure table query", e); } } /** * Write stream to file. * * @param in an instance of InputStream * @param recordDir the directory to save the file * @param recordName the filename to write the file * @throws IOException if an I/O error occurs */ private void createFile(final InputStream in, final File recordDir, final String recordName) throws IOException { if (!recordDir.exists() && !recordDir.mkdirs()) { throw new IOException("Cannot create the record dir: " + recordDir); } if (recordDir.exists() && !recordDir.isDirectory()) { throw new IOException("The record path is not a dir: " + recordDir); } final File recordFile = new File(recordDir, recordName); try (BufferedOutputStream out = new BufferedOutputStream( new GZIPOutputStream(new FileOutputStream(recordFile)))) { IOUtils.copy(in, out); } } /** * Convert request headers from JSON to map. * * @param json JSONObject of headers * @return aa map of headers */ private Map<String, String> parseRequestHeaders(final JSONObject json) { final HashMap<String, String> map = new HashMap<>(); Iterator<?> i = json.keys(); while (i.hasNext()) { String key = (String) i.next(); map.put(key, json.getString(key)); } return map; } /** * Convert request headers from JSON to header array. * * @param json JSONObject of headers * @return an array of headers */ private Header[] parseResponseHeaders(final JSONObject json) { final List<Header> headers = new ArrayList<>(); Iterator<?> i = json.keys(); while (i.hasNext()) { String key = (String) i.next(); headers.add(new BasicHeader(key, json.getString(key))); } Header[] headersArray = new Header[headers.size()]; return headers.toArray(headersArray); } /** * Convert request body into map. * * @param request the instance of request with body * @return a map of request body */ private Map<String, String> prepareRequestBody(final Request request) { Map<String, String> requestBody = new HashMap<>(); if (request.getBody() != null) { for (String pair : request.getBody().split("&")) { String[] nvp = pair.split("="); String value = nvp.length > 1 ? nvp[1] : ""; requestBody.put(nvp[0], value); } } return requestBody; } /** * Get content type from record, if not found return default. * * @param mimeType name of mime type * @param encoding name of encoding * @return an instance of content type */ private ContentType getContentType(final String mimeType, final String encoding) { final Charset charset; if (encoding != null) { charset = Charset.forName(encoding); } else { charset = null; } try { return ContentType.create(mimeType, charset); } catch (ParseException e) { LOGGER.warn("Could not parse content type", e); } catch (UnsupportedCharsetException e) { LOGGER.warn("Charset is not available in this instance of the Java virtual machine", e); } return DEFAULT_CONTENT_TYPE; } /** * Create an instance of Record using the result from database. * * @param rs an instance of result set from database * @return an instance of Record * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set * @throws StorageException if file is not found */ private StorageRecord<Integer> createRecord(final ResultSet rs) throws SQLException, StorageException { final Map<String, String> requestHeaders = parseRequestHeaders(new JSONObject(rs.getString("request_headers"))); final Header[] responseHeaders = parseResponseHeaders(new JSONObject(rs.getString("response_headers"))); final String location = rs.getString("location"); String tryFileExtension; try { tryFileExtension = StorageUtil.getFileExtension(rs.getString("mime_type")); } catch (MimeTypeException e) { LOGGER.warn("Cannot find mime type defaulting to no extension"); tryFileExtension = ""; } final String fileExtension = tryFileExtension; final File file = new File(new File(storagePath, location), rs.getString("id") + fileExtension + ".gz"); final ContentType contentType = getContentType( rs.getString("mime_type"), rs.getString("encoding")); final byte[] responseContent; try { responseContent = IOUtils.toByteArray( new BufferedInputStream( new GZIPInputStream( new FileInputStream(file) ) ) ); } catch (FileNotFoundException e) { throw new StorageException("Record found but file not found for " + rs.getString("url") + ".", e); } catch (IOException e) { throw new StorageException("Error reading file for " + rs.getString("url") + ".", e); } LOGGER.debug("Record found for request: {}", rs.getString("url")); return StorageRecord.builder(rs.getInt("id")) .setUrl(rs.getString("url")) .setRequestMethod(Request.Method.valueOf(rs.getString("method"))) .setRequestHeaders(requestHeaders) .setResponseHeaders(responseHeaders) .setContentType(contentType) .setMD5(rs.getString("md5")) .setDateCreated(rs.getLong("date_created")) .setResponseContent(responseContent) .build(); } @Override public final Callback getCallback() { return callback; } @Override public final String put(final Request request, final Response response) throws StorageException { Connection conn = null; try { conn = dataSource.getConnection(); final ByteArrayInputStream content = new ByteArrayInputStream(response.getContent()); final String md5 = DigestUtils.md5Hex(content); content.reset(); final Map<String, String> responseHeaders = new HashMap<>(); for (final Header header : response.getHeaders()) { responseHeaders.put(header.getName(), header.getValue()); } final Map<String, String> requestBody = prepareRequestBody(request); final PreparedStatement pstmt = conn.prepareStatement( "INSERT INTO `" + table + "` (url, method, request_headers, request_body, " + "status_code, response_headers, mime_type, encoding, md5, location) " + "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS ); final String subDirName = md5.substring(0, 3); pstmt.setString(1, request.getUrl()); pstmt.setString(2, request.getMethod().name()); pstmt.setString(3, new JSONObject(request.getHeaders()).toString()); pstmt.setString(4, new JSONObject(requestBody).toString()); pstmt.setInt(5, response.getStatusCode()); pstmt.setString(6, new JSONObject(responseHeaders).toString()); pstmt.setString(7, response.getContentType().getMimeType()); if (response.getContentType().getCharset() != null) { pstmt.setString(8, response.getContentType().getCharset().name()); } else { pstmt.setString(8, null); } pstmt.setString(9, md5); pstmt.setString(10, subDirName); LOGGER.debug("Executing for: {}", request.getUrl()); if (pstmt.executeUpdate() == 1) { final ResultSet rs = pstmt.getGeneratedKeys(); if (rs.next()) { LOGGER.debug("MySQL insert successfully for: {}", request.getUrl()); final int id = rs.getInt(1); final String sId = String.valueOf(id); String tryFileExtension; try { tryFileExtension = StorageUtil.getFileExtension(response); } catch (MimeTypeException e) { LOGGER.warn("Cannot find mime type defaulting to no extension"); tryFileExtension = ""; } final String fileExtension = tryFileExtension; LOGGER.debug("Using extension ({}) for: {}", fileExtension, request.getUrl()); createFile(content, new File(storagePath, subDirName), sId + fileExtension + ".gz"); conn.commit(); pstmt.close(); LOGGER.debug("Record stored successfully for: {}", request.getUrl()); return sId; } } conn.rollback(); throw new StorageException("Cannot store the record"); } catch (SQLException | IOException e) { if (conn != null) { try { conn.rollback(); } catch (SQLException e2) { e.addSuppressed(e2); throw new StorageException("Cannot store the record", e); } } throw new StorageException("Cannot store the record", e); } finally { if (conn != null) { try { conn.close(); } catch (SQLException e) { throw new StorageException("Unable to close the connection", e); } } } } @Override public final Record<Integer> get(final Integer id) throws StorageException { try (Connection conn = dataSource.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM `" + table + "` WHERE id = ?")) { pstmt.setInt(1, id); final ResultSet rs = pstmt.executeQuery(); if (rs.next()) { return createRecord(rs); } } catch (SQLException e) { LOGGER.error("Record query failure for id: {}", id, e); throw new StorageException("Cannot retrieve the record", e); } LOGGER.debug("No record found for id: {}", id); return null; } @Override public final Record<Integer> get(final Request request) throws StorageException { try (Connection conn = dataSource.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM `" + table + "` " + "WHERE url = ? " + "AND method = ? " + "AND request_headers = CAST(? AS JSON) " + "AND request_body = CAST(? AS JSON) " + "ORDER BY `date_created` DESC " )) { pstmt.setString(1, request.getUrl()); pstmt.setString(2, request.getMethod().name()); pstmt.setString(3, new JSONObject(request.getHeaders()).toString()); pstmt.setString(4, new JSONObject(prepareRequestBody(request)).toString()); final ResultSet rs = pstmt.executeQuery(); if (rs.next()) { return createRecord(rs); } } catch (SQLException e) { LOGGER.error("Record query failure for request: {}", request.getUrl(), e); throw new StorageException("Cannot retrieve the record for " + request.getUrl() + ".", e); } LOGGER.debug("No record found for request: {}", request.getUrl()); return null; } @Override public final void close() throws SQLException { if (dataSource instanceof AutoCloseable) { try { ((AutoCloseable) dataSource).close(); } catch (final SQLException e) { throw e; } catch (Exception e) { LOGGER.error("Unexpected exception during closing", e); } } } /** * A callback wrapper for to run complete multithreaded. */ public static final class CompletedThreadedCallback implements Callback { /** * The executor used to submit tasks. */ private final ExecutorService executorService; /** * The callback to trigger upon response. */ private final FileManagerCallback fileManagerCallback; /** * Constructs an instance of ThreadedCallback. * * @param fileManager an instance of file manager used to store raw responses. */ private CompletedThreadedCallback(final FileManager<?> fileManager) { this.fileManagerCallback = new FileManagerCallback(fileManager); this.executorService = Executors.newCachedThreadPool( new ThreadFactoryBuilder().setNameFormat("FileManager I/O %d").build()); } @Override public void completed(final @NotNull Request request, final @NotNull Response response) { executorService.execute(() -> fileManagerCallback.completed(request, response)); } @Override public void failed(final @NotNull Request request, final @NotNull Exception ex) { fileManagerCallback.failed(request, ex); } @Override public void cancelled(final @NotNull Request request) { fileManagerCallback.cancelled(request); } } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/Record.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.request.Request; import org.apache.http.Header; import org.apache.http.entity.ContentType; import javax.annotation.Nullable; import javax.validation.constraints.NotNull; import java.util.Map; /** * This interface represents only the most basic of a record and * the fields that should be retrievable from database. * * @param <T> the type of id * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public interface Record<T> { /** * @return valid id if the record is stored, null otherwise */ T getId(); /** * @return URL of the stored content */ @NotNull String getURL(); /** * @return Request type */ @NotNull Request.Method getRequestMethod(); /** * @return map of request headers */ @Nullable Map<String, String> getRequestHeaders(); /** * @return ContentType of the content */ ContentType getContentType(); /** * @return map of request body */ @Nullable Map<String, String> getRequestBody(); /** * @return status code */ int getStatusCode(); /** * @return BaseResponse headers */ @Nullable Header[] getResponseHeaders(); /** * @return raw response file (uncompressed) */ byte[] getResponseContent(); /** * @return valid timestamp if the record is stored, -1 otherwise */ long getDateCreated(); }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/StorageException.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; /** * @author Maksim Tkachenko */ public class StorageException extends Exception { /** * Constructs a storage exception with a message. * * @param message A message about the exception */ public StorageException(final String message) { super(message); } /** * Constructs a storage exception with a message and a cause. * * @param message A message about the exception * @param cause The cause of the exception */ public StorageException(final String message, final Throwable cause) { super(message, cause); } /** * Constructs a storage exception with a cause. * * @param cause The cause of the exception */ public StorageException(final Throwable cause) { super(cause); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/StorageRecord.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.request.Request; import org.apache.http.Header; import org.apache.http.entity.ContentType; import java.util.Map; /** * This class implements a default storage record. * * @param <T> the type of id * @author Ween Jiann Lee */ public final class StorageRecord<T> implements Record<T> { /** * The id of this record. */ private final T id; /** * The url for this request. */ private final String url; /** * The method used for the request. */ private final Request.Method requestMethod; /** * The headers used for the request. */ private final Map<String, String> requestHeaders; /** * The body of the request. */ private final Map<String, String> requestBody; /** * The status code of the response. */ private final int statusCode; /** * The headers of the response. */ private final Header[] responseHeaders; /** * The content type of the response. */ private final ContentType contentType; /** * The content of the response. */ private final byte[] responseContent; /** * The md5 hash of the content. */ private final String md5; /** * The date this record was created. */ private final long dateCreated; /** * Constructs an instance of StorageRecord. * * @param builder an instance of builder */ private StorageRecord(final Builder<T> builder) { this.id = builder.id; this.url = builder.url; this.requestMethod = builder.requestMethod; this.requestHeaders = builder.requestHeaders; this.requestBody = builder.requestBody; this.statusCode = builder.statusCode; this.responseHeaders = builder.responseHeaders; this.contentType = builder.contentType; this.responseContent = builder.responseContent; this.md5 = builder.md5; this.dateCreated = builder.dateCreated; } /** * Create an instance of builder. * * @param <T> the type of id * @param id id for the record * @return a new instance of builder */ public static <T> Builder<T> builder(T id) { return new Builder<>(id); } @Override public T getId() { return id; } @Override public String getURL() { return url; } @Override public Request.Method getRequestMethod() { return requestMethod; } @Override public Map<String, String> getRequestHeaders() { return requestHeaders; } @Override public Map<String, String> getRequestBody() { return requestBody; } @Override public int getStatusCode() { return statusCode; } @Override public Header[] getResponseHeaders() { return responseHeaders; } @Override public ContentType getContentType() { return contentType; } @Override public byte[] getResponseContent() { return responseContent; } @Override public long getDateCreated() { return dateCreated; } /** * Get md5 hash of the response content. * * @return md5 hash of the response content */ public String getMD5() { return md5; } /** * A builder for StorageRecord class. * * @param <T> the type of id */ public static final class Builder<T> { /** * The id of this record. */ private final T id; /** * The url for this request. */ private String url; /** * The method used for the request. */ private Request.Method requestMethod; /** * The headers used for the request. */ private Map<String, String> requestHeaders; /** * The body of the request. */ private Map<String, String> requestBody; /** * The status code of the response. */ private int statusCode; /** * The headers of the response. */ private Header[] responseHeaders; /** * The content type of the response. */ private ContentType contentType; /** * The content of the response. */ private byte[] responseContent; /** * The md5 hash of the content. */ private String md5; /** * The date this record was created. */ private long dateCreated; /** * Constructs an instance of StorageRecord.Builder. * * @param id id for the record */ private Builder(T id) { this.id = id; } /** * Sets the url for the record. * * @param url url for the request * @return this */ public Builder<T> setUrl(final String url) { this.url = url; return this; } /** * Sets the request method for the record. * * @param requestMethod method of the request * @return this */ public Builder<T> setRequestMethod(final Request.Method requestMethod) { this.requestMethod = requestMethod; return this; } /** * Sets the request headers for the record. * * @param requestHeaders headers of the request * @return this */ public Builder<T> setRequestHeaders(final Map<String, String> requestHeaders) { this.requestHeaders = requestHeaders; return this; } /** * Sets the request body for the record. * * @param requestBody body of the request * @return this */ public Builder<T> setRequestBody(final Map<String, String> requestBody) { this.requestBody = requestBody; return this; } /** * Sets the response status code for the record. * * @param statusCode status code of the response * @return this */ public Builder<T> setStatusCode(final int statusCode) { this.statusCode = statusCode; return this; } /** * Sets the response headers for the record. * * @param responseHeaders headers of the response * @return this */ public Builder<T> setResponseHeaders(final Header[] responseHeaders) { this.responseHeaders = responseHeaders; return this; } /** * Sets the response content type for the record. * * @param contentType content type of the response * @return this */ public Builder<T> setContentType(final ContentType contentType) { this.contentType = contentType; return this; } /** * Sets the response content for the record. * * @param responseContent content of the response * @return this */ public Builder<T> setResponseContent(final byte[] responseContent) { this.responseContent = responseContent; return this; } /** * Sets the md5 hash of the response content for the record. * * @param md5 md5 hash of the response content * @return this */ public Builder<T> setMD5(final String md5) { this.md5 = md5; return this; } /** * Sets the date the record was created. * * @param dateCreated date created of the record * @return this */ public Builder<T> setDateCreated(final long dateCreated) { this.dateCreated = dateCreated; return this; } /** * Builds the storage record with the details specified. * * @return an instance of StorageRecord. */ public StorageRecord<T> build() { return new StorageRecord<>(this); } } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/storage/StorageUtil.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.storage; import ai.preferred.venom.response.Response; import org.apache.tika.mime.MimeType; import org.apache.tika.mime.MimeTypeException; import org.apache.tika.mime.MimeTypes; /** * A utility for storage needs. * * @author Ween Jiann Lee */ public final class StorageUtil { /** * Prevent construction of StorageUtil. */ private StorageUtil() { } /** * Get file extension from a response. * * @param response an instance of response * @return file extension for response content * @throws MimeTypeException if the given media type name is invalid */ public static String getFileExtension(final Response response) throws MimeTypeException { return getFileExtension(response.getContentType().getMimeType()); } /** * Get file extension from mime type name. * * @param mimeTypeStr mime type name * @return file extension for response content * @throws MimeTypeException if the given media type name is invalid */ public static String getFileExtension(final String mimeTypeStr) throws MimeTypeException { final MimeTypes defaultMimeTypes = MimeTypes.getDefaultMimeTypes(); final MimeType mimeType = defaultMimeTypes.forName(mimeTypeStr); return mimeType.getExtension(); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/uagent/DefaultUserAgent.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.uagent; /** * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class DefaultUserAgent implements UserAgent { @Override public final String get() { return "Venom/4.1 (" + System.getProperty("os.name") + "; " + System.getProperty("os.version") + "; " + System.getProperty("os.arch") + ")"; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/uagent/UserAgent.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.uagent; /** * This interface allows the user to define a user agent string. * * @author Maksim Tkachenko */ public interface UserAgent { /** * Gets the user agent for a request. * * @return user agent */ String get(); }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/utils/InlineExecutorService.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.utils; import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; import java.util.concurrent.AbstractExecutorService; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * @author Ween Jiann Lee */ public class InlineExecutorService extends AbstractExecutorService implements ExecutorService { /** * Is {@code true} if executor is shutdown. */ private final AtomicBoolean shutdown = new AtomicBoolean(false); /** * Is {@code true} if executor is terminated. */ private final AtomicBoolean terminated = new AtomicBoolean(false); /** * Lock when running. */ private final Lock executing = new ReentrantLock(); /** * Check and set terminated status. */ private void setTerminated() { if (!shutdown.get()) { return; } if (executing.tryLock()) { try { terminated.compareAndSet(false, true); } finally { executing.unlock(); } } } @Override public final void shutdown() { shutdown.compareAndSet(false, true); } @Nonnull @Override public final List<Runnable> shutdownNow() { shutdown.compareAndSet(false, true); return Collections.emptyList(); } @Override public final boolean isShutdown() { return shutdown.get(); } @Override public final boolean isTerminated() { if (terminated.get()) { return true; } setTerminated(); return terminated.get(); } @Override public final boolean awaitTermination(final long timeout, final @Nonnull TimeUnit unit) throws InterruptedException { if (terminated.get()) { return true; } executing.tryLock(timeout, unit); try { setTerminated(); } finally { executing.unlock(); } return terminated.get(); } @Override public final void execute(final @Nonnull Runnable command) { if (shutdown.get()) { throw new RejectedExecutionException("Executor has been shutdown."); } else { executing.lock(); try { command.run(); } finally { setTerminated(); executing.unlock(); } } } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/utils/ResponseDecompressor.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.utils; import org.apache.http.Header; import org.apache.http.HeaderElement; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.entity.DecompressingEntity; import org.apache.http.client.entity.DeflateInputStream; import org.apache.http.client.entity.InputStreamFactory; import org.apache.http.config.Lookup; import org.apache.http.config.RegistryBuilder; import java.util.Locale; import java.util.zip.GZIPInputStream; /** * Modified from: org.apache.http.client.protocol.ResponseContentEncoding. * * @author Maksim Tkachenko */ public class ResponseDecompressor { /** * An instance of deflate input stream. */ private static final InputStreamFactory DEFLATE = DeflateInputStream::new; /** * An instance of gzip input stream. */ private static final InputStreamFactory GZIP = GZIPInputStream::new; /** * A lookup of decoders. */ private final Lookup<InputStreamFactory> decoderRegistry; /** * Constructs a decompressor. */ public ResponseDecompressor() { this.decoderRegistry = RegistryBuilder.<InputStreamFactory>create() .register("gzip", GZIP) .register("x-gzip", GZIP) .register("deflate", DEFLATE) .build(); } /** * Decompress http response. * * @param response An instance of http response */ public final void decompress(final HttpResponse response) { final HttpEntity entity = response.getEntity(); if (entity != null && entity.getContentLength() != 0) { final Header ceheader = entity.getContentEncoding(); if (ceheader != null) { final HeaderElement[] codecs = ceheader.getElements(); for (final HeaderElement codec : codecs) { final String codecName = codec.getName().toLowerCase(Locale.ROOT); final InputStreamFactory decoderFactory = decoderRegistry.lookup(codecName); if (decoderFactory != null) { response.setEntity(new DecompressingEntity(response.getEntity(), decoderFactory)); response.removeHeaders("Content-Length"); response.removeHeaders("Content-Encoding"); response.removeHeaders("Content-MD5"); } } } } } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/utils/UrlUtil.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.utils; import ai.preferred.venom.request.Request; import java.net.URI; import java.net.URISyntaxException; /** * A utility for managing URLs. * * @author Ween Jiann Lee */ public final class UrlUtil { /** * Prevent construction of UrlUtil. */ private UrlUtil() { } /** * Get base url from a request. * * @param request an instance of request * @return base URL string * @throws URISyntaxException if not a proper URL */ @Deprecated public static String getBaseUrl(final Request request) throws URISyntaxException { final URI uri = new URI(request.getUrl()); final URI baseUri = new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), uri.getPath(), null, null); return baseUri.toString(); } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/validator/EmptyContentValidator.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.validator; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * This class determines the validity of a response by its content length. * <p> * An empty content should return {@code Status.INVALID_CONTENT}, or * {@code Status.VALID} otherwise. * </p> * * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class EmptyContentValidator implements Validator { /** * An instance of this validator. */ public static final EmptyContentValidator INSTANCE = new EmptyContentValidator(); /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(EmptyContentValidator.class); @Override public final Status isValid(final Request request, final Response response) { if (response.getContent() != null && response.getContent().length > 0) { return Status.VALID; } LOGGER.warn("Empty response received for {}", request.getUrl()); return Status.INVALID_CONTENT; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/validator/MimeTypeValidator.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.validator; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.regex.Pattern; /** * This class determines the validity of a response by its mime type. * <p> * A mime type that matches the pattern should return {@code Status.INVALID_CONTENT}, * or {@code Status.VALID} otherwise. * </p> * * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class MimeTypeValidator implements Validator { /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(MimeTypeValidator.class); /** * The pattern the mime type should match. */ private final Pattern regex; /** * Constructs mime type validator. * * @param regex A regex string to match valid mime type */ public MimeTypeValidator(final String regex) { this(Pattern.compile(regex)); } /** * Constructs mime type validator. * * @param regex A regex pattern to match valid mime type */ public MimeTypeValidator(final Pattern regex) { this.regex = regex; } @Override public final Status isValid(final Request request, final Response response) { if (regex.matcher(response.getContentType().getMimeType()).matches()) { return Status.VALID; } LOGGER.warn("Invalid ({}) Mime type received for {}", response.getContentType().getMimeType(), request.getUrl()); return Status.INVALID_CONTENT; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/validator/PipelineValidator.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.validator; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.LinkedList; import java.util.List; /** * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class PipelineValidator implements Validator { /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(PipelineValidator.class); /** * The list of validator to validate against. */ private final List<Validator> validators; /** * Constructs pipeline validator. * * @param validators A list of validators */ public PipelineValidator(final Validator... validators) { this.validators = new LinkedList<>(Arrays.asList(validators)); } /** * Constructs pipeline validator. * * @param validators A list of validators */ public PipelineValidator(final List<Validator> validators) { this.validators = new LinkedList<>(validators); } @Override public final Status isValid(final Request request, final Response response) { for (final Validator v : validators) { if (v != null) { final Status status = v.isValid(request, response); if (status != Status.VALID) { return status; } } else { LOGGER.warn("Null validator found. Please check your code, this might represent a bug."); } } return Status.VALID; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/validator/StatusOkValidator.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.validator; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * This class determines the validity of a response by its status code. * <p> * A code 200 should return {@code Status.VALID}, or {@code Status.INVALID_CONTENT} * otherwise. * </p> * * @author Maksim Tkachenko * @author Ween Jiann Lee */ public class StatusOkValidator implements Validator { /** * An instance of this validator. */ public static final StatusOkValidator INSTANCE = new StatusOkValidator(); /** * Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(StatusOkValidator.class); @Override public final Status isValid(final Request request, final Response response) { if (response.getStatusCode() != 200) { LOGGER.warn("Status code {} received for {}", response.getStatusCode(), request.getUrl()); return Status.INVALID_STATUS_CODE; } return Status.VALID; } }
0
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom
java-sources/ai/preferred/venom/4.2.7/ai/preferred/venom/validator/Validator.java
/* * Copyright 2018 Preferred.AI * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.preferred.venom.validator; import ai.preferred.venom.request.Request; import ai.preferred.venom.response.Response; import javax.validation.constraints.NotNull; /** * @author Maksim Tkachenko * @author Truong Quoc Tuan * @author Ween Jiann Lee */ public interface Validator { /** * A validator that always return valid. */ Validator ALWAYS_VALID = (request, response) -> Status.VALID; /** * Method will be called when a response need validation. * * @param request request sent to fetch a response * @param response response fetched * @return the status of validation */ Status isValid(@NotNull Request request, @NotNull Response response); /** * The allowed return status of validation. */ enum Status { /** * The response is valid. */ VALID, /** * The response has invalid content. */ INVALID_CONTENT, /** * The response is invalid as it is blocked. */ INVALID_BLOCKED, /** * The response is invalid due to the status code. */ INVALID_STATUS_CODE, /** * Stop processing this job. */ STOP } }
0
java-sources/ai/proba/probasdk/probasdk/0.1.2/ai/proba
java-sources/ai/proba/probasdk/probasdk/0.1.2/ai/proba/probasdk/ShakeDetector.java
/* Copyright 2010 Square, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ai.proba.probasdk; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import java.util.ArrayList; import java.util.List; /** * Detects phone shaking. If more than 75% of the samples taken in the past 0.5s are * accelerating, the device is a) shaking, or b) free falling 1.84m (h = * 1/2*g*t^2*3/4). * * @author Bob Lee (bob@squareup.com) * @author Eric Burke (eric@squareup.com) */ public class ShakeDetector implements SensorEventListener { public static final int SENSITIVITY_LIGHT = 11; public static final int SENSITIVITY_MEDIUM = 13; public static final int SENSITIVITY_HARD = 15; private static final int DEFAULT_ACCELERATION_THRESHOLD = SENSITIVITY_MEDIUM; /** * When the magnitude of total acceleration exceeds this * value, the phone is accelerating. */ private int accelerationThreshold = DEFAULT_ACCELERATION_THRESHOLD; /** Listens for shakes. */ public interface Listener { /** Called on the main thread when the device is shaken. */ void hearShake(); } private final SampleQueue queue = new SampleQueue(); private final Listener listener; private SensorManager sensorManager; private Sensor accelerometer; public ShakeDetector(Listener listener) { this.listener = listener; } /** * Starts listening for shakes on devices with appropriate hardware. * * @return true if the device supports shake detection. */ public boolean start(SensorManager sensorManager) { // Already started? if (accelerometer != null) { return true; } accelerometer = sensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER); // If this phone has an accelerometer, listen to it. if (accelerometer != null) { this.sensorManager = sensorManager; sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_FASTEST); } return accelerometer != null; } /** * Stops listening. Safe to call when already stopped. Ignored on devices * without appropriate hardware. */ public void stop() { if (accelerometer != null) { queue.clear(); sensorManager.unregisterListener(this, accelerometer); sensorManager = null; accelerometer = null; } } @Override public void onSensorChanged(SensorEvent event) { boolean accelerating = isAccelerating(event); long timestamp = event.timestamp; queue.add(timestamp, accelerating); if (queue.isShaking()) { queue.clear(); listener.hearShake(); } } /** Returns true if the device is currently accelerating. */ private boolean isAccelerating(SensorEvent event) { float ax = event.values[0]; float ay = event.values[1]; float az = event.values[2]; // Instead of comparing magnitude to ACCELERATION_THRESHOLD, // compare their squares. This is equivalent and doesn't need the // actual magnitude, which would be computed using (expensive) Math.sqrt(). final double magnitudeSquared = ax * ax + ay * ay + az * az; return magnitudeSquared > accelerationThreshold * accelerationThreshold; } /** Sets the acceleration threshold sensitivity. */ public void setSensitivity(int accelerationThreshold) { this.accelerationThreshold = accelerationThreshold; } /** Queue of samples. Keeps a running average. */ static class SampleQueue { /** Window size in ns. Used to compute the average. */ private static final long MAX_WINDOW_SIZE = 500000000; // 0.5s private static final long MIN_WINDOW_SIZE = MAX_WINDOW_SIZE >> 1; // 0.25s /** * Ensure the queue size never falls below this size, even if the device * fails to deliver this many events during the time window. The LG Ally * is one such device. */ private static final int MIN_QUEUE_SIZE = 4; private final SamplePool pool = new SamplePool(); private Sample oldest; private Sample newest; private int sampleCount; private int acceleratingCount; /** * Adds a sample. * * @param timestamp in nanoseconds of sample * @param accelerating true if > {@link #accelerationThreshold}. */ void add(long timestamp, boolean accelerating) { // Purge samples that proceed window. purge(timestamp - MAX_WINDOW_SIZE); // Add the sample to the queue. Sample added = pool.acquire(); added.timestamp = timestamp; added.accelerating = accelerating; added.next = null; if (newest != null) { newest.next = added; } newest = added; if (oldest == null) { oldest = added; } // Update running average. sampleCount++; if (accelerating) { acceleratingCount++; } } /** Removes all samples from this queue. */ void clear() { while (oldest != null) { Sample removed = oldest; oldest = removed.next; pool.release(removed); } newest = null; sampleCount = 0; acceleratingCount = 0; } /** Purges samples with timestamps older than cutoff. */ void purge(long cutoff) { while (sampleCount >= MIN_QUEUE_SIZE && oldest != null && cutoff - oldest.timestamp > 0) { // Remove sample. Sample removed = oldest; if (removed.accelerating) { acceleratingCount--; } sampleCount--; oldest = removed.next; if (oldest == null) { newest = null; } pool.release(removed); } } /** Copies the samples into a list, with the oldest entry at index 0. */ List<Sample> asList() { List<Sample> list = new ArrayList<Sample>(); Sample s = oldest; while (s != null) { list.add(s); s = s.next; } return list; } /** * Returns true if we have enough samples and more than 3/4 of those samples * are accelerating. */ boolean isShaking() { return newest != null && oldest != null && newest.timestamp - oldest.timestamp >= MIN_WINDOW_SIZE && acceleratingCount >= (sampleCount >> 1) + (sampleCount >> 2); } } /** An accelerometer sample. */ static class Sample { /** Time sample was taken. */ long timestamp; /** If acceleration > {@link #accelerationThreshold}. */ boolean accelerating; /** Next sample in the queue or pool. */ Sample next; } /** Pools samples. Avoids garbage collection. */ static class SamplePool { private Sample head; /** Acquires a sample from the pool. */ Sample acquire() { Sample acquired = head; if (acquired == null) { acquired = new Sample(); } else { // Remove instance from pool. head = acquired.next; } return acquired; } /** Returns a sample to the pool. */ void release(Sample sample) { sample.next = head; head = sample; } } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Browser.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * A sub-message containing Browser info. * Next ID = 4. * </pre> * * Protobuf type {@code common.Browser} */ public final class Browser extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Browser) BrowserOrBuilder { private static final long serialVersionUID = 0L; // Use Browser.newBuilder() to construct. private Browser(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Browser() { userAgent_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Browser(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Browser( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); userAgent_ = s; break; } case 18: { Size.Builder subBuilder = null; if (viewportSize_ != null) { subBuilder = viewportSize_.toBuilder(); } viewportSize_ = input.readMessage(Size.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(viewportSize_); viewportSize_ = subBuilder.buildPartial(); } break; } case 26: { ClientHints.Builder subBuilder = null; if (clientHints_ != null) { subBuilder = clientHints_.toBuilder(); } clientHints_ = input.readMessage(ClientHints.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(clientHints_); clientHints_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Browser_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Browser_fieldAccessorTable .ensureFieldAccessorsInitialized( Browser.class, Builder.class); } public static final int USER_AGENT_FIELD_NUMBER = 1; private volatile Object userAgent_; /** * <code>string user_agent = 1;</code> * @return The userAgent. */ @Override public String getUserAgent() { Object ref = userAgent_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); userAgent_ = s; return s; } } /** * <code>string user_agent = 1;</code> * @return The bytes for userAgent. */ @Override public com.google.protobuf.ByteString getUserAgentBytes() { Object ref = userAgent_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); userAgent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VIEWPORT_SIZE_FIELD_NUMBER = 2; private Size viewportSize_; /** * <code>.common.Size viewport_size = 2;</code> * @return Whether the viewportSize field is set. */ @Override public boolean hasViewportSize() { return viewportSize_ != null; } /** * <code>.common.Size viewport_size = 2;</code> * @return The viewportSize. */ @Override public Size getViewportSize() { return viewportSize_ == null ? Size.getDefaultInstance() : viewportSize_; } /** * <code>.common.Size viewport_size = 2;</code> */ @Override public SizeOrBuilder getViewportSizeOrBuilder() { return getViewportSize(); } public static final int CLIENT_HINTS_FIELD_NUMBER = 3; private ClientHints clientHints_; /** * <code>.common.ClientHints client_hints = 3;</code> * @return Whether the clientHints field is set. */ @Override public boolean hasClientHints() { return clientHints_ != null; } /** * <code>.common.ClientHints client_hints = 3;</code> * @return The clientHints. */ @Override public ClientHints getClientHints() { return clientHints_ == null ? ClientHints.getDefaultInstance() : clientHints_; } /** * <code>.common.ClientHints client_hints = 3;</code> */ @Override public ClientHintsOrBuilder getClientHintsOrBuilder() { return getClientHints(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getUserAgentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userAgent_); } if (viewportSize_ != null) { output.writeMessage(2, getViewportSize()); } if (clientHints_ != null) { output.writeMessage(3, getClientHints()); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUserAgentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userAgent_); } if (viewportSize_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getViewportSize()); } if (clientHints_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getClientHints()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Browser)) { return super.equals(obj); } Browser other = (Browser) obj; if (!getUserAgent() .equals(other.getUserAgent())) return false; if (hasViewportSize() != other.hasViewportSize()) return false; if (hasViewportSize()) { if (!getViewportSize() .equals(other.getViewportSize())) return false; } if (hasClientHints() != other.hasClientHints()) return false; if (hasClientHints()) { if (!getClientHints() .equals(other.getClientHints())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USER_AGENT_FIELD_NUMBER; hash = (53 * hash) + getUserAgent().hashCode(); if (hasViewportSize()) { hash = (37 * hash) + VIEWPORT_SIZE_FIELD_NUMBER; hash = (53 * hash) + getViewportSize().hashCode(); } if (hasClientHints()) { hash = (37 * hash) + CLIENT_HINTS_FIELD_NUMBER; hash = (53 * hash) + getClientHints().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Browser parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Browser parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Browser parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Browser parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Browser parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Browser parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Browser parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Browser 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 Browser parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Browser 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 Browser parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Browser parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Browser prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * A sub-message containing Browser info. * Next ID = 4. * </pre> * * Protobuf type {@code common.Browser} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Browser) BrowserOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Browser_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Browser_fieldAccessorTable .ensureFieldAccessorsInitialized( Browser.class, Builder.class); } // Construct using ai.promoted.proto.common.Browser.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); userAgent_ = ""; if (viewportSizeBuilder_ == null) { viewportSize_ = null; } else { viewportSize_ = null; viewportSizeBuilder_ = null; } if (clientHintsBuilder_ == null) { clientHints_ = null; } else { clientHints_ = null; clientHintsBuilder_ = null; } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Browser_descriptor; } @Override public Browser getDefaultInstanceForType() { return Browser.getDefaultInstance(); } @Override public Browser build() { Browser result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Browser buildPartial() { Browser result = new Browser(this); result.userAgent_ = userAgent_; if (viewportSizeBuilder_ == null) { result.viewportSize_ = viewportSize_; } else { result.viewportSize_ = viewportSizeBuilder_.build(); } if (clientHintsBuilder_ == null) { result.clientHints_ = clientHints_; } else { result.clientHints_ = clientHintsBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Browser) { return mergeFrom((Browser)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Browser other) { if (other == Browser.getDefaultInstance()) return this; if (!other.getUserAgent().isEmpty()) { userAgent_ = other.userAgent_; onChanged(); } if (other.hasViewportSize()) { mergeViewportSize(other.getViewportSize()); } if (other.hasClientHints()) { mergeClientHints(other.getClientHints()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Browser parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Browser) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private Object userAgent_ = ""; /** * <code>string user_agent = 1;</code> * @return The userAgent. */ public String getUserAgent() { Object ref = userAgent_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); userAgent_ = s; return s; } else { return (String) ref; } } /** * <code>string user_agent = 1;</code> * @return The bytes for userAgent. */ public com.google.protobuf.ByteString getUserAgentBytes() { Object ref = userAgent_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); userAgent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string user_agent = 1;</code> * @param value The userAgent to set. * @return This builder for chaining. */ public Builder setUserAgent( String value) { if (value == null) { throw new NullPointerException(); } userAgent_ = value; onChanged(); return this; } /** * <code>string user_agent = 1;</code> * @return This builder for chaining. */ public Builder clearUserAgent() { userAgent_ = getDefaultInstance().getUserAgent(); onChanged(); return this; } /** * <code>string user_agent = 1;</code> * @param value The bytes for userAgent to set. * @return This builder for chaining. */ public Builder setUserAgentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); userAgent_ = value; onChanged(); return this; } private Size viewportSize_; private com.google.protobuf.SingleFieldBuilderV3< Size, Size.Builder, SizeOrBuilder> viewportSizeBuilder_; /** * <code>.common.Size viewport_size = 2;</code> * @return Whether the viewportSize field is set. */ public boolean hasViewportSize() { return viewportSizeBuilder_ != null || viewportSize_ != null; } /** * <code>.common.Size viewport_size = 2;</code> * @return The viewportSize. */ public Size getViewportSize() { if (viewportSizeBuilder_ == null) { return viewportSize_ == null ? Size.getDefaultInstance() : viewportSize_; } else { return viewportSizeBuilder_.getMessage(); } } /** * <code>.common.Size viewport_size = 2;</code> */ public Builder setViewportSize(Size value) { if (viewportSizeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } viewportSize_ = value; onChanged(); } else { viewportSizeBuilder_.setMessage(value); } return this; } /** * <code>.common.Size viewport_size = 2;</code> */ public Builder setViewportSize( Size.Builder builderForValue) { if (viewportSizeBuilder_ == null) { viewportSize_ = builderForValue.build(); onChanged(); } else { viewportSizeBuilder_.setMessage(builderForValue.build()); } return this; } /** * <code>.common.Size viewport_size = 2;</code> */ public Builder mergeViewportSize(Size value) { if (viewportSizeBuilder_ == null) { if (viewportSize_ != null) { viewportSize_ = Size.newBuilder(viewportSize_).mergeFrom(value).buildPartial(); } else { viewportSize_ = value; } onChanged(); } else { viewportSizeBuilder_.mergeFrom(value); } return this; } /** * <code>.common.Size viewport_size = 2;</code> */ public Builder clearViewportSize() { if (viewportSizeBuilder_ == null) { viewportSize_ = null; onChanged(); } else { viewportSize_ = null; viewportSizeBuilder_ = null; } return this; } /** * <code>.common.Size viewport_size = 2;</code> */ public Size.Builder getViewportSizeBuilder() { onChanged(); return getViewportSizeFieldBuilder().getBuilder(); } /** * <code>.common.Size viewport_size = 2;</code> */ public SizeOrBuilder getViewportSizeOrBuilder() { if (viewportSizeBuilder_ != null) { return viewportSizeBuilder_.getMessageOrBuilder(); } else { return viewportSize_ == null ? Size.getDefaultInstance() : viewportSize_; } } /** * <code>.common.Size viewport_size = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< Size, Size.Builder, SizeOrBuilder> getViewportSizeFieldBuilder() { if (viewportSizeBuilder_ == null) { viewportSizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Size, Size.Builder, SizeOrBuilder>( getViewportSize(), getParentForChildren(), isClean()); viewportSize_ = null; } return viewportSizeBuilder_; } private ClientHints clientHints_; private com.google.protobuf.SingleFieldBuilderV3< ClientHints, ClientHints.Builder, ClientHintsOrBuilder> clientHintsBuilder_; /** * <code>.common.ClientHints client_hints = 3;</code> * @return Whether the clientHints field is set. */ public boolean hasClientHints() { return clientHintsBuilder_ != null || clientHints_ != null; } /** * <code>.common.ClientHints client_hints = 3;</code> * @return The clientHints. */ public ClientHints getClientHints() { if (clientHintsBuilder_ == null) { return clientHints_ == null ? ClientHints.getDefaultInstance() : clientHints_; } else { return clientHintsBuilder_.getMessage(); } } /** * <code>.common.ClientHints client_hints = 3;</code> */ public Builder setClientHints(ClientHints value) { if (clientHintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } clientHints_ = value; onChanged(); } else { clientHintsBuilder_.setMessage(value); } return this; } /** * <code>.common.ClientHints client_hints = 3;</code> */ public Builder setClientHints( ClientHints.Builder builderForValue) { if (clientHintsBuilder_ == null) { clientHints_ = builderForValue.build(); onChanged(); } else { clientHintsBuilder_.setMessage(builderForValue.build()); } return this; } /** * <code>.common.ClientHints client_hints = 3;</code> */ public Builder mergeClientHints(ClientHints value) { if (clientHintsBuilder_ == null) { if (clientHints_ != null) { clientHints_ = ClientHints.newBuilder(clientHints_).mergeFrom(value).buildPartial(); } else { clientHints_ = value; } onChanged(); } else { clientHintsBuilder_.mergeFrom(value); } return this; } /** * <code>.common.ClientHints client_hints = 3;</code> */ public Builder clearClientHints() { if (clientHintsBuilder_ == null) { clientHints_ = null; onChanged(); } else { clientHints_ = null; clientHintsBuilder_ = null; } return this; } /** * <code>.common.ClientHints client_hints = 3;</code> */ public ClientHints.Builder getClientHintsBuilder() { onChanged(); return getClientHintsFieldBuilder().getBuilder(); } /** * <code>.common.ClientHints client_hints = 3;</code> */ public ClientHintsOrBuilder getClientHintsOrBuilder() { if (clientHintsBuilder_ != null) { return clientHintsBuilder_.getMessageOrBuilder(); } else { return clientHints_ == null ? ClientHints.getDefaultInstance() : clientHints_; } } /** * <code>.common.ClientHints client_hints = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ClientHints, ClientHints.Builder, ClientHintsOrBuilder> getClientHintsFieldBuilder() { if (clientHintsBuilder_ == null) { clientHintsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ClientHints, ClientHints.Builder, ClientHintsOrBuilder>( getClientHints(), getParentForChildren(), isClean()); clientHints_ = null; } return clientHintsBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Browser) } // @@protoc_insertion_point(class_scope:common.Browser) private static final Browser DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Browser(); } public static Browser getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Browser> PARSER = new com.google.protobuf.AbstractParser<Browser>() { @Override public Browser parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Browser(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Browser> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Browser> getParserForType() { return PARSER; } @Override public Browser getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/BrowserOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface BrowserOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Browser) com.google.protobuf.MessageOrBuilder { /** * <code>string user_agent = 1;</code> * @return The userAgent. */ String getUserAgent(); /** * <code>string user_agent = 1;</code> * @return The bytes for userAgent. */ com.google.protobuf.ByteString getUserAgentBytes(); /** * <code>.common.Size viewport_size = 2;</code> * @return Whether the viewportSize field is set. */ boolean hasViewportSize(); /** * <code>.common.Size viewport_size = 2;</code> * @return The viewportSize. */ Size getViewportSize(); /** * <code>.common.Size viewport_size = 2;</code> */ SizeOrBuilder getViewportSizeOrBuilder(); /** * <code>.common.ClientHints client_hints = 3;</code> * @return Whether the clientHints field is set. */ boolean hasClientHints(); /** * <code>.common.ClientHints client_hints = 3;</code> * @return The clientHints. */ ClientHints getClientHints(); /** * <code>.common.ClientHints client_hints = 3;</code> */ ClientHintsOrBuilder getClientHintsOrBuilder(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ClientHintBrand.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * https://raw.githubusercontent.com/snowplow/iglu-central/master/schemas/org.ietf/http_client_hints/jsonschema/1-0-0 * a part of ClientHints. * </pre> * * Protobuf type {@code common.ClientHintBrand} */ public final class ClientHintBrand extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.ClientHintBrand) ClientHintBrandOrBuilder { private static final long serialVersionUID = 0L; // Use ClientHintBrand.newBuilder() to construct. private ClientHintBrand(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private ClientHintBrand() { brand_ = ""; version_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new ClientHintBrand(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ClientHintBrand( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); brand_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); version_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_ClientHintBrand_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_ClientHintBrand_fieldAccessorTable .ensureFieldAccessorsInitialized( ClientHintBrand.class, Builder.class); } public static final int BRAND_FIELD_NUMBER = 1; private volatile Object brand_; /** * <code>string brand = 1;</code> * @return The brand. */ @Override public String getBrand() { Object ref = brand_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); brand_ = s; return s; } } /** * <code>string brand = 1;</code> * @return The bytes for brand. */ @Override public com.google.protobuf.ByteString getBrandBytes() { Object ref = brand_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); brand_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VERSION_FIELD_NUMBER = 2; private volatile Object version_; /** * <code>string version = 2;</code> * @return The version. */ @Override public String getVersion() { Object ref = version_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); version_ = s; return s; } } /** * <code>string version = 2;</code> * @return The bytes for version. */ @Override public com.google.protobuf.ByteString getVersionBytes() { Object ref = version_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getBrandBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, brand_); } if (!getVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getBrandBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, brand_); } if (!getVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof ClientHintBrand)) { return super.equals(obj); } ClientHintBrand other = (ClientHintBrand) obj; if (!getBrand() .equals(other.getBrand())) return false; if (!getVersion() .equals(other.getVersion())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + BRAND_FIELD_NUMBER; hash = (53 * hash) + getBrand().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static ClientHintBrand parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientHintBrand parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientHintBrand parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientHintBrand parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientHintBrand parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientHintBrand parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientHintBrand parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ClientHintBrand 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 ClientHintBrand parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ClientHintBrand 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 ClientHintBrand parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ClientHintBrand parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(ClientHintBrand prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * https://raw.githubusercontent.com/snowplow/iglu-central/master/schemas/org.ietf/http_client_hints/jsonschema/1-0-0 * a part of ClientHints. * </pre> * * Protobuf type {@code common.ClientHintBrand} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.ClientHintBrand) ClientHintBrandOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_ClientHintBrand_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_ClientHintBrand_fieldAccessorTable .ensureFieldAccessorsInitialized( ClientHintBrand.class, Builder.class); } // Construct using ai.promoted.proto.common.ClientHintBrand.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); brand_ = ""; version_ = ""; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_ClientHintBrand_descriptor; } @Override public ClientHintBrand getDefaultInstanceForType() { return ClientHintBrand.getDefaultInstance(); } @Override public ClientHintBrand build() { ClientHintBrand result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public ClientHintBrand buildPartial() { ClientHintBrand result = new ClientHintBrand(this); result.brand_ = brand_; result.version_ = version_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ClientHintBrand) { return mergeFrom((ClientHintBrand)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ClientHintBrand other) { if (other == ClientHintBrand.getDefaultInstance()) return this; if (!other.getBrand().isEmpty()) { brand_ = other.brand_; onChanged(); } if (!other.getVersion().isEmpty()) { version_ = other.version_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ClientHintBrand parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ClientHintBrand) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private Object brand_ = ""; /** * <code>string brand = 1;</code> * @return The brand. */ public String getBrand() { Object ref = brand_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); brand_ = s; return s; } else { return (String) ref; } } /** * <code>string brand = 1;</code> * @return The bytes for brand. */ public com.google.protobuf.ByteString getBrandBytes() { Object ref = brand_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); brand_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string brand = 1;</code> * @param value The brand to set. * @return This builder for chaining. */ public Builder setBrand( String value) { if (value == null) { throw new NullPointerException(); } brand_ = value; onChanged(); return this; } /** * <code>string brand = 1;</code> * @return This builder for chaining. */ public Builder clearBrand() { brand_ = getDefaultInstance().getBrand(); onChanged(); return this; } /** * <code>string brand = 1;</code> * @param value The bytes for brand to set. * @return This builder for chaining. */ public Builder setBrandBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); brand_ = value; onChanged(); return this; } private Object version_ = ""; /** * <code>string version = 2;</code> * @return The version. */ public String getVersion() { Object ref = version_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); version_ = s; return s; } else { return (String) ref; } } /** * <code>string version = 2;</code> * @return The bytes for version. */ public com.google.protobuf.ByteString getVersionBytes() { Object ref = version_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string version = 2;</code> * @param value The version to set. * @return This builder for chaining. */ public Builder setVersion( String value) { if (value == null) { throw new NullPointerException(); } version_ = value; onChanged(); return this; } /** * <code>string version = 2;</code> * @return This builder for chaining. */ public Builder clearVersion() { version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** * <code>string version = 2;</code> * @param value The bytes for version to set. * @return This builder for chaining. */ public Builder setVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); version_ = value; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.ClientHintBrand) } // @@protoc_insertion_point(class_scope:common.ClientHintBrand) private static final ClientHintBrand DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ClientHintBrand(); } public static ClientHintBrand getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<ClientHintBrand> PARSER = new com.google.protobuf.AbstractParser<ClientHintBrand>() { @Override public ClientHintBrand parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ClientHintBrand(input, extensionRegistry); } }; public static com.google.protobuf.Parser<ClientHintBrand> parser() { return PARSER; } @Override public com.google.protobuf.Parser<ClientHintBrand> getParserForType() { return PARSER; } @Override public ClientHintBrand getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ClientHintBrandOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface ClientHintBrandOrBuilder extends // @@protoc_insertion_point(interface_extends:common.ClientHintBrand) com.google.protobuf.MessageOrBuilder { /** * <code>string brand = 1;</code> * @return The brand. */ String getBrand(); /** * <code>string brand = 1;</code> * @return The bytes for brand. */ com.google.protobuf.ByteString getBrandBytes(); /** * <code>string version = 2;</code> * @return The version. */ String getVersion(); /** * <code>string version = 2;</code> * @return The bytes for version. */ com.google.protobuf.ByteString getVersionBytes(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ClientHints.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * https://raw.githubusercontent.com/snowplow/iglu-central/master/schemas/org.ietf/http_client_hints/jsonschema/1-0-0 * A newer alternative to user agent strings. * </pre> * * Protobuf type {@code common.ClientHints} */ public final class ClientHints extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.ClientHints) ClientHintsOrBuilder { private static final long serialVersionUID = 0L; // Use ClientHints.newBuilder() to construct. private ClientHints(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private ClientHints() { brand_ = java.util.Collections.emptyList(); architecture_ = ""; model_ = ""; platform_ = ""; platformVersion_ = ""; uaFullVersion_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new ClientHints(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ClientHints( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { isMobile_ = input.readBool(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { brand_ = new java.util.ArrayList<ClientHintBrand>(); mutable_bitField0_ |= 0x00000001; } brand_.add( input.readMessage(ClientHintBrand.parser(), extensionRegistry)); break; } case 26: { String s = input.readStringRequireUtf8(); architecture_ = s; break; } case 34: { String s = input.readStringRequireUtf8(); model_ = s; break; } case 42: { String s = input.readStringRequireUtf8(); platform_ = s; break; } case 50: { String s = input.readStringRequireUtf8(); platformVersion_ = s; break; } case 58: { String s = input.readStringRequireUtf8(); uaFullVersion_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { brand_ = java.util.Collections.unmodifiableList(brand_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_ClientHints_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_ClientHints_fieldAccessorTable .ensureFieldAccessorsInitialized( ClientHints.class, Builder.class); } public static final int IS_MOBILE_FIELD_NUMBER = 1; private boolean isMobile_; /** * <code>bool is_mobile = 1;</code> * @return The isMobile. */ @Override public boolean getIsMobile() { return isMobile_; } public static final int BRAND_FIELD_NUMBER = 2; private java.util.List<ClientHintBrand> brand_; /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ @Override public java.util.List<ClientHintBrand> getBrandList() { return brand_; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ @Override public java.util.List<? extends ClientHintBrandOrBuilder> getBrandOrBuilderList() { return brand_; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ @Override public int getBrandCount() { return brand_.size(); } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ @Override public ClientHintBrand getBrand(int index) { return brand_.get(index); } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ @Override public ClientHintBrandOrBuilder getBrandOrBuilder( int index) { return brand_.get(index); } public static final int ARCHITECTURE_FIELD_NUMBER = 3; private volatile Object architecture_; /** * <code>string architecture = 3;</code> * @return The architecture. */ @Override public String getArchitecture() { Object ref = architecture_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); architecture_ = s; return s; } } /** * <code>string architecture = 3;</code> * @return The bytes for architecture. */ @Override public com.google.protobuf.ByteString getArchitectureBytes() { Object ref = architecture_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); architecture_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MODEL_FIELD_NUMBER = 4; private volatile Object model_; /** * <code>string model = 4;</code> * @return The model. */ @Override public String getModel() { Object ref = model_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); model_ = s; return s; } } /** * <code>string model = 4;</code> * @return The bytes for model. */ @Override public com.google.protobuf.ByteString getModelBytes() { Object ref = model_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); model_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PLATFORM_FIELD_NUMBER = 5; private volatile Object platform_; /** * <code>string platform = 5;</code> * @return The platform. */ @Override public String getPlatform() { Object ref = platform_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); platform_ = s; return s; } } /** * <code>string platform = 5;</code> * @return The bytes for platform. */ @Override public com.google.protobuf.ByteString getPlatformBytes() { Object ref = platform_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); platform_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PLATFORM_VERSION_FIELD_NUMBER = 6; private volatile Object platformVersion_; /** * <code>string platform_version = 6;</code> * @return The platformVersion. */ @Override public String getPlatformVersion() { Object ref = platformVersion_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); platformVersion_ = s; return s; } } /** * <code>string platform_version = 6;</code> * @return The bytes for platformVersion. */ @Override public com.google.protobuf.ByteString getPlatformVersionBytes() { Object ref = platformVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); platformVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int UA_FULL_VERSION_FIELD_NUMBER = 7; private volatile Object uaFullVersion_; /** * <code>string ua_full_version = 7;</code> * @return The uaFullVersion. */ @Override public String getUaFullVersion() { Object ref = uaFullVersion_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); uaFullVersion_ = s; return s; } } /** * <code>string ua_full_version = 7;</code> * @return The bytes for uaFullVersion. */ @Override public com.google.protobuf.ByteString getUaFullVersionBytes() { Object ref = uaFullVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); uaFullVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (isMobile_ != false) { output.writeBool(1, isMobile_); } for (int i = 0; i < brand_.size(); i++) { output.writeMessage(2, brand_.get(i)); } if (!getArchitectureBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, architecture_); } if (!getModelBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, model_); } if (!getPlatformBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, platform_); } if (!getPlatformVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, platformVersion_); } if (!getUaFullVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, uaFullVersion_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (isMobile_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, isMobile_); } for (int i = 0; i < brand_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, brand_.get(i)); } if (!getArchitectureBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, architecture_); } if (!getModelBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, model_); } if (!getPlatformBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, platform_); } if (!getPlatformVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, platformVersion_); } if (!getUaFullVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, uaFullVersion_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof ClientHints)) { return super.equals(obj); } ClientHints other = (ClientHints) obj; if (getIsMobile() != other.getIsMobile()) return false; if (!getBrandList() .equals(other.getBrandList())) return false; if (!getArchitecture() .equals(other.getArchitecture())) return false; if (!getModel() .equals(other.getModel())) return false; if (!getPlatform() .equals(other.getPlatform())) return false; if (!getPlatformVersion() .equals(other.getPlatformVersion())) return false; if (!getUaFullVersion() .equals(other.getUaFullVersion())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + IS_MOBILE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsMobile()); if (getBrandCount() > 0) { hash = (37 * hash) + BRAND_FIELD_NUMBER; hash = (53 * hash) + getBrandList().hashCode(); } hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; hash = (53 * hash) + getArchitecture().hashCode(); hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); hash = (37 * hash) + PLATFORM_FIELD_NUMBER; hash = (53 * hash) + getPlatform().hashCode(); hash = (37 * hash) + PLATFORM_VERSION_FIELD_NUMBER; hash = (53 * hash) + getPlatformVersion().hashCode(); hash = (37 * hash) + UA_FULL_VERSION_FIELD_NUMBER; hash = (53 * hash) + getUaFullVersion().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static ClientHints parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientHints parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientHints parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientHints parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientHints parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientHints parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientHints parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ClientHints 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 ClientHints parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ClientHints 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 ClientHints parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ClientHints parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(ClientHints prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * https://raw.githubusercontent.com/snowplow/iglu-central/master/schemas/org.ietf/http_client_hints/jsonschema/1-0-0 * A newer alternative to user agent strings. * </pre> * * Protobuf type {@code common.ClientHints} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.ClientHints) ClientHintsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_ClientHints_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_ClientHints_fieldAccessorTable .ensureFieldAccessorsInitialized( ClientHints.class, Builder.class); } // Construct using ai.promoted.proto.common.ClientHints.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getBrandFieldBuilder(); } } @Override public Builder clear() { super.clear(); isMobile_ = false; if (brandBuilder_ == null) { brand_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { brandBuilder_.clear(); } architecture_ = ""; model_ = ""; platform_ = ""; platformVersion_ = ""; uaFullVersion_ = ""; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_ClientHints_descriptor; } @Override public ClientHints getDefaultInstanceForType() { return ClientHints.getDefaultInstance(); } @Override public ClientHints build() { ClientHints result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public ClientHints buildPartial() { ClientHints result = new ClientHints(this); int from_bitField0_ = bitField0_; result.isMobile_ = isMobile_; if (brandBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { brand_ = java.util.Collections.unmodifiableList(brand_); bitField0_ = (bitField0_ & ~0x00000001); } result.brand_ = brand_; } else { result.brand_ = brandBuilder_.build(); } result.architecture_ = architecture_; result.model_ = model_; result.platform_ = platform_; result.platformVersion_ = platformVersion_; result.uaFullVersion_ = uaFullVersion_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ClientHints) { return mergeFrom((ClientHints)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ClientHints other) { if (other == ClientHints.getDefaultInstance()) return this; if (other.getIsMobile() != false) { setIsMobile(other.getIsMobile()); } if (brandBuilder_ == null) { if (!other.brand_.isEmpty()) { if (brand_.isEmpty()) { brand_ = other.brand_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureBrandIsMutable(); brand_.addAll(other.brand_); } onChanged(); } } else { if (!other.brand_.isEmpty()) { if (brandBuilder_.isEmpty()) { brandBuilder_.dispose(); brandBuilder_ = null; brand_ = other.brand_; bitField0_ = (bitField0_ & ~0x00000001); brandBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getBrandFieldBuilder() : null; } else { brandBuilder_.addAllMessages(other.brand_); } } } if (!other.getArchitecture().isEmpty()) { architecture_ = other.architecture_; onChanged(); } if (!other.getModel().isEmpty()) { model_ = other.model_; onChanged(); } if (!other.getPlatform().isEmpty()) { platform_ = other.platform_; onChanged(); } if (!other.getPlatformVersion().isEmpty()) { platformVersion_ = other.platformVersion_; onChanged(); } if (!other.getUaFullVersion().isEmpty()) { uaFullVersion_ = other.uaFullVersion_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ClientHints parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ClientHints) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private boolean isMobile_ ; /** * <code>bool is_mobile = 1;</code> * @return The isMobile. */ @Override public boolean getIsMobile() { return isMobile_; } /** * <code>bool is_mobile = 1;</code> * @param value The isMobile to set. * @return This builder for chaining. */ public Builder setIsMobile(boolean value) { isMobile_ = value; onChanged(); return this; } /** * <code>bool is_mobile = 1;</code> * @return This builder for chaining. */ public Builder clearIsMobile() { isMobile_ = false; onChanged(); return this; } private java.util.List<ClientHintBrand> brand_ = java.util.Collections.emptyList(); private void ensureBrandIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { brand_ = new java.util.ArrayList<ClientHintBrand>(brand_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< ClientHintBrand, ClientHintBrand.Builder, ClientHintBrandOrBuilder> brandBuilder_; /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public java.util.List<ClientHintBrand> getBrandList() { if (brandBuilder_ == null) { return java.util.Collections.unmodifiableList(brand_); } else { return brandBuilder_.getMessageList(); } } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public int getBrandCount() { if (brandBuilder_ == null) { return brand_.size(); } else { return brandBuilder_.getCount(); } } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public ClientHintBrand getBrand(int index) { if (brandBuilder_ == null) { return brand_.get(index); } else { return brandBuilder_.getMessage(index); } } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder setBrand( int index, ClientHintBrand value) { if (brandBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBrandIsMutable(); brand_.set(index, value); onChanged(); } else { brandBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder setBrand( int index, ClientHintBrand.Builder builderForValue) { if (brandBuilder_ == null) { ensureBrandIsMutable(); brand_.set(index, builderForValue.build()); onChanged(); } else { brandBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder addBrand(ClientHintBrand value) { if (brandBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBrandIsMutable(); brand_.add(value); onChanged(); } else { brandBuilder_.addMessage(value); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder addBrand( int index, ClientHintBrand value) { if (brandBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBrandIsMutable(); brand_.add(index, value); onChanged(); } else { brandBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder addBrand( ClientHintBrand.Builder builderForValue) { if (brandBuilder_ == null) { ensureBrandIsMutable(); brand_.add(builderForValue.build()); onChanged(); } else { brandBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder addBrand( int index, ClientHintBrand.Builder builderForValue) { if (brandBuilder_ == null) { ensureBrandIsMutable(); brand_.add(index, builderForValue.build()); onChanged(); } else { brandBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder addAllBrand( Iterable<? extends ClientHintBrand> values) { if (brandBuilder_ == null) { ensureBrandIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, brand_); onChanged(); } else { brandBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder clearBrand() { if (brandBuilder_ == null) { brand_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { brandBuilder_.clear(); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public Builder removeBrand(int index) { if (brandBuilder_ == null) { ensureBrandIsMutable(); brand_.remove(index); onChanged(); } else { brandBuilder_.remove(index); } return this; } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public ClientHintBrand.Builder getBrandBuilder( int index) { return getBrandFieldBuilder().getBuilder(index); } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public ClientHintBrandOrBuilder getBrandOrBuilder( int index) { if (brandBuilder_ == null) { return brand_.get(index); } else { return brandBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public java.util.List<? extends ClientHintBrandOrBuilder> getBrandOrBuilderList() { if (brandBuilder_ != null) { return brandBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(brand_); } } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public ClientHintBrand.Builder addBrandBuilder() { return getBrandFieldBuilder().addBuilder( ClientHintBrand.getDefaultInstance()); } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public ClientHintBrand.Builder addBrandBuilder( int index) { return getBrandFieldBuilder().addBuilder( index, ClientHintBrand.getDefaultInstance()); } /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ public java.util.List<ClientHintBrand.Builder> getBrandBuilderList() { return getBrandFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ClientHintBrand, ClientHintBrand.Builder, ClientHintBrandOrBuilder> getBrandFieldBuilder() { if (brandBuilder_ == null) { brandBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ClientHintBrand, ClientHintBrand.Builder, ClientHintBrandOrBuilder>( brand_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); brand_ = null; } return brandBuilder_; } private Object architecture_ = ""; /** * <code>string architecture = 3;</code> * @return The architecture. */ public String getArchitecture() { Object ref = architecture_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); architecture_ = s; return s; } else { return (String) ref; } } /** * <code>string architecture = 3;</code> * @return The bytes for architecture. */ public com.google.protobuf.ByteString getArchitectureBytes() { Object ref = architecture_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); architecture_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string architecture = 3;</code> * @param value The architecture to set. * @return This builder for chaining. */ public Builder setArchitecture( String value) { if (value == null) { throw new NullPointerException(); } architecture_ = value; onChanged(); return this; } /** * <code>string architecture = 3;</code> * @return This builder for chaining. */ public Builder clearArchitecture() { architecture_ = getDefaultInstance().getArchitecture(); onChanged(); return this; } /** * <code>string architecture = 3;</code> * @param value The bytes for architecture to set. * @return This builder for chaining. */ public Builder setArchitectureBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); architecture_ = value; onChanged(); return this; } private Object model_ = ""; /** * <code>string model = 4;</code> * @return The model. */ public String getModel() { Object ref = model_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); model_ = s; return s; } else { return (String) ref; } } /** * <code>string model = 4;</code> * @return The bytes for model. */ public com.google.protobuf.ByteString getModelBytes() { Object ref = model_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); model_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string model = 4;</code> * @param value The model to set. * @return This builder for chaining. */ public Builder setModel( String value) { if (value == null) { throw new NullPointerException(); } model_ = value; onChanged(); return this; } /** * <code>string model = 4;</code> * @return This builder for chaining. */ public Builder clearModel() { model_ = getDefaultInstance().getModel(); onChanged(); return this; } /** * <code>string model = 4;</code> * @param value The bytes for model to set. * @return This builder for chaining. */ public Builder setModelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); model_ = value; onChanged(); return this; } private Object platform_ = ""; /** * <code>string platform = 5;</code> * @return The platform. */ public String getPlatform() { Object ref = platform_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); platform_ = s; return s; } else { return (String) ref; } } /** * <code>string platform = 5;</code> * @return The bytes for platform. */ public com.google.protobuf.ByteString getPlatformBytes() { Object ref = platform_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); platform_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string platform = 5;</code> * @param value The platform to set. * @return This builder for chaining. */ public Builder setPlatform( String value) { if (value == null) { throw new NullPointerException(); } platform_ = value; onChanged(); return this; } /** * <code>string platform = 5;</code> * @return This builder for chaining. */ public Builder clearPlatform() { platform_ = getDefaultInstance().getPlatform(); onChanged(); return this; } /** * <code>string platform = 5;</code> * @param value The bytes for platform to set. * @return This builder for chaining. */ public Builder setPlatformBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); platform_ = value; onChanged(); return this; } private Object platformVersion_ = ""; /** * <code>string platform_version = 6;</code> * @return The platformVersion. */ public String getPlatformVersion() { Object ref = platformVersion_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); platformVersion_ = s; return s; } else { return (String) ref; } } /** * <code>string platform_version = 6;</code> * @return The bytes for platformVersion. */ public com.google.protobuf.ByteString getPlatformVersionBytes() { Object ref = platformVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); platformVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string platform_version = 6;</code> * @param value The platformVersion to set. * @return This builder for chaining. */ public Builder setPlatformVersion( String value) { if (value == null) { throw new NullPointerException(); } platformVersion_ = value; onChanged(); return this; } /** * <code>string platform_version = 6;</code> * @return This builder for chaining. */ public Builder clearPlatformVersion() { platformVersion_ = getDefaultInstance().getPlatformVersion(); onChanged(); return this; } /** * <code>string platform_version = 6;</code> * @param value The bytes for platformVersion to set. * @return This builder for chaining. */ public Builder setPlatformVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); platformVersion_ = value; onChanged(); return this; } private Object uaFullVersion_ = ""; /** * <code>string ua_full_version = 7;</code> * @return The uaFullVersion. */ public String getUaFullVersion() { Object ref = uaFullVersion_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); uaFullVersion_ = s; return s; } else { return (String) ref; } } /** * <code>string ua_full_version = 7;</code> * @return The bytes for uaFullVersion. */ public com.google.protobuf.ByteString getUaFullVersionBytes() { Object ref = uaFullVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); uaFullVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string ua_full_version = 7;</code> * @param value The uaFullVersion to set. * @return This builder for chaining. */ public Builder setUaFullVersion( String value) { if (value == null) { throw new NullPointerException(); } uaFullVersion_ = value; onChanged(); return this; } /** * <code>string ua_full_version = 7;</code> * @return This builder for chaining. */ public Builder clearUaFullVersion() { uaFullVersion_ = getDefaultInstance().getUaFullVersion(); onChanged(); return this; } /** * <code>string ua_full_version = 7;</code> * @param value The bytes for uaFullVersion to set. * @return This builder for chaining. */ public Builder setUaFullVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); uaFullVersion_ = value; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.ClientHints) } // @@protoc_insertion_point(class_scope:common.ClientHints) private static final ClientHints DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ClientHints(); } public static ClientHints getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<ClientHints> PARSER = new com.google.protobuf.AbstractParser<ClientHints>() { @Override public ClientHints parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ClientHints(input, extensionRegistry); } }; public static com.google.protobuf.Parser<ClientHints> parser() { return PARSER; } @Override public com.google.protobuf.Parser<ClientHints> getParserForType() { return PARSER; } @Override public ClientHints getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ClientHintsOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface ClientHintsOrBuilder extends // @@protoc_insertion_point(interface_extends:common.ClientHints) com.google.protobuf.MessageOrBuilder { /** * <code>bool is_mobile = 1;</code> * @return The isMobile. */ boolean getIsMobile(); /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ java.util.List<ClientHintBrand> getBrandList(); /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ ClientHintBrand getBrand(int index); /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ int getBrandCount(); /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ java.util.List<? extends ClientHintBrandOrBuilder> getBrandOrBuilderList(); /** * <code>repeated .common.ClientHintBrand brand = 2;</code> */ ClientHintBrandOrBuilder getBrandOrBuilder( int index); /** * <code>string architecture = 3;</code> * @return The architecture. */ String getArchitecture(); /** * <code>string architecture = 3;</code> * @return The bytes for architecture. */ com.google.protobuf.ByteString getArchitectureBytes(); /** * <code>string model = 4;</code> * @return The model. */ String getModel(); /** * <code>string model = 4;</code> * @return The bytes for model. */ com.google.protobuf.ByteString getModelBytes(); /** * <code>string platform = 5;</code> * @return The platform. */ String getPlatform(); /** * <code>string platform = 5;</code> * @return The bytes for platform. */ com.google.protobuf.ByteString getPlatformBytes(); /** * <code>string platform_version = 6;</code> * @return The platformVersion. */ String getPlatformVersion(); /** * <code>string platform_version = 6;</code> * @return The bytes for platformVersion. */ com.google.protobuf.ByteString getPlatformVersionBytes(); /** * <code>string ua_full_version = 7;</code> * @return The uaFullVersion. */ String getUaFullVersion(); /** * <code>string ua_full_version = 7;</code> * @return The bytes for uaFullVersion. */ com.google.protobuf.ByteString getUaFullVersionBytes(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ClientInfo.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Info about the client. * Next ID = 3. * </pre> * * Protobuf type {@code common.ClientInfo} */ public final class ClientInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.ClientInfo) ClientInfoOrBuilder { private static final long serialVersionUID = 0L; // Use ClientInfo.newBuilder() to construct. private ClientInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private ClientInfo() { clientType_ = 0; trafficType_ = 0; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new ClientInfo(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ClientInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int rawValue = input.readEnum(); clientType_ = rawValue; break; } case 16: { int rawValue = input.readEnum(); trafficType_ = rawValue; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_ClientInfo_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_ClientInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( ClientInfo.class, Builder.class); } /** * <pre> * Next ID = 5; * </pre> * * Protobuf enum {@code common.ClientInfo.ClientType} */ public enum ClientType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>UNKNOWN_REQUEST_CLIENT = 0;</code> */ UNKNOWN_REQUEST_CLIENT(0), /** * <pre> * Your (customer) server. * </pre> * * <code>PLATFORM_SERVER = 1;</code> */ PLATFORM_SERVER(1), /** * <pre> * Your (customer) client. * </pre> * * <code>PLATFORM_CLIENT = 2;</code> */ PLATFORM_CLIENT(2), UNRECOGNIZED(-1), ; /** * <code>UNKNOWN_REQUEST_CLIENT = 0;</code> */ public static final int UNKNOWN_REQUEST_CLIENT_VALUE = 0; /** * <pre> * Your (customer) server. * </pre> * * <code>PLATFORM_SERVER = 1;</code> */ public static final int PLATFORM_SERVER_VALUE = 1; /** * <pre> * Your (customer) client. * </pre> * * <code>PLATFORM_CLIENT = 2;</code> */ public static final int PLATFORM_CLIENT_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static ClientType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static ClientType forNumber(int value) { switch (value) { case 0: return UNKNOWN_REQUEST_CLIENT; case 1: return PLATFORM_SERVER; case 2: return PLATFORM_CLIENT; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<ClientType> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< ClientType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<ClientType>() { public ClientType findValueByNumber(int number) { return ClientType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return ClientInfo.getDescriptor().getEnumTypes().get(0); } private static final ClientType[] VALUES = values(); public static ClientType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private ClientType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:common.ClientInfo.ClientType) } /** * <pre> * Used to indicate the type of traffic. We can use this to prioritize resources. * Next ID = 6. * </pre> * * Protobuf enum {@code common.ClientInfo.TrafficType} */ public enum TrafficType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>UNKNOWN_TRAFFIC_TYPE = 0;</code> */ UNKNOWN_TRAFFIC_TYPE(0), /** * <pre> * Live traffic. * </pre> * * <code>PRODUCTION = 1;</code> */ PRODUCTION(1), /** * <pre> * Replayed traffic. We'd like similar to PRODUCTION level. * </pre> * * <code>REPLAY = 2;</code> */ REPLAY(2), /** * <pre> * Shadow traffic to delivery during logging. * </pre> * * <code>SHADOW = 4;</code> */ SHADOW(4), UNRECOGNIZED(-1), ; /** * <code>UNKNOWN_TRAFFIC_TYPE = 0;</code> */ public static final int UNKNOWN_TRAFFIC_TYPE_VALUE = 0; /** * <pre> * Live traffic. * </pre> * * <code>PRODUCTION = 1;</code> */ public static final int PRODUCTION_VALUE = 1; /** * <pre> * Replayed traffic. We'd like similar to PRODUCTION level. * </pre> * * <code>REPLAY = 2;</code> */ public static final int REPLAY_VALUE = 2; /** * <pre> * Shadow traffic to delivery during logging. * </pre> * * <code>SHADOW = 4;</code> */ public static final int SHADOW_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { throw new IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static TrafficType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static TrafficType forNumber(int value) { switch (value) { case 0: return UNKNOWN_TRAFFIC_TYPE; case 1: return PRODUCTION; case 2: return REPLAY; case 4: return SHADOW; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<TrafficType> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< TrafficType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<TrafficType>() { public TrafficType findValueByNumber(int number) { return TrafficType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return ClientInfo.getDescriptor().getEnumTypes().get(1); } private static final TrafficType[] VALUES = values(); public static TrafficType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private TrafficType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:common.ClientInfo.TrafficType) } public static final int CLIENT_TYPE_FIELD_NUMBER = 1; private int clientType_; /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return The enum numeric value on the wire for clientType. */ @Override public int getClientTypeValue() { return clientType_; } /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return The clientType. */ @Override public ClientType getClientType() { @SuppressWarnings("deprecation") ClientType result = ClientType.valueOf(clientType_); return result == null ? ClientType.UNRECOGNIZED : result; } public static final int TRAFFIC_TYPE_FIELD_NUMBER = 2; private int trafficType_; /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return The enum numeric value on the wire for trafficType. */ @Override public int getTrafficTypeValue() { return trafficType_; } /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return The trafficType. */ @Override public TrafficType getTrafficType() { @SuppressWarnings("deprecation") TrafficType result = TrafficType.valueOf(trafficType_); return result == null ? TrafficType.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (clientType_ != ClientType.UNKNOWN_REQUEST_CLIENT.getNumber()) { output.writeEnum(1, clientType_); } if (trafficType_ != TrafficType.UNKNOWN_TRAFFIC_TYPE.getNumber()) { output.writeEnum(2, trafficType_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (clientType_ != ClientType.UNKNOWN_REQUEST_CLIENT.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, clientType_); } if (trafficType_ != TrafficType.UNKNOWN_TRAFFIC_TYPE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, trafficType_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof ClientInfo)) { return super.equals(obj); } ClientInfo other = (ClientInfo) obj; if (clientType_ != other.clientType_) return false; if (trafficType_ != other.trafficType_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CLIENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + clientType_; hash = (37 * hash) + TRAFFIC_TYPE_FIELD_NUMBER; hash = (53 * hash) + trafficType_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static ClientInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ClientInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ClientInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ClientInfo 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 ClientInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ClientInfo 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 ClientInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ClientInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(ClientInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Info about the client. * Next ID = 3. * </pre> * * Protobuf type {@code common.ClientInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.ClientInfo) ClientInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_ClientInfo_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_ClientInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( ClientInfo.class, Builder.class); } // Construct using ai.promoted.proto.common.ClientInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); clientType_ = 0; trafficType_ = 0; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_ClientInfo_descriptor; } @Override public ClientInfo getDefaultInstanceForType() { return ClientInfo.getDefaultInstance(); } @Override public ClientInfo build() { ClientInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public ClientInfo buildPartial() { ClientInfo result = new ClientInfo(this); result.clientType_ = clientType_; result.trafficType_ = trafficType_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ClientInfo) { return mergeFrom((ClientInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ClientInfo other) { if (other == ClientInfo.getDefaultInstance()) return this; if (other.clientType_ != 0) { setClientTypeValue(other.getClientTypeValue()); } if (other.trafficType_ != 0) { setTrafficTypeValue(other.getTrafficTypeValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ClientInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ClientInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int clientType_ = 0; /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return The enum numeric value on the wire for clientType. */ @Override public int getClientTypeValue() { return clientType_; } /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @param value The enum numeric value on the wire for clientType to set. * @return This builder for chaining. */ public Builder setClientTypeValue(int value) { clientType_ = value; onChanged(); return this; } /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return The clientType. */ @Override public ClientType getClientType() { @SuppressWarnings("deprecation") ClientType result = ClientType.valueOf(clientType_); return result == null ? ClientType.UNRECOGNIZED : result; } /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @param value The clientType to set. * @return This builder for chaining. */ public Builder setClientType(ClientType value) { if (value == null) { throw new NullPointerException(); } clientType_ = value.getNumber(); onChanged(); return this; } /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return This builder for chaining. */ public Builder clearClientType() { clientType_ = 0; onChanged(); return this; } private int trafficType_ = 0; /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return The enum numeric value on the wire for trafficType. */ @Override public int getTrafficTypeValue() { return trafficType_; } /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @param value The enum numeric value on the wire for trafficType to set. * @return This builder for chaining. */ public Builder setTrafficTypeValue(int value) { trafficType_ = value; onChanged(); return this; } /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return The trafficType. */ @Override public TrafficType getTrafficType() { @SuppressWarnings("deprecation") TrafficType result = TrafficType.valueOf(trafficType_); return result == null ? TrafficType.UNRECOGNIZED : result; } /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @param value The trafficType to set. * @return This builder for chaining. */ public Builder setTrafficType(TrafficType value) { if (value == null) { throw new NullPointerException(); } trafficType_ = value.getNumber(); onChanged(); return this; } /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return This builder for chaining. */ public Builder clearTrafficType() { trafficType_ = 0; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.ClientInfo) } // @@protoc_insertion_point(class_scope:common.ClientInfo) private static final ClientInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ClientInfo(); } public static ClientInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<ClientInfo> PARSER = new com.google.protobuf.AbstractParser<ClientInfo>() { @Override public ClientInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ClientInfo(input, extensionRegistry); } }; public static com.google.protobuf.Parser<ClientInfo> parser() { return PARSER; } @Override public com.google.protobuf.Parser<ClientInfo> getParserForType() { return PARSER; } @Override public ClientInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ClientInfoOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface ClientInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:common.ClientInfo) com.google.protobuf.MessageOrBuilder { /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return The enum numeric value on the wire for clientType. */ int getClientTypeValue(); /** * <code>.common.ClientInfo.ClientType client_type = 1;</code> * @return The clientType. */ ClientInfo.ClientType getClientType(); /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return The enum numeric value on the wire for trafficType. */ int getTrafficTypeValue(); /** * <code>.common.ClientInfo.TrafficType traffic_type = 2;</code> * @return The trafficType. */ ClientInfo.TrafficType getTrafficType(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/CommonProto.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public final class CommonProto { private CommonProto() {} 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_common_EntityPath_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_EntityPath_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_UserInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_UserInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_ClientInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_ClientInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Locale_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Locale_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Size_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Size_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Screen_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Screen_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Device_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Device_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_ClientHints_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_ClientHints_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_ClientHintBrand_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_ClientHintBrand_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Browser_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Browser_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Location_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Location_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Timing_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Timing_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_common_Properties_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_common_Properties_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { String[] descriptorData = { "\n\031proto/common/common.proto\022\006common\032\034goo" + "gle/protobuf/struct.proto\"\211\001\n\nEntityPath" + "\022\023\n\013platform_id\030\001 \001(\004\022\023\n\013customer_id\030\002 \001" + "(\004\022\022\n\naccount_id\030\004 \001(\004\022\023\n\013campaign_id\030\005 " + "\001(\004\022\024\n\014promotion_id\030\006 \001(\004\022\022\n\ncontent_id\030" + "\003 \001(\004\"J\n\010UserInfo\022\017\n\007user_id\030\001 \001(\t\022\023\n\013lo" + "g_user_id\030\002 \001(\t\022\030\n\020is_internal_user\030\003 \001(" + "\010\"\255\002\n\nClientInfo\0222\n\013client_type\030\001 \001(\0162\035." + "common.ClientInfo.ClientType\0224\n\014traffic_" + "type\030\002 \001(\0162\036.common.ClientInfo.TrafficTy" + "pe\"X\n\nClientType\022\032\n\026UNKNOWN_REQUEST_CLIE" + "NT\020\000\022\023\n\017PLATFORM_SERVER\020\001\022\023\n\017PLATFORM_CL" + "IENT\020\002\"\004\010\003\020\004\"[\n\013TrafficType\022\030\n\024UNKNOWN_T" + "RAFFIC_TYPE\020\000\022\016\n\nPRODUCTION\020\001\022\n\n\006REPLAY\020" + "\002\022\n\n\006SHADOW\020\004\"\004\010\003\020\003\"\004\010\005\020\005\"4\n\006Locale\022\025\n\rl" + "anguage_code\030\001 \001(\t\022\023\n\013region_code\030\002 \001(\t\"" + "%\n\004Size\022\r\n\005width\030\001 \001(\r\022\016\n\006height\030\002 \001(\r\"3" + "\n\006Screen\022\032\n\004size\030\001 \001(\0132\014.common.Size\022\r\n\005" + "scale\030\002 \001(\002\"\234\002\n\006Device\022\'\n\013device_type\030\001 " + "\001(\0162\022.common.DeviceType\022\r\n\005brand\030\002 \001(\t\022\024" + "\n\014manufacturer\030\003 \001(\t\022\022\n\nidentifier\030\004 \001(\t" + "\022\022\n\nos_version\030\005 \001(\t\022\"\n\006locale\030\006 \001(\0132\016.c" + "ommon.LocaleB\002\030\001\022\036\n\006screen\030\007 \001(\0132\016.commo" + "n.Screen\022\022\n\nip_address\030\010 \001(\t\022\"\n\010location" + "\030\t \001(\0132\020.common.Location\022 \n\007browser\030\n \001(" + "\0132\017.common.Browser\"\262\001\n\013ClientHints\022\021\n\tis" + "_mobile\030\001 \001(\010\022&\n\005brand\030\002 \003(\0132\027.common.Cl" + "ientHintBrand\022\024\n\014architecture\030\003 \001(\t\022\r\n\005m" + "odel\030\004 \001(\t\022\020\n\010platform\030\005 \001(\t\022\030\n\020platform" + "_version\030\006 \001(\t\022\027\n\017ua_full_version\030\007 \001(\t\"" + "1\n\017ClientHintBrand\022\r\n\005brand\030\001 \001(\t\022\017\n\007ver" + "sion\030\002 \001(\t\"m\n\007Browser\022\022\n\nuser_agent\030\001 \001(" + "\t\022#\n\rviewport_size\030\002 \001(\0132\014.common.Size\022)" + "\n\014client_hints\030\003 \001(\0132\023.common.ClientHint" + "s\"K\n\010Location\022\020\n\010latitude\030\001 \001(\001\022\021\n\tlongi" + "tude\030\002 \001(\001\022\032\n\022accuracy_in_meters\030\003 \001(\001\"2" + "\n\006Timing\022\034\n\024client_log_timestamp\030\001 \001(\004J\004" + "\010\002\020\003J\004\010\003\020\004\"e\n\nProperties\022\026\n\014struct_bytes" + "\030\001 \001(\014H\000\022)\n\006struct\030\002 \001(\0132\027.google.protob" + "uf.StructH\000B\016\n\014struct_fieldJ\004\010\003\020\004*\335\001\n\014Cu" + "rrencyCode\022\031\n\025UNKNOWN_CURRENCY_CODE\020\000\022\007\n" + "\003USD\020\001\022\007\n\003EUR\020\002\022\007\n\003JPY\020\003\022\007\n\003GBP\020\004\022\007\n\003AUD" + "\020\005\022\007\n\003CAD\020\006\022\007\n\003CHF\020\007\022\007\n\003CNY\020\010\022\007\n\003HKD\020\t\022\007" + "\n\003NZD\020\n\022\007\n\003SEK\020\013\022\007\n\003KRW\020\014\022\007\n\003SGD\020\r\022\007\n\003NO" + "K\020\016\022\007\n\003MXN\020\017\022\007\n\003INR\020\020\022\007\n\003RUB\020\021\022\007\n\003ZAR\020\022\022" + "\007\n\003TRY\020\023\022\007\n\003BRL\020\024*J\n\nDeviceType\022\027\n\023UNKNO" + "WN_DEVICE_TYPE\020\000\022\013\n\007DESKTOP\020\001\022\n\n\006MOBILE\020" + "\002\022\n\n\006TABLET\020\003B)\n\030ai.promoted.proto.commo" + "nB\013CommonProtoP\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.StructProto.getDescriptor(), }); internal_static_common_EntityPath_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_common_EntityPath_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_EntityPath_descriptor, new String[] { "PlatformId", "CustomerId", "AccountId", "CampaignId", "PromotionId", "ContentId", }); internal_static_common_UserInfo_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_common_UserInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_UserInfo_descriptor, new String[] { "UserId", "LogUserId", "IsInternalUser", }); internal_static_common_ClientInfo_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_common_ClientInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_ClientInfo_descriptor, new String[] { "ClientType", "TrafficType", }); internal_static_common_Locale_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_common_Locale_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Locale_descriptor, new String[] { "LanguageCode", "RegionCode", }); internal_static_common_Size_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_common_Size_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Size_descriptor, new String[] { "Width", "Height", }); internal_static_common_Screen_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_common_Screen_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Screen_descriptor, new String[] { "Size", "Scale", }); internal_static_common_Device_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_common_Device_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Device_descriptor, new String[] { "DeviceType", "Brand", "Manufacturer", "Identifier", "OsVersion", "Locale", "Screen", "IpAddress", "Location", "Browser", }); internal_static_common_ClientHints_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_common_ClientHints_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_ClientHints_descriptor, new String[] { "IsMobile", "Brand", "Architecture", "Model", "Platform", "PlatformVersion", "UaFullVersion", }); internal_static_common_ClientHintBrand_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_common_ClientHintBrand_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_ClientHintBrand_descriptor, new String[] { "Brand", "Version", }); internal_static_common_Browser_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_common_Browser_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Browser_descriptor, new String[] { "UserAgent", "ViewportSize", "ClientHints", }); internal_static_common_Location_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_common_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Location_descriptor, new String[] { "Latitude", "Longitude", "AccuracyInMeters", }); internal_static_common_Timing_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_common_Timing_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Timing_descriptor, new String[] { "ClientLogTimestamp", }); internal_static_common_Properties_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_common_Properties_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_common_Properties_descriptor, new String[] { "StructBytes", "Struct", "StructField", }); com.google.protobuf.StructProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/CurrencyCode.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * Protobuf enum {@code common.CurrencyCode} */ public enum CurrencyCode implements com.google.protobuf.ProtocolMessageEnum { /** * <code>UNKNOWN_CURRENCY_CODE = 0;</code> */ UNKNOWN_CURRENCY_CODE(0), /** * <code>USD = 1;</code> */ USD(1), /** * <code>EUR = 2;</code> */ EUR(2), /** * <code>JPY = 3;</code> */ JPY(3), /** * <code>GBP = 4;</code> */ GBP(4), /** * <code>AUD = 5;</code> */ AUD(5), /** * <code>CAD = 6;</code> */ CAD(6), /** * <code>CHF = 7;</code> */ CHF(7), /** * <code>CNY = 8;</code> */ CNY(8), /** * <code>HKD = 9;</code> */ HKD(9), /** * <code>NZD = 10;</code> */ NZD(10), /** * <code>SEK = 11;</code> */ SEK(11), /** * <code>KRW = 12;</code> */ KRW(12), /** * <code>SGD = 13;</code> */ SGD(13), /** * <code>NOK = 14;</code> */ NOK(14), /** * <code>MXN = 15;</code> */ MXN(15), /** * <code>INR = 16;</code> */ INR(16), /** * <code>RUB = 17;</code> */ RUB(17), /** * <code>ZAR = 18;</code> */ ZAR(18), /** * <code>TRY = 19;</code> */ TRY(19), /** * <code>BRL = 20;</code> */ BRL(20), UNRECOGNIZED(-1), ; /** * <code>UNKNOWN_CURRENCY_CODE = 0;</code> */ public static final int UNKNOWN_CURRENCY_CODE_VALUE = 0; /** * <code>USD = 1;</code> */ public static final int USD_VALUE = 1; /** * <code>EUR = 2;</code> */ public static final int EUR_VALUE = 2; /** * <code>JPY = 3;</code> */ public static final int JPY_VALUE = 3; /** * <code>GBP = 4;</code> */ public static final int GBP_VALUE = 4; /** * <code>AUD = 5;</code> */ public static final int AUD_VALUE = 5; /** * <code>CAD = 6;</code> */ public static final int CAD_VALUE = 6; /** * <code>CHF = 7;</code> */ public static final int CHF_VALUE = 7; /** * <code>CNY = 8;</code> */ public static final int CNY_VALUE = 8; /** * <code>HKD = 9;</code> */ public static final int HKD_VALUE = 9; /** * <code>NZD = 10;</code> */ public static final int NZD_VALUE = 10; /** * <code>SEK = 11;</code> */ public static final int SEK_VALUE = 11; /** * <code>KRW = 12;</code> */ public static final int KRW_VALUE = 12; /** * <code>SGD = 13;</code> */ public static final int SGD_VALUE = 13; /** * <code>NOK = 14;</code> */ public static final int NOK_VALUE = 14; /** * <code>MXN = 15;</code> */ public static final int MXN_VALUE = 15; /** * <code>INR = 16;</code> */ public static final int INR_VALUE = 16; /** * <code>RUB = 17;</code> */ public static final int RUB_VALUE = 17; /** * <code>ZAR = 18;</code> */ public static final int ZAR_VALUE = 18; /** * <code>TRY = 19;</code> */ public static final int TRY_VALUE = 19; /** * <code>BRL = 20;</code> */ public static final int BRL_VALUE = 20; public final int getNumber() { if (this == UNRECOGNIZED) { throw new IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static CurrencyCode valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static CurrencyCode forNumber(int value) { switch (value) { case 0: return UNKNOWN_CURRENCY_CODE; case 1: return USD; case 2: return EUR; case 3: return JPY; case 4: return GBP; case 5: return AUD; case 6: return CAD; case 7: return CHF; case 8: return CNY; case 9: return HKD; case 10: return NZD; case 11: return SEK; case 12: return KRW; case 13: return SGD; case 14: return NOK; case 15: return MXN; case 16: return INR; case 17: return RUB; case 18: return ZAR; case 19: return TRY; case 20: return BRL; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<CurrencyCode> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< CurrencyCode> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<CurrencyCode>() { public CurrencyCode findValueByNumber(int number) { return CurrencyCode.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return CommonProto.getDescriptor().getEnumTypes().get(0); } private static final CurrencyCode[] VALUES = values(); public static CurrencyCode valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private CurrencyCode(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:common.CurrencyCode) }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Device.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * A sub-message containing Device info. * Next ID = 11. * </pre> * * Protobuf type {@code common.Device} */ public final class Device extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Device) DeviceOrBuilder { private static final long serialVersionUID = 0L; // Use Device.newBuilder() to construct. private Device(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Device() { deviceType_ = 0; brand_ = ""; manufacturer_ = ""; identifier_ = ""; osVersion_ = ""; ipAddress_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Device(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Device( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int rawValue = input.readEnum(); deviceType_ = rawValue; break; } case 18: { String s = input.readStringRequireUtf8(); brand_ = s; break; } case 26: { String s = input.readStringRequireUtf8(); manufacturer_ = s; break; } case 34: { String s = input.readStringRequireUtf8(); identifier_ = s; break; } case 42: { String s = input.readStringRequireUtf8(); osVersion_ = s; break; } case 50: { Locale.Builder subBuilder = null; if (locale_ != null) { subBuilder = locale_.toBuilder(); } locale_ = input.readMessage(Locale.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(locale_); locale_ = subBuilder.buildPartial(); } break; } case 58: { Screen.Builder subBuilder = null; if (screen_ != null) { subBuilder = screen_.toBuilder(); } screen_ = input.readMessage(Screen.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(screen_); screen_ = subBuilder.buildPartial(); } break; } case 66: { String s = input.readStringRequireUtf8(); ipAddress_ = s; break; } case 74: { Location.Builder subBuilder = null; if (location_ != null) { subBuilder = location_.toBuilder(); } location_ = input.readMessage(Location.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(location_); location_ = subBuilder.buildPartial(); } break; } case 82: { Browser.Builder subBuilder = null; if (browser_ != null) { subBuilder = browser_.toBuilder(); } browser_ = input.readMessage(Browser.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(browser_); browser_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Device_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Device_fieldAccessorTable .ensureFieldAccessorsInitialized( Device.class, Builder.class); } public static final int DEVICE_TYPE_FIELD_NUMBER = 1; private int deviceType_; /** * <code>.common.DeviceType device_type = 1;</code> * @return The enum numeric value on the wire for deviceType. */ @Override public int getDeviceTypeValue() { return deviceType_; } /** * <code>.common.DeviceType device_type = 1;</code> * @return The deviceType. */ @Override public DeviceType getDeviceType() { @SuppressWarnings("deprecation") DeviceType result = DeviceType.valueOf(deviceType_); return result == null ? DeviceType.UNRECOGNIZED : result; } public static final int BRAND_FIELD_NUMBER = 2; private volatile Object brand_; /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return The brand. */ @Override public String getBrand() { Object ref = brand_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); brand_ = s; return s; } } /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return The bytes for brand. */ @Override public com.google.protobuf.ByteString getBrandBytes() { Object ref = brand_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); brand_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MANUFACTURER_FIELD_NUMBER = 3; private volatile Object manufacturer_; /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return The manufacturer. */ @Override public String getManufacturer() { Object ref = manufacturer_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); manufacturer_ = s; return s; } } /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return The bytes for manufacturer. */ @Override public com.google.protobuf.ByteString getManufacturerBytes() { Object ref = manufacturer_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); manufacturer_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int IDENTIFIER_FIELD_NUMBER = 4; private volatile Object identifier_; /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return The identifier. */ @Override public String getIdentifier() { Object ref = identifier_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); identifier_ = s; return s; } } /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return The bytes for identifier. */ @Override public com.google.protobuf.ByteString getIdentifierBytes() { Object ref = identifier_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); identifier_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OS_VERSION_FIELD_NUMBER = 5; private volatile Object osVersion_; /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return The osVersion. */ @Override public String getOsVersion() { Object ref = osVersion_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); osVersion_ = s; return s; } } /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return The bytes for osVersion. */ @Override public com.google.protobuf.ByteString getOsVersionBytes() { Object ref = osVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); osVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCALE_FIELD_NUMBER = 6; private Locale locale_; /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> * @return Whether the locale field is set. */ @Override @Deprecated public boolean hasLocale() { return locale_ != null; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> * @return The locale. */ @Override @Deprecated public Locale getLocale() { return locale_ == null ? Locale.getDefaultInstance() : locale_; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Override @Deprecated public LocaleOrBuilder getLocaleOrBuilder() { return getLocale(); } public static final int SCREEN_FIELD_NUMBER = 7; private Screen screen_; /** * <code>.common.Screen screen = 7;</code> * @return Whether the screen field is set. */ @Override public boolean hasScreen() { return screen_ != null; } /** * <code>.common.Screen screen = 7;</code> * @return The screen. */ @Override public Screen getScreen() { return screen_ == null ? Screen.getDefaultInstance() : screen_; } /** * <code>.common.Screen screen = 7;</code> */ @Override public ScreenOrBuilder getScreenOrBuilder() { return getScreen(); } public static final int IP_ADDRESS_FIELD_NUMBER = 8; private volatile Object ipAddress_; /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return The ipAddress. */ @Override public String getIpAddress() { Object ref = ipAddress_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); ipAddress_ = s; return s; } } /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return The bytes for ipAddress. */ @Override public com.google.protobuf.ByteString getIpAddressBytes() { Object ref = ipAddress_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); ipAddress_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCATION_FIELD_NUMBER = 9; private Location location_; /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> * @return Whether the location field is set. */ @Override public boolean hasLocation() { return location_ != null; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> * @return The location. */ @Override public Location getLocation() { return location_ == null ? Location.getDefaultInstance() : location_; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ @Override public LocationOrBuilder getLocationOrBuilder() { return getLocation(); } public static final int BROWSER_FIELD_NUMBER = 10; private Browser browser_; /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> * @return Whether the browser field is set. */ @Override public boolean hasBrowser() { return browser_ != null; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> * @return The browser. */ @Override public Browser getBrowser() { return browser_ == null ? Browser.getDefaultInstance() : browser_; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ @Override public BrowserOrBuilder getBrowserOrBuilder() { return getBrowser(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (deviceType_ != DeviceType.UNKNOWN_DEVICE_TYPE.getNumber()) { output.writeEnum(1, deviceType_); } if (!getBrandBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, brand_); } if (!getManufacturerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, manufacturer_); } if (!getIdentifierBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, identifier_); } if (!getOsVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, osVersion_); } if (locale_ != null) { output.writeMessage(6, getLocale()); } if (screen_ != null) { output.writeMessage(7, getScreen()); } if (!getIpAddressBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, ipAddress_); } if (location_ != null) { output.writeMessage(9, getLocation()); } if (browser_ != null) { output.writeMessage(10, getBrowser()); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (deviceType_ != DeviceType.UNKNOWN_DEVICE_TYPE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, deviceType_); } if (!getBrandBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, brand_); } if (!getManufacturerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, manufacturer_); } if (!getIdentifierBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, identifier_); } if (!getOsVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, osVersion_); } if (locale_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getLocale()); } if (screen_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getScreen()); } if (!getIpAddressBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, ipAddress_); } if (location_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getLocation()); } if (browser_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, getBrowser()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Device)) { return super.equals(obj); } Device other = (Device) obj; if (deviceType_ != other.deviceType_) return false; if (!getBrand() .equals(other.getBrand())) return false; if (!getManufacturer() .equals(other.getManufacturer())) return false; if (!getIdentifier() .equals(other.getIdentifier())) return false; if (!getOsVersion() .equals(other.getOsVersion())) return false; if (hasLocale() != other.hasLocale()) return false; if (hasLocale()) { if (!getLocale() .equals(other.getLocale())) return false; } if (hasScreen() != other.hasScreen()) return false; if (hasScreen()) { if (!getScreen() .equals(other.getScreen())) return false; } if (!getIpAddress() .equals(other.getIpAddress())) return false; if (hasLocation() != other.hasLocation()) return false; if (hasLocation()) { if (!getLocation() .equals(other.getLocation())) return false; } if (hasBrowser() != other.hasBrowser()) return false; if (hasBrowser()) { if (!getBrowser() .equals(other.getBrowser())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; hash = (53 * hash) + deviceType_; hash = (37 * hash) + BRAND_FIELD_NUMBER; hash = (53 * hash) + getBrand().hashCode(); hash = (37 * hash) + MANUFACTURER_FIELD_NUMBER; hash = (53 * hash) + getManufacturer().hashCode(); hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; hash = (53 * hash) + getIdentifier().hashCode(); hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; hash = (53 * hash) + getOsVersion().hashCode(); if (hasLocale()) { hash = (37 * hash) + LOCALE_FIELD_NUMBER; hash = (53 * hash) + getLocale().hashCode(); } if (hasScreen()) { hash = (37 * hash) + SCREEN_FIELD_NUMBER; hash = (53 * hash) + getScreen().hashCode(); } hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getIpAddress().hashCode(); if (hasLocation()) { hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); } if (hasBrowser()) { hash = (37 * hash) + BROWSER_FIELD_NUMBER; hash = (53 * hash) + getBrowser().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Device parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Device parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Device parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Device parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Device parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Device parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Device parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Device 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 Device parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Device 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 Device parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Device parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Device prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * A sub-message containing Device info. * Next ID = 11. * </pre> * * Protobuf type {@code common.Device} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Device) DeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Device_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Device_fieldAccessorTable .ensureFieldAccessorsInitialized( Device.class, Builder.class); } // Construct using ai.promoted.proto.common.Device.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); deviceType_ = 0; brand_ = ""; manufacturer_ = ""; identifier_ = ""; osVersion_ = ""; if (localeBuilder_ == null) { locale_ = null; } else { locale_ = null; localeBuilder_ = null; } if (screenBuilder_ == null) { screen_ = null; } else { screen_ = null; screenBuilder_ = null; } ipAddress_ = ""; if (locationBuilder_ == null) { location_ = null; } else { location_ = null; locationBuilder_ = null; } if (browserBuilder_ == null) { browser_ = null; } else { browser_ = null; browserBuilder_ = null; } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Device_descriptor; } @Override public Device getDefaultInstanceForType() { return Device.getDefaultInstance(); } @Override public Device build() { Device result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Device buildPartial() { Device result = new Device(this); result.deviceType_ = deviceType_; result.brand_ = brand_; result.manufacturer_ = manufacturer_; result.identifier_ = identifier_; result.osVersion_ = osVersion_; if (localeBuilder_ == null) { result.locale_ = locale_; } else { result.locale_ = localeBuilder_.build(); } if (screenBuilder_ == null) { result.screen_ = screen_; } else { result.screen_ = screenBuilder_.build(); } result.ipAddress_ = ipAddress_; if (locationBuilder_ == null) { result.location_ = location_; } else { result.location_ = locationBuilder_.build(); } if (browserBuilder_ == null) { result.browser_ = browser_; } else { result.browser_ = browserBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Device) { return mergeFrom((Device)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Device other) { if (other == Device.getDefaultInstance()) return this; if (other.deviceType_ != 0) { setDeviceTypeValue(other.getDeviceTypeValue()); } if (!other.getBrand().isEmpty()) { brand_ = other.brand_; onChanged(); } if (!other.getManufacturer().isEmpty()) { manufacturer_ = other.manufacturer_; onChanged(); } if (!other.getIdentifier().isEmpty()) { identifier_ = other.identifier_; onChanged(); } if (!other.getOsVersion().isEmpty()) { osVersion_ = other.osVersion_; onChanged(); } if (other.hasLocale()) { mergeLocale(other.getLocale()); } if (other.hasScreen()) { mergeScreen(other.getScreen()); } if (!other.getIpAddress().isEmpty()) { ipAddress_ = other.ipAddress_; onChanged(); } if (other.hasLocation()) { mergeLocation(other.getLocation()); } if (other.hasBrowser()) { mergeBrowser(other.getBrowser()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Device parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Device) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int deviceType_ = 0; /** * <code>.common.DeviceType device_type = 1;</code> * @return The enum numeric value on the wire for deviceType. */ @Override public int getDeviceTypeValue() { return deviceType_; } /** * <code>.common.DeviceType device_type = 1;</code> * @param value The enum numeric value on the wire for deviceType to set. * @return This builder for chaining. */ public Builder setDeviceTypeValue(int value) { deviceType_ = value; onChanged(); return this; } /** * <code>.common.DeviceType device_type = 1;</code> * @return The deviceType. */ @Override public DeviceType getDeviceType() { @SuppressWarnings("deprecation") DeviceType result = DeviceType.valueOf(deviceType_); return result == null ? DeviceType.UNRECOGNIZED : result; } /** * <code>.common.DeviceType device_type = 1;</code> * @param value The deviceType to set. * @return This builder for chaining. */ public Builder setDeviceType(DeviceType value) { if (value == null) { throw new NullPointerException(); } deviceType_ = value.getNumber(); onChanged(); return this; } /** * <code>.common.DeviceType device_type = 1;</code> * @return This builder for chaining. */ public Builder clearDeviceType() { deviceType_ = 0; onChanged(); return this; } private Object brand_ = ""; /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return The brand. */ public String getBrand() { Object ref = brand_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); brand_ = s; return s; } else { return (String) ref; } } /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return The bytes for brand. */ public com.google.protobuf.ByteString getBrandBytes() { Object ref = brand_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); brand_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @param value The brand to set. * @return This builder for chaining. */ public Builder setBrand( String value) { if (value == null) { throw new NullPointerException(); } brand_ = value; onChanged(); return this; } /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return This builder for chaining. */ public Builder clearBrand() { brand_ = getDefaultInstance().getBrand(); onChanged(); return this; } /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @param value The bytes for brand to set. * @return This builder for chaining. */ public Builder setBrandBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); brand_ = value; onChanged(); return this; } private Object manufacturer_ = ""; /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return The manufacturer. */ public String getManufacturer() { Object ref = manufacturer_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); manufacturer_ = s; return s; } else { return (String) ref; } } /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return The bytes for manufacturer. */ public com.google.protobuf.ByteString getManufacturerBytes() { Object ref = manufacturer_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); manufacturer_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @param value The manufacturer to set. * @return This builder for chaining. */ public Builder setManufacturer( String value) { if (value == null) { throw new NullPointerException(); } manufacturer_ = value; onChanged(); return this; } /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return This builder for chaining. */ public Builder clearManufacturer() { manufacturer_ = getDefaultInstance().getManufacturer(); onChanged(); return this; } /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @param value The bytes for manufacturer to set. * @return This builder for chaining. */ public Builder setManufacturerBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); manufacturer_ = value; onChanged(); return this; } private Object identifier_ = ""; /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return The identifier. */ public String getIdentifier() { Object ref = identifier_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); identifier_ = s; return s; } else { return (String) ref; } } /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return The bytes for identifier. */ public com.google.protobuf.ByteString getIdentifierBytes() { Object ref = identifier_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); identifier_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @param value The identifier to set. * @return This builder for chaining. */ public Builder setIdentifier( String value) { if (value == null) { throw new NullPointerException(); } identifier_ = value; onChanged(); return this; } /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return This builder for chaining. */ public Builder clearIdentifier() { identifier_ = getDefaultInstance().getIdentifier(); onChanged(); return this; } /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @param value The bytes for identifier to set. * @return This builder for chaining. */ public Builder setIdentifierBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); identifier_ = value; onChanged(); return this; } private Object osVersion_ = ""; /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return The osVersion. */ public String getOsVersion() { Object ref = osVersion_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); osVersion_ = s; return s; } else { return (String) ref; } } /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return The bytes for osVersion. */ public com.google.protobuf.ByteString getOsVersionBytes() { Object ref = osVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); osVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @param value The osVersion to set. * @return This builder for chaining. */ public Builder setOsVersion( String value) { if (value == null) { throw new NullPointerException(); } osVersion_ = value; onChanged(); return this; } /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return This builder for chaining. */ public Builder clearOsVersion() { osVersion_ = getDefaultInstance().getOsVersion(); onChanged(); return this; } /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @param value The bytes for osVersion to set. * @return This builder for chaining. */ public Builder setOsVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); osVersion_ = value; onChanged(); return this; } private Locale locale_; private com.google.protobuf.SingleFieldBuilderV3< Locale, Locale.Builder, LocaleOrBuilder> localeBuilder_; /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> * @return Whether the locale field is set. */ @Deprecated public boolean hasLocale() { return localeBuilder_ != null || locale_ != null; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> * @return The locale. */ @Deprecated public Locale getLocale() { if (localeBuilder_ == null) { return locale_ == null ? Locale.getDefaultInstance() : locale_; } else { return localeBuilder_.getMessage(); } } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated public Builder setLocale(Locale value) { if (localeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } locale_ = value; onChanged(); } else { localeBuilder_.setMessage(value); } return this; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated public Builder setLocale( Locale.Builder builderForValue) { if (localeBuilder_ == null) { locale_ = builderForValue.build(); onChanged(); } else { localeBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated public Builder mergeLocale(Locale value) { if (localeBuilder_ == null) { if (locale_ != null) { locale_ = Locale.newBuilder(locale_).mergeFrom(value).buildPartial(); } else { locale_ = value; } onChanged(); } else { localeBuilder_.mergeFrom(value); } return this; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated public Builder clearLocale() { if (localeBuilder_ == null) { locale_ = null; onChanged(); } else { locale_ = null; localeBuilder_ = null; } return this; } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated public Locale.Builder getLocaleBuilder() { onChanged(); return getLocaleFieldBuilder().getBuilder(); } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated public LocaleOrBuilder getLocaleOrBuilder() { if (localeBuilder_ != null) { return localeBuilder_.getMessageOrBuilder(); } else { return locale_ == null ? Locale.getDefaultInstance() : locale_; } } /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ private com.google.protobuf.SingleFieldBuilderV3< Locale, Locale.Builder, LocaleOrBuilder> getLocaleFieldBuilder() { if (localeBuilder_ == null) { localeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Locale, Locale.Builder, LocaleOrBuilder>( getLocale(), getParentForChildren(), isClean()); locale_ = null; } return localeBuilder_; } private Screen screen_; private com.google.protobuf.SingleFieldBuilderV3< Screen, Screen.Builder, ScreenOrBuilder> screenBuilder_; /** * <code>.common.Screen screen = 7;</code> * @return Whether the screen field is set. */ public boolean hasScreen() { return screenBuilder_ != null || screen_ != null; } /** * <code>.common.Screen screen = 7;</code> * @return The screen. */ public Screen getScreen() { if (screenBuilder_ == null) { return screen_ == null ? Screen.getDefaultInstance() : screen_; } else { return screenBuilder_.getMessage(); } } /** * <code>.common.Screen screen = 7;</code> */ public Builder setScreen(Screen value) { if (screenBuilder_ == null) { if (value == null) { throw new NullPointerException(); } screen_ = value; onChanged(); } else { screenBuilder_.setMessage(value); } return this; } /** * <code>.common.Screen screen = 7;</code> */ public Builder setScreen( Screen.Builder builderForValue) { if (screenBuilder_ == null) { screen_ = builderForValue.build(); onChanged(); } else { screenBuilder_.setMessage(builderForValue.build()); } return this; } /** * <code>.common.Screen screen = 7;</code> */ public Builder mergeScreen(Screen value) { if (screenBuilder_ == null) { if (screen_ != null) { screen_ = Screen.newBuilder(screen_).mergeFrom(value).buildPartial(); } else { screen_ = value; } onChanged(); } else { screenBuilder_.mergeFrom(value); } return this; } /** * <code>.common.Screen screen = 7;</code> */ public Builder clearScreen() { if (screenBuilder_ == null) { screen_ = null; onChanged(); } else { screen_ = null; screenBuilder_ = null; } return this; } /** * <code>.common.Screen screen = 7;</code> */ public Screen.Builder getScreenBuilder() { onChanged(); return getScreenFieldBuilder().getBuilder(); } /** * <code>.common.Screen screen = 7;</code> */ public ScreenOrBuilder getScreenOrBuilder() { if (screenBuilder_ != null) { return screenBuilder_.getMessageOrBuilder(); } else { return screen_ == null ? Screen.getDefaultInstance() : screen_; } } /** * <code>.common.Screen screen = 7;</code> */ private com.google.protobuf.SingleFieldBuilderV3< Screen, Screen.Builder, ScreenOrBuilder> getScreenFieldBuilder() { if (screenBuilder_ == null) { screenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Screen, Screen.Builder, ScreenOrBuilder>( getScreen(), getParentForChildren(), isClean()); screen_ = null; } return screenBuilder_; } private Object ipAddress_ = ""; /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return The ipAddress. */ public String getIpAddress() { Object ref = ipAddress_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); ipAddress_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return The bytes for ipAddress. */ public com.google.protobuf.ByteString getIpAddressBytes() { Object ref = ipAddress_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); ipAddress_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @param value The ipAddress to set. * @return This builder for chaining. */ public Builder setIpAddress( String value) { if (value == null) { throw new NullPointerException(); } ipAddress_ = value; onChanged(); return this; } /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return This builder for chaining. */ public Builder clearIpAddress() { ipAddress_ = getDefaultInstance().getIpAddress(); onChanged(); return this; } /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @param value The bytes for ipAddress to set. * @return This builder for chaining. */ public Builder setIpAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ipAddress_ = value; onChanged(); return this; } private Location location_; private com.google.protobuf.SingleFieldBuilderV3< Location, Location.Builder, LocationOrBuilder> locationBuilder_; /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> * @return Whether the location field is set. */ public boolean hasLocation() { return locationBuilder_ != null || location_ != null; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> * @return The location. */ public Location getLocation() { if (locationBuilder_ == null) { return location_ == null ? Location.getDefaultInstance() : location_; } else { return locationBuilder_.getMessage(); } } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ public Builder setLocation(Location value) { if (locationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } location_ = value; onChanged(); } else { locationBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ public Builder setLocation( Location.Builder builderForValue) { if (locationBuilder_ == null) { location_ = builderForValue.build(); onChanged(); } else { locationBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ public Builder mergeLocation(Location value) { if (locationBuilder_ == null) { if (location_ != null) { location_ = Location.newBuilder(location_).mergeFrom(value).buildPartial(); } else { location_ = value; } onChanged(); } else { locationBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ public Builder clearLocation() { if (locationBuilder_ == null) { location_ = null; onChanged(); } else { location_ = null; locationBuilder_ = null; } return this; } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ public Location.Builder getLocationBuilder() { onChanged(); return getLocationFieldBuilder().getBuilder(); } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ public LocationOrBuilder getLocationOrBuilder() { if (locationBuilder_ != null) { return locationBuilder_.getMessageOrBuilder(); } else { return location_ == null ? Location.getDefaultInstance() : location_; } } /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ private com.google.protobuf.SingleFieldBuilderV3< Location, Location.Builder, LocationOrBuilder> getLocationFieldBuilder() { if (locationBuilder_ == null) { locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Location, Location.Builder, LocationOrBuilder>( getLocation(), getParentForChildren(), isClean()); location_ = null; } return locationBuilder_; } private Browser browser_; private com.google.protobuf.SingleFieldBuilderV3< Browser, Browser.Builder, BrowserOrBuilder> browserBuilder_; /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> * @return Whether the browser field is set. */ public boolean hasBrowser() { return browserBuilder_ != null || browser_ != null; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> * @return The browser. */ public Browser getBrowser() { if (browserBuilder_ == null) { return browser_ == null ? Browser.getDefaultInstance() : browser_; } else { return browserBuilder_.getMessage(); } } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ public Builder setBrowser(Browser value) { if (browserBuilder_ == null) { if (value == null) { throw new NullPointerException(); } browser_ = value; onChanged(); } else { browserBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ public Builder setBrowser( Browser.Builder builderForValue) { if (browserBuilder_ == null) { browser_ = builderForValue.build(); onChanged(); } else { browserBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ public Builder mergeBrowser(Browser value) { if (browserBuilder_ == null) { if (browser_ != null) { browser_ = Browser.newBuilder(browser_).mergeFrom(value).buildPartial(); } else { browser_ = value; } onChanged(); } else { browserBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ public Builder clearBrowser() { if (browserBuilder_ == null) { browser_ = null; onChanged(); } else { browser_ = null; browserBuilder_ = null; } return this; } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ public Browser.Builder getBrowserBuilder() { onChanged(); return getBrowserFieldBuilder().getBuilder(); } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ public BrowserOrBuilder getBrowserOrBuilder() { if (browserBuilder_ != null) { return browserBuilder_.getMessageOrBuilder(); } else { return browser_ == null ? Browser.getDefaultInstance() : browser_; } } /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ private com.google.protobuf.SingleFieldBuilderV3< Browser, Browser.Builder, BrowserOrBuilder> getBrowserFieldBuilder() { if (browserBuilder_ == null) { browserBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Browser, Browser.Builder, BrowserOrBuilder>( getBrowser(), getParentForChildren(), isClean()); browser_ = null; } return browserBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Device) } // @@protoc_insertion_point(class_scope:common.Device) private static final Device DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Device(); } public static Device getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Device> PARSER = new com.google.protobuf.AbstractParser<Device>() { @Override public Device parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Device(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Device> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Device> getParserForType() { return PARSER; } @Override public Device getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/DeviceOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface DeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Device) com.google.protobuf.MessageOrBuilder { /** * <code>.common.DeviceType device_type = 1;</code> * @return The enum numeric value on the wire for deviceType. */ int getDeviceTypeValue(); /** * <code>.common.DeviceType device_type = 1;</code> * @return The deviceType. */ DeviceType getDeviceType(); /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return The brand. */ String getBrand(); /** * <pre> * Android: android.os.Build.BRAND * (eg. "google", "verizon", "tmobile", "Samsung") * iOS: "Apple" * </pre> * * <code>string brand = 2;</code> * @return The bytes for brand. */ com.google.protobuf.ByteString getBrandBytes(); /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return The manufacturer. */ String getManufacturer(); /** * <pre> * Android: android.os.Build.MANUFACTURER * (eg. "HTC", "Motorola", "HUAWEI") * iOS: "Apple" * </pre> * * <code>string manufacturer = 3;</code> * @return The bytes for manufacturer. */ com.google.protobuf.ByteString getManufacturerBytes(); /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return The identifier. */ String getIdentifier(); /** * <pre> * Android: android.os.Build.MODEL * (eg. "GT-S5830L", "MB860") * iOS: "iPhoneXX,YY" or "iPadXX,YY" * </pre> * * <code>string identifier = 4;</code> * @return The bytes for identifier. */ com.google.protobuf.ByteString getIdentifierBytes(); /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return The osVersion. */ String getOsVersion(); /** * <pre> * Android: android.os.Build.VERSION.RELEASE * iOS: "14.4.1" * </pre> * * <code>string os_version = 5;</code> * @return The bytes for osVersion. */ com.google.protobuf.ByteString getOsVersionBytes(); /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> * @return Whether the locale field is set. */ @Deprecated boolean hasLocale(); /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> * @return The locale. */ @Deprecated Locale getLocale(); /** * <pre> * Deprecated. * </pre> * * <code>.common.Locale locale = 6 [deprecated = true];</code> */ @Deprecated LocaleOrBuilder getLocaleOrBuilder(); /** * <code>.common.Screen screen = 7;</code> * @return Whether the screen field is set. */ boolean hasScreen(); /** * <code>.common.Screen screen = 7;</code> * @return The screen. */ Screen getScreen(); /** * <code>.common.Screen screen = 7;</code> */ ScreenOrBuilder getScreenOrBuilder(); /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return The ipAddress. */ String getIpAddress(); /** * <pre> * Optional. We'll use IP Address to guess the user's * location when necessary and possible on desktop. * Most likely in a server integration this should be the value * of the X-Forwarded-For header. * </pre> * * <code>string ip_address = 8;</code> * @return The bytes for ipAddress. */ com.google.protobuf.ByteString getIpAddressBytes(); /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> * @return Whether the location field is set. */ boolean hasLocation(); /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> * @return The location. */ Location getLocation(); /** * <pre> * Optional. User device's actual geolocation if available. * </pre> * * <code>.common.Location location = 9;</code> */ LocationOrBuilder getLocationOrBuilder(); /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> * @return Whether the browser field is set. */ boolean hasBrowser(); /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> * @return The browser. */ Browser getBrowser(); /** * <pre> * Optional. Information about the user's web client (on web or mobile browser). * </pre> * * <code>.common.Browser browser = 10;</code> */ BrowserOrBuilder getBrowserOrBuilder(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/DeviceType.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Next ID = 4. * </pre> * * Protobuf enum {@code common.DeviceType} */ public enum DeviceType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>UNKNOWN_DEVICE_TYPE = 0;</code> */ UNKNOWN_DEVICE_TYPE(0), /** * <code>DESKTOP = 1;</code> */ DESKTOP(1), /** * <code>MOBILE = 2;</code> */ MOBILE(2), /** * <code>TABLET = 3;</code> */ TABLET(3), UNRECOGNIZED(-1), ; /** * <code>UNKNOWN_DEVICE_TYPE = 0;</code> */ public static final int UNKNOWN_DEVICE_TYPE_VALUE = 0; /** * <code>DESKTOP = 1;</code> */ public static final int DESKTOP_VALUE = 1; /** * <code>MOBILE = 2;</code> */ public static final int MOBILE_VALUE = 2; /** * <code>TABLET = 3;</code> */ public static final int TABLET_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static DeviceType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static DeviceType forNumber(int value) { switch (value) { case 0: return UNKNOWN_DEVICE_TYPE; case 1: return DESKTOP; case 2: return MOBILE; case 3: return TABLET; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<DeviceType> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< DeviceType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<DeviceType>() { public DeviceType findValueByNumber(int number) { return DeviceType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return CommonProto.getDescriptor().getEnumTypes().get(1); } private static final DeviceType[] VALUES = values(); public static DeviceType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private DeviceType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:common.DeviceType) }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/EntityPath.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * Protobuf type {@code common.EntityPath} */ public final class EntityPath extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.EntityPath) EntityPathOrBuilder { private static final long serialVersionUID = 0L; // Use EntityPath.newBuilder() to construct. private EntityPath(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private EntityPath() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new EntityPath(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EntityPath( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { platformId_ = input.readUInt64(); break; } case 16: { customerId_ = input.readUInt64(); break; } case 24: { contentId_ = input.readUInt64(); break; } case 32: { accountId_ = input.readUInt64(); break; } case 40: { campaignId_ = input.readUInt64(); break; } case 48: { promotionId_ = input.readUInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_EntityPath_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_EntityPath_fieldAccessorTable .ensureFieldAccessorsInitialized( EntityPath.class, Builder.class); } public static final int PLATFORM_ID_FIELD_NUMBER = 1; private long platformId_; /** * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } public static final int CUSTOMER_ID_FIELD_NUMBER = 2; private long customerId_; /** * <code>uint64 customer_id = 2;</code> * @return The customerId. */ @Override public long getCustomerId() { return customerId_; } public static final int ACCOUNT_ID_FIELD_NUMBER = 4; private long accountId_; /** * <code>uint64 account_id = 4;</code> * @return The accountId. */ @Override public long getAccountId() { return accountId_; } public static final int CAMPAIGN_ID_FIELD_NUMBER = 5; private long campaignId_; /** * <code>uint64 campaign_id = 5;</code> * @return The campaignId. */ @Override public long getCampaignId() { return campaignId_; } public static final int PROMOTION_ID_FIELD_NUMBER = 6; private long promotionId_; /** * <code>uint64 promotion_id = 6;</code> * @return The promotionId. */ @Override public long getPromotionId() { return promotionId_; } public static final int CONTENT_ID_FIELD_NUMBER = 3; private long contentId_; /** * <code>uint64 content_id = 3;</code> * @return The contentId. */ @Override public long getContentId() { return contentId_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (platformId_ != 0L) { output.writeUInt64(1, platformId_); } if (customerId_ != 0L) { output.writeUInt64(2, customerId_); } if (contentId_ != 0L) { output.writeUInt64(3, contentId_); } if (accountId_ != 0L) { output.writeUInt64(4, accountId_); } if (campaignId_ != 0L) { output.writeUInt64(5, campaignId_); } if (promotionId_ != 0L) { output.writeUInt64(6, promotionId_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (platformId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, platformId_); } if (customerId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, customerId_); } if (contentId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, contentId_); } if (accountId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(4, accountId_); } if (campaignId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(5, campaignId_); } if (promotionId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(6, promotionId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof EntityPath)) { return super.equals(obj); } EntityPath other = (EntityPath) obj; if (getPlatformId() != other.getPlatformId()) return false; if (getCustomerId() != other.getCustomerId()) return false; if (getAccountId() != other.getAccountId()) return false; if (getCampaignId() != other.getCampaignId()) return false; if (getPromotionId() != other.getPromotionId()) return false; if (getContentId() != other.getContentId()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PLATFORM_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPlatformId()); hash = (37 * hash) + CUSTOMER_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCustomerId()); hash = (37 * hash) + ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAccountId()); hash = (37 * hash) + CAMPAIGN_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCampaignId()); hash = (37 * hash) + PROMOTION_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPromotionId()); hash = (37 * hash) + CONTENT_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getContentId()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static EntityPath parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static EntityPath parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static EntityPath parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static EntityPath parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static EntityPath parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static EntityPath parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static EntityPath parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static EntityPath 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 EntityPath parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static EntityPath 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 EntityPath parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static EntityPath parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(EntityPath prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code common.EntityPath} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.EntityPath) EntityPathOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_EntityPath_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_EntityPath_fieldAccessorTable .ensureFieldAccessorsInitialized( EntityPath.class, Builder.class); } // Construct using ai.promoted.proto.common.EntityPath.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); platformId_ = 0L; customerId_ = 0L; accountId_ = 0L; campaignId_ = 0L; promotionId_ = 0L; contentId_ = 0L; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_EntityPath_descriptor; } @Override public EntityPath getDefaultInstanceForType() { return EntityPath.getDefaultInstance(); } @Override public EntityPath build() { EntityPath result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public EntityPath buildPartial() { EntityPath result = new EntityPath(this); result.platformId_ = platformId_; result.customerId_ = customerId_; result.accountId_ = accountId_; result.campaignId_ = campaignId_; result.promotionId_ = promotionId_; result.contentId_ = contentId_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof EntityPath) { return mergeFrom((EntityPath)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(EntityPath other) { if (other == EntityPath.getDefaultInstance()) return this; if (other.getPlatformId() != 0L) { setPlatformId(other.getPlatformId()); } if (other.getCustomerId() != 0L) { setCustomerId(other.getCustomerId()); } if (other.getAccountId() != 0L) { setAccountId(other.getAccountId()); } if (other.getCampaignId() != 0L) { setCampaignId(other.getCampaignId()); } if (other.getPromotionId() != 0L) { setPromotionId(other.getPromotionId()); } if (other.getContentId() != 0L) { setContentId(other.getContentId()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { EntityPath parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (EntityPath) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private long platformId_ ; /** * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } /** * <code>uint64 platform_id = 1;</code> * @param value The platformId to set. * @return This builder for chaining. */ public Builder setPlatformId(long value) { platformId_ = value; onChanged(); return this; } /** * <code>uint64 platform_id = 1;</code> * @return This builder for chaining. */ public Builder clearPlatformId() { platformId_ = 0L; onChanged(); return this; } private long customerId_ ; /** * <code>uint64 customer_id = 2;</code> * @return The customerId. */ @Override public long getCustomerId() { return customerId_; } /** * <code>uint64 customer_id = 2;</code> * @param value The customerId to set. * @return This builder for chaining. */ public Builder setCustomerId(long value) { customerId_ = value; onChanged(); return this; } /** * <code>uint64 customer_id = 2;</code> * @return This builder for chaining. */ public Builder clearCustomerId() { customerId_ = 0L; onChanged(); return this; } private long accountId_ ; /** * <code>uint64 account_id = 4;</code> * @return The accountId. */ @Override public long getAccountId() { return accountId_; } /** * <code>uint64 account_id = 4;</code> * @param value The accountId to set. * @return This builder for chaining. */ public Builder setAccountId(long value) { accountId_ = value; onChanged(); return this; } /** * <code>uint64 account_id = 4;</code> * @return This builder for chaining. */ public Builder clearAccountId() { accountId_ = 0L; onChanged(); return this; } private long campaignId_ ; /** * <code>uint64 campaign_id = 5;</code> * @return The campaignId. */ @Override public long getCampaignId() { return campaignId_; } /** * <code>uint64 campaign_id = 5;</code> * @param value The campaignId to set. * @return This builder for chaining. */ public Builder setCampaignId(long value) { campaignId_ = value; onChanged(); return this; } /** * <code>uint64 campaign_id = 5;</code> * @return This builder for chaining. */ public Builder clearCampaignId() { campaignId_ = 0L; onChanged(); return this; } private long promotionId_ ; /** * <code>uint64 promotion_id = 6;</code> * @return The promotionId. */ @Override public long getPromotionId() { return promotionId_; } /** * <code>uint64 promotion_id = 6;</code> * @param value The promotionId to set. * @return This builder for chaining. */ public Builder setPromotionId(long value) { promotionId_ = value; onChanged(); return this; } /** * <code>uint64 promotion_id = 6;</code> * @return This builder for chaining. */ public Builder clearPromotionId() { promotionId_ = 0L; onChanged(); return this; } private long contentId_ ; /** * <code>uint64 content_id = 3;</code> * @return The contentId. */ @Override public long getContentId() { return contentId_; } /** * <code>uint64 content_id = 3;</code> * @param value The contentId to set. * @return This builder for chaining. */ public Builder setContentId(long value) { contentId_ = value; onChanged(); return this; } /** * <code>uint64 content_id = 3;</code> * @return This builder for chaining. */ public Builder clearContentId() { contentId_ = 0L; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.EntityPath) } // @@protoc_insertion_point(class_scope:common.EntityPath) private static final EntityPath DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new EntityPath(); } public static EntityPath getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<EntityPath> PARSER = new com.google.protobuf.AbstractParser<EntityPath>() { @Override public EntityPath parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EntityPath(input, extensionRegistry); } }; public static com.google.protobuf.Parser<EntityPath> parser() { return PARSER; } @Override public com.google.protobuf.Parser<EntityPath> getParserForType() { return PARSER; } @Override public EntityPath getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/EntityPathOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface EntityPathOrBuilder extends // @@protoc_insertion_point(interface_extends:common.EntityPath) com.google.protobuf.MessageOrBuilder { /** * <code>uint64 platform_id = 1;</code> * @return The platformId. */ long getPlatformId(); /** * <code>uint64 customer_id = 2;</code> * @return The customerId. */ long getCustomerId(); /** * <code>uint64 account_id = 4;</code> * @return The accountId. */ long getAccountId(); /** * <code>uint64 campaign_id = 5;</code> * @return The campaignId. */ long getCampaignId(); /** * <code>uint64 promotion_id = 6;</code> * @return The promotionId. */ long getPromotionId(); /** * <code>uint64 content_id = 3;</code> * @return The contentId. */ long getContentId(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Locale.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Locale for session * Next ID = 3. * </pre> * * Protobuf type {@code common.Locale} */ public final class Locale extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Locale) LocaleOrBuilder { private static final long serialVersionUID = 0L; // Use Locale.newBuilder() to construct. private Locale(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Locale() { languageCode_ = ""; regionCode_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Locale(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Locale( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); languageCode_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); regionCode_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Locale_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Locale_fieldAccessorTable .ensureFieldAccessorsInitialized( Locale.class, Builder.class); } public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; private volatile Object languageCode_; /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return The languageCode. */ @Override public String getLanguageCode() { Object ref = languageCode_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); languageCode_ = s; return s; } } /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return The bytes for languageCode. */ @Override public com.google.protobuf.ByteString getLanguageCodeBytes() { Object ref = languageCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REGION_CODE_FIELD_NUMBER = 2; private volatile Object regionCode_; /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return The regionCode. */ @Override public String getRegionCode() { Object ref = regionCode_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); regionCode_ = s; return s; } } /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return The bytes for regionCode. */ @Override public com.google.protobuf.ByteString getRegionCodeBytes() { Object ref = regionCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); regionCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getLanguageCodeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } if (!getRegionCodeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getLanguageCodeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } if (!getRegionCodeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Locale)) { return super.equals(obj); } Locale other = (Locale) obj; if (!getLanguageCode() .equals(other.getLanguageCode())) return false; if (!getRegionCode() .equals(other.getRegionCode())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; hash = (53 * hash) + getRegionCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Locale parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Locale parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Locale parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Locale parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Locale parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Locale parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Locale parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Locale 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 Locale parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Locale 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 Locale parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Locale parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Locale prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Locale for session * Next ID = 3. * </pre> * * Protobuf type {@code common.Locale} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Locale) LocaleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Locale_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Locale_fieldAccessorTable .ensureFieldAccessorsInitialized( Locale.class, Builder.class); } // Construct using ai.promoted.proto.common.Locale.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); languageCode_ = ""; regionCode_ = ""; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Locale_descriptor; } @Override public Locale getDefaultInstanceForType() { return Locale.getDefaultInstance(); } @Override public Locale build() { Locale result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Locale buildPartial() { Locale result = new Locale(this); result.languageCode_ = languageCode_; result.regionCode_ = regionCode_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Locale) { return mergeFrom((Locale)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Locale other) { if (other == Locale.getDefaultInstance()) return this; if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; onChanged(); } if (!other.getRegionCode().isEmpty()) { regionCode_ = other.regionCode_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Locale parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Locale) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private Object languageCode_ = ""; /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return The languageCode. */ public String getLanguageCode() { Object ref = languageCode_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); languageCode_ = s; return s; } else { return (String) ref; } } /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return The bytes for languageCode. */ public com.google.protobuf.ByteString getLanguageCodeBytes() { Object ref = languageCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @param value The languageCode to set. * @return This builder for chaining. */ public Builder setLanguageCode( String value) { if (value == null) { throw new NullPointerException(); } languageCode_ = value; onChanged(); return this; } /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return This builder for chaining. */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); onChanged(); return this; } /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @param value The bytes for languageCode to set. * @return This builder for chaining. */ public Builder setLanguageCodeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); languageCode_ = value; onChanged(); return this; } private Object regionCode_ = ""; /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return The regionCode. */ public String getRegionCode() { Object ref = regionCode_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); regionCode_ = s; return s; } else { return (String) ref; } } /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return The bytes for regionCode. */ public com.google.protobuf.ByteString getRegionCodeBytes() { Object ref = regionCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); regionCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @param value The regionCode to set. * @return This builder for chaining. */ public Builder setRegionCode( String value) { if (value == null) { throw new NullPointerException(); } regionCode_ = value; onChanged(); return this; } /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return This builder for chaining. */ public Builder clearRegionCode() { regionCode_ = getDefaultInstance().getRegionCode(); onChanged(); return this; } /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @param value The bytes for regionCode to set. * @return This builder for chaining. */ public Builder setRegionCodeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); regionCode_ = value; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Locale) } // @@protoc_insertion_point(class_scope:common.Locale) private static final Locale DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Locale(); } public static Locale getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Locale> PARSER = new com.google.protobuf.AbstractParser<Locale>() { @Override public Locale parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Locale(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Locale> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Locale> getParserForType() { return PARSER; } @Override public Locale getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/LocaleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface LocaleOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Locale) com.google.protobuf.MessageOrBuilder { /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return The languageCode. */ String getLanguageCode(); /** * <pre> * CodeReview - Which ISO code is this? ISO 639-1? 2? 3? * "en", "zh_Hant", "fr" * </pre> * * <code>string language_code = 1;</code> * @return The bytes for languageCode. */ com.google.protobuf.ByteString getLanguageCodeBytes(); /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return The regionCode. */ String getRegionCode(); /** * <pre> * CodeReview - Which ISO code? ISO 3166-1? * "US", "CA", "FR" * </pre> * * <code>string region_code = 2;</code> * @return The bytes for regionCode. */ com.google.protobuf.ByteString getRegionCodeBytes(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Location.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code common.Location} */ public final class Location extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Location) LocationOrBuilder { private static final long serialVersionUID = 0L; // Use Location.newBuilder() to construct. private Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Location() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Location(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Location( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 9: { latitude_ = input.readDouble(); break; } case 17: { longitude_ = input.readDouble(); break; } case 25: { accuracyInMeters_ = input.readDouble(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Location_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Location_fieldAccessorTable .ensureFieldAccessorsInitialized( Location.class, Builder.class); } public static final int LATITUDE_FIELD_NUMBER = 1; private double latitude_; /** * <pre> * [-90, 90] * </pre> * * <code>double latitude = 1;</code> * @return The latitude. */ @Override public double getLatitude() { return latitude_; } public static final int LONGITUDE_FIELD_NUMBER = 2; private double longitude_; /** * <pre> * [-180, 180] * </pre> * * <code>double longitude = 2;</code> * @return The longitude. */ @Override public double getLongitude() { return longitude_; } public static final int ACCURACY_IN_METERS_FIELD_NUMBER = 3; private double accuracyInMeters_; /** * <pre> * Optional. Accuracy of location if known. * </pre> * * <code>double accuracy_in_meters = 3;</code> * @return The accuracyInMeters. */ @Override public double getAccuracyInMeters() { return accuracyInMeters_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (latitude_ != 0D) { output.writeDouble(1, latitude_); } if (longitude_ != 0D) { output.writeDouble(2, longitude_); } if (accuracyInMeters_ != 0D) { output.writeDouble(3, accuracyInMeters_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (latitude_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, latitude_); } if (longitude_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(2, longitude_); } if (accuracyInMeters_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(3, accuracyInMeters_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Location)) { return super.equals(obj); } Location other = (Location) obj; if (Double.doubleToLongBits(getLatitude()) != Double.doubleToLongBits( other.getLatitude())) return false; if (Double.doubleToLongBits(getLongitude()) != Double.doubleToLongBits( other.getLongitude())) return false; if (Double.doubleToLongBits(getAccuracyInMeters()) != Double.doubleToLongBits( other.getAccuracyInMeters())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LATITUDE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getLatitude())); hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getLongitude())); hash = (37 * hash) + ACCURACY_IN_METERS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getAccuracyInMeters())); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Location parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Location parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Location parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Location parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Location parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Location parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Location parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Location 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 Location parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Location 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 Location parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Location parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Location prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code common.Location} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Location) LocationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Location_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Location_fieldAccessorTable .ensureFieldAccessorsInitialized( Location.class, Builder.class); } // Construct using ai.promoted.proto.common.Location.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); latitude_ = 0D; longitude_ = 0D; accuracyInMeters_ = 0D; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Location_descriptor; } @Override public Location getDefaultInstanceForType() { return Location.getDefaultInstance(); } @Override public Location build() { Location result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Location buildPartial() { Location result = new Location(this); result.latitude_ = latitude_; result.longitude_ = longitude_; result.accuracyInMeters_ = accuracyInMeters_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Location) { return mergeFrom((Location)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Location other) { if (other == Location.getDefaultInstance()) return this; if (other.getLatitude() != 0D) { setLatitude(other.getLatitude()); } if (other.getLongitude() != 0D) { setLongitude(other.getLongitude()); } if (other.getAccuracyInMeters() != 0D) { setAccuracyInMeters(other.getAccuracyInMeters()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Location parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Location) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private double latitude_ ; /** * <pre> * [-90, 90] * </pre> * * <code>double latitude = 1;</code> * @return The latitude. */ @Override public double getLatitude() { return latitude_; } /** * <pre> * [-90, 90] * </pre> * * <code>double latitude = 1;</code> * @param value The latitude to set. * @return This builder for chaining. */ public Builder setLatitude(double value) { latitude_ = value; onChanged(); return this; } /** * <pre> * [-90, 90] * </pre> * * <code>double latitude = 1;</code> * @return This builder for chaining. */ public Builder clearLatitude() { latitude_ = 0D; onChanged(); return this; } private double longitude_ ; /** * <pre> * [-180, 180] * </pre> * * <code>double longitude = 2;</code> * @return The longitude. */ @Override public double getLongitude() { return longitude_; } /** * <pre> * [-180, 180] * </pre> * * <code>double longitude = 2;</code> * @param value The longitude to set. * @return This builder for chaining. */ public Builder setLongitude(double value) { longitude_ = value; onChanged(); return this; } /** * <pre> * [-180, 180] * </pre> * * <code>double longitude = 2;</code> * @return This builder for chaining. */ public Builder clearLongitude() { longitude_ = 0D; onChanged(); return this; } private double accuracyInMeters_ ; /** * <pre> * Optional. Accuracy of location if known. * </pre> * * <code>double accuracy_in_meters = 3;</code> * @return The accuracyInMeters. */ @Override public double getAccuracyInMeters() { return accuracyInMeters_; } /** * <pre> * Optional. Accuracy of location if known. * </pre> * * <code>double accuracy_in_meters = 3;</code> * @param value The accuracyInMeters to set. * @return This builder for chaining. */ public Builder setAccuracyInMeters(double value) { accuracyInMeters_ = value; onChanged(); return this; } /** * <pre> * Optional. Accuracy of location if known. * </pre> * * <code>double accuracy_in_meters = 3;</code> * @return This builder for chaining. */ public Builder clearAccuracyInMeters() { accuracyInMeters_ = 0D; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Location) } // @@protoc_insertion_point(class_scope:common.Location) private static final Location DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Location(); } public static Location getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Location> PARSER = new com.google.protobuf.AbstractParser<Location>() { @Override public Location parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Location(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Location> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Location> getParserForType() { return PARSER; } @Override public Location getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/LocationOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface LocationOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Location) com.google.protobuf.MessageOrBuilder { /** * <pre> * [-90, 90] * </pre> * * <code>double latitude = 1;</code> * @return The latitude. */ double getLatitude(); /** * <pre> * [-180, 180] * </pre> * * <code>double longitude = 2;</code> * @return The longitude. */ double getLongitude(); /** * <pre> * Optional. Accuracy of location if known. * </pre> * * <code>double accuracy_in_meters = 3;</code> * @return The accuracyInMeters. */ double getAccuracyInMeters(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Properties.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Supports custom properties per platform. * Next ID = 4. * </pre> * * Protobuf type {@code common.Properties} */ public final class Properties extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Properties) PropertiesOrBuilder { private static final long serialVersionUID = 0L; // Use Properties.newBuilder() to construct. private Properties(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Properties() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Properties(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Properties( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { structFieldCase_ = 1; structField_ = input.readBytes(); break; } case 18: { com.google.protobuf.Struct.Builder subBuilder = null; if (structFieldCase_ == 2) { subBuilder = ((com.google.protobuf.Struct) structField_).toBuilder(); } structField_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.protobuf.Struct) structField_); structField_ = subBuilder.buildPartial(); } structFieldCase_ = 2; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Properties_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Properties_fieldAccessorTable .ensureFieldAccessorsInitialized( Properties.class, Builder.class); } private int structFieldCase_ = 0; private Object structField_; public enum StructFieldCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { STRUCT_BYTES(1), STRUCT(2), STRUCTFIELD_NOT_SET(0); private final int value; private StructFieldCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static StructFieldCase valueOf(int value) { return forNumber(value); } public static StructFieldCase forNumber(int value) { switch (value) { case 1: return STRUCT_BYTES; case 2: return STRUCT; case 0: return STRUCTFIELD_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public StructFieldCase getStructFieldCase() { return StructFieldCase.forNumber( structFieldCase_); } public static final int STRUCT_BYTES_FIELD_NUMBER = 1; /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return Whether the structBytes field is set. */ @Override public boolean hasStructBytes() { return structFieldCase_ == 1; } /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return The structBytes. */ @Override public com.google.protobuf.ByteString getStructBytes() { if (structFieldCase_ == 1) { return (com.google.protobuf.ByteString) structField_; } return com.google.protobuf.ByteString.EMPTY; } public static final int STRUCT_FIELD_NUMBER = 2; /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> * @return Whether the struct field is set. */ @Override public boolean hasStruct() { return structFieldCase_ == 2; } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> * @return The struct. */ @Override public com.google.protobuf.Struct getStruct() { if (structFieldCase_ == 2) { return (com.google.protobuf.Struct) structField_; } return com.google.protobuf.Struct.getDefaultInstance(); } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ @Override public com.google.protobuf.StructOrBuilder getStructOrBuilder() { if (structFieldCase_ == 2) { return (com.google.protobuf.Struct) structField_; } return com.google.protobuf.Struct.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (structFieldCase_ == 1) { output.writeBytes( 1, (com.google.protobuf.ByteString) structField_); } if (structFieldCase_ == 2) { output.writeMessage(2, (com.google.protobuf.Struct) structField_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (structFieldCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 1, (com.google.protobuf.ByteString) structField_); } if (structFieldCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.google.protobuf.Struct) structField_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Properties)) { return super.equals(obj); } Properties other = (Properties) obj; if (!getStructFieldCase().equals(other.getStructFieldCase())) return false; switch (structFieldCase_) { case 1: if (!getStructBytes() .equals(other.getStructBytes())) return false; break; case 2: if (!getStruct() .equals(other.getStruct())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (structFieldCase_) { case 1: hash = (37 * hash) + STRUCT_BYTES_FIELD_NUMBER; hash = (53 * hash) + getStructBytes().hashCode(); break; case 2: hash = (37 * hash) + STRUCT_FIELD_NUMBER; hash = (53 * hash) + getStruct().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Properties parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Properties parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Properties parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Properties parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Properties parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Properties parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Properties parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Properties 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 Properties parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Properties 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 Properties parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Properties parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Properties prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Supports custom properties per platform. * Next ID = 4. * </pre> * * Protobuf type {@code common.Properties} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Properties) PropertiesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Properties_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Properties_fieldAccessorTable .ensureFieldAccessorsInitialized( Properties.class, Builder.class); } // Construct using ai.promoted.proto.common.Properties.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); structFieldCase_ = 0; structField_ = null; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Properties_descriptor; } @Override public Properties getDefaultInstanceForType() { return Properties.getDefaultInstance(); } @Override public Properties build() { Properties result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Properties buildPartial() { Properties result = new Properties(this); if (structFieldCase_ == 1) { result.structField_ = structField_; } if (structFieldCase_ == 2) { if (structBuilder_ == null) { result.structField_ = structField_; } else { result.structField_ = structBuilder_.build(); } } result.structFieldCase_ = structFieldCase_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Properties) { return mergeFrom((Properties)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Properties other) { if (other == Properties.getDefaultInstance()) return this; switch (other.getStructFieldCase()) { case STRUCT_BYTES: { setStructBytes(other.getStructBytes()); break; } case STRUCT: { mergeStruct(other.getStruct()); break; } case STRUCTFIELD_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Properties parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Properties) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int structFieldCase_ = 0; private Object structField_; public StructFieldCase getStructFieldCase() { return StructFieldCase.forNumber( structFieldCase_); } public Builder clearStructField() { structFieldCase_ = 0; structField_ = null; onChanged(); return this; } /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return Whether the structBytes field is set. */ public boolean hasStructBytes() { return structFieldCase_ == 1; } /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return The structBytes. */ public com.google.protobuf.ByteString getStructBytes() { if (structFieldCase_ == 1) { return (com.google.protobuf.ByteString) structField_; } return com.google.protobuf.ByteString.EMPTY; } /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @param value The structBytes to set. * @return This builder for chaining. */ public Builder setStructBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } structFieldCase_ = 1; structField_ = value; onChanged(); return this; } /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return This builder for chaining. */ public Builder clearStructBytes() { if (structFieldCase_ == 1) { structFieldCase_ = 0; structField_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> structBuilder_; /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> * @return Whether the struct field is set. */ @Override public boolean hasStruct() { return structFieldCase_ == 2; } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> * @return The struct. */ @Override public com.google.protobuf.Struct getStruct() { if (structBuilder_ == null) { if (structFieldCase_ == 2) { return (com.google.protobuf.Struct) structField_; } return com.google.protobuf.Struct.getDefaultInstance(); } else { if (structFieldCase_ == 2) { return structBuilder_.getMessage(); } return com.google.protobuf.Struct.getDefaultInstance(); } } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ public Builder setStruct(com.google.protobuf.Struct value) { if (structBuilder_ == null) { if (value == null) { throw new NullPointerException(); } structField_ = value; onChanged(); } else { structBuilder_.setMessage(value); } structFieldCase_ = 2; return this; } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ public Builder setStruct( com.google.protobuf.Struct.Builder builderForValue) { if (structBuilder_ == null) { structField_ = builderForValue.build(); onChanged(); } else { structBuilder_.setMessage(builderForValue.build()); } structFieldCase_ = 2; return this; } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ public Builder mergeStruct(com.google.protobuf.Struct value) { if (structBuilder_ == null) { if (structFieldCase_ == 2 && structField_ != com.google.protobuf.Struct.getDefaultInstance()) { structField_ = com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) structField_) .mergeFrom(value).buildPartial(); } else { structField_ = value; } onChanged(); } else { if (structFieldCase_ == 2) { structBuilder_.mergeFrom(value); } structBuilder_.setMessage(value); } structFieldCase_ = 2; return this; } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ public Builder clearStruct() { if (structBuilder_ == null) { if (structFieldCase_ == 2) { structFieldCase_ = 0; structField_ = null; onChanged(); } } else { if (structFieldCase_ == 2) { structFieldCase_ = 0; structField_ = null; } structBuilder_.clear(); } return this; } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ public com.google.protobuf.Struct.Builder getStructBuilder() { return getStructFieldBuilder().getBuilder(); } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ @Override public com.google.protobuf.StructOrBuilder getStructOrBuilder() { if ((structFieldCase_ == 2) && (structBuilder_ != null)) { return structBuilder_.getMessageOrBuilder(); } else { if (structFieldCase_ == 2) { return (com.google.protobuf.Struct) structField_; } return com.google.protobuf.Struct.getDefaultInstance(); } } /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getStructFieldBuilder() { if (structBuilder_ == null) { if (!(structFieldCase_ == 2)) { structField_ = com.google.protobuf.Struct.getDefaultInstance(); } structBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( (com.google.protobuf.Struct) structField_, getParentForChildren(), isClean()); structField_ = null; } structFieldCase_ = 2; onChanged();; return structBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Properties) } // @@protoc_insertion_point(class_scope:common.Properties) private static final Properties DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Properties(); } public static Properties getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Properties> PARSER = new com.google.protobuf.AbstractParser<Properties>() { @Override public Properties parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Properties(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Properties> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Properties> getParserForType() { return PARSER; } @Override public Properties getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/PropertiesOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface PropertiesOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Properties) com.google.protobuf.MessageOrBuilder { /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return Whether the structBytes field is set. */ boolean hasStructBytes(); /** * <pre> * Optional. Contains protobuf serialized bytes. * </pre> * * <code>bytes struct_bytes = 1;</code> * @return The structBytes. */ com.google.protobuf.ByteString getStructBytes(); /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> * @return Whether the struct field is set. */ boolean hasStruct(); /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> * @return The struct. */ com.google.protobuf.Struct getStruct(); /** * <pre> * Optional. Can be converted to/from JSON. * </pre> * * <code>.google.protobuf.Struct struct = 2;</code> */ com.google.protobuf.StructOrBuilder getStructOrBuilder(); public Properties.StructFieldCase getStructFieldCase(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Screen.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Device screen * Next ID = 3. * </pre> * * Protobuf type {@code common.Screen} */ public final class Screen extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Screen) ScreenOrBuilder { private static final long serialVersionUID = 0L; // Use Screen.newBuilder() to construct. private Screen(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Screen() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Screen(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Screen( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { Size.Builder subBuilder = null; if (size_ != null) { subBuilder = size_.toBuilder(); } size_ = input.readMessage(Size.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(size_); size_ = subBuilder.buildPartial(); } break; } case 21: { scale_ = input.readFloat(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Screen_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Screen_fieldAccessorTable .ensureFieldAccessorsInitialized( Screen.class, Builder.class); } public static final int SIZE_FIELD_NUMBER = 1; private Size size_; /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> * @return Whether the size field is set. */ @Override public boolean hasSize() { return size_ != null; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> * @return The size. */ @Override public Size getSize() { return size_ == null ? Size.getDefaultInstance() : size_; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ @Override public SizeOrBuilder getSizeOrBuilder() { return getSize(); } public static final int SCALE_FIELD_NUMBER = 2; private float scale_; /** * <pre> * Natural scale factor. * Android: DisplayMetrics.density * iOS: UIScreen.scale * </pre> * * <code>float scale = 2;</code> * @return The scale. */ @Override public float getScale() { return scale_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (size_ != null) { output.writeMessage(1, getSize()); } if (scale_ != 0F) { output.writeFloat(2, scale_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (size_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSize()); } if (scale_ != 0F) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(2, scale_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Screen)) { return super.equals(obj); } Screen other = (Screen) obj; if (hasSize() != other.hasSize()) return false; if (hasSize()) { if (!getSize() .equals(other.getSize())) return false; } if (Float.floatToIntBits(getScale()) != Float.floatToIntBits( other.getScale())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSize()) { hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + getSize().hashCode(); } hash = (37 * hash) + SCALE_FIELD_NUMBER; hash = (53 * hash) + Float.floatToIntBits( getScale()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Screen parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Screen parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Screen parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Screen parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Screen parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Screen parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Screen parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Screen 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 Screen parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Screen 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 Screen parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Screen parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Screen prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Device screen * Next ID = 3. * </pre> * * Protobuf type {@code common.Screen} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Screen) ScreenOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Screen_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Screen_fieldAccessorTable .ensureFieldAccessorsInitialized( Screen.class, Builder.class); } // Construct using ai.promoted.proto.common.Screen.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); if (sizeBuilder_ == null) { size_ = null; } else { size_ = null; sizeBuilder_ = null; } scale_ = 0F; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Screen_descriptor; } @Override public Screen getDefaultInstanceForType() { return Screen.getDefaultInstance(); } @Override public Screen build() { Screen result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Screen buildPartial() { Screen result = new Screen(this); if (sizeBuilder_ == null) { result.size_ = size_; } else { result.size_ = sizeBuilder_.build(); } result.scale_ = scale_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Screen) { return mergeFrom((Screen)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Screen other) { if (other == Screen.getDefaultInstance()) return this; if (other.hasSize()) { mergeSize(other.getSize()); } if (other.getScale() != 0F) { setScale(other.getScale()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Screen parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Screen) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private Size size_; private com.google.protobuf.SingleFieldBuilderV3< Size, Size.Builder, SizeOrBuilder> sizeBuilder_; /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> * @return Whether the size field is set. */ public boolean hasSize() { return sizeBuilder_ != null || size_ != null; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> * @return The size. */ public Size getSize() { if (sizeBuilder_ == null) { return size_ == null ? Size.getDefaultInstance() : size_; } else { return sizeBuilder_.getMessage(); } } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ public Builder setSize(Size value) { if (sizeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } size_ = value; onChanged(); } else { sizeBuilder_.setMessage(value); } return this; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ public Builder setSize( Size.Builder builderForValue) { if (sizeBuilder_ == null) { size_ = builderForValue.build(); onChanged(); } else { sizeBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ public Builder mergeSize(Size value) { if (sizeBuilder_ == null) { if (size_ != null) { size_ = Size.newBuilder(size_).mergeFrom(value).buildPartial(); } else { size_ = value; } onChanged(); } else { sizeBuilder_.mergeFrom(value); } return this; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ public Builder clearSize() { if (sizeBuilder_ == null) { size_ = null; onChanged(); } else { size_ = null; sizeBuilder_ = null; } return this; } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ public Size.Builder getSizeBuilder() { onChanged(); return getSizeFieldBuilder().getBuilder(); } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ public SizeOrBuilder getSizeOrBuilder() { if (sizeBuilder_ != null) { return sizeBuilder_.getMessageOrBuilder(); } else { return size_ == null ? Size.getDefaultInstance() : size_; } } /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< Size, Size.Builder, SizeOrBuilder> getSizeFieldBuilder() { if (sizeBuilder_ == null) { sizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Size, Size.Builder, SizeOrBuilder>( getSize(), getParentForChildren(), isClean()); size_ = null; } return sizeBuilder_; } private float scale_ ; /** * <pre> * Natural scale factor. * Android: DisplayMetrics.density * iOS: UIScreen.scale * </pre> * * <code>float scale = 2;</code> * @return The scale. */ @Override public float getScale() { return scale_; } /** * <pre> * Natural scale factor. * Android: DisplayMetrics.density * iOS: UIScreen.scale * </pre> * * <code>float scale = 2;</code> * @param value The scale to set. * @return This builder for chaining. */ public Builder setScale(float value) { scale_ = value; onChanged(); return this; } /** * <pre> * Natural scale factor. * Android: DisplayMetrics.density * iOS: UIScreen.scale * </pre> * * <code>float scale = 2;</code> * @return This builder for chaining. */ public Builder clearScale() { scale_ = 0F; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Screen) } // @@protoc_insertion_point(class_scope:common.Screen) private static final Screen DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Screen(); } public static Screen getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Screen> PARSER = new com.google.protobuf.AbstractParser<Screen>() { @Override public Screen parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Screen(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Screen> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Screen> getParserForType() { return PARSER; } @Override public Screen getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/ScreenOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface ScreenOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Screen) com.google.protobuf.MessageOrBuilder { /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> * @return Whether the size field is set. */ boolean hasSize(); /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> * @return The size. */ Size getSize(); /** * <pre> * Android: DisplayMetrics.widthPixels/heightPixels * iOS: UIScreen.nativeBounds.width/height * </pre> * * <code>.common.Size size = 1;</code> */ SizeOrBuilder getSizeOrBuilder(); /** * <pre> * Natural scale factor. * Android: DisplayMetrics.density * iOS: UIScreen.scale * </pre> * * <code>float scale = 2;</code> * @return The scale. */ float getScale(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Size.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Rectangle size in pixels * Next ID = 3. * </pre> * * Protobuf type {@code common.Size} */ public final class Size extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Size) SizeOrBuilder { private static final long serialVersionUID = 0L; // Use Size.newBuilder() to construct. private Size(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Size() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Size(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Size( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { width_ = input.readUInt32(); break; } case 16: { height_ = input.readUInt32(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Size_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Size_fieldAccessorTable .ensureFieldAccessorsInitialized( Size.class, Builder.class); } public static final int WIDTH_FIELD_NUMBER = 1; private int width_; /** * <code>uint32 width = 1;</code> * @return The width. */ @Override public int getWidth() { return width_; } public static final int HEIGHT_FIELD_NUMBER = 2; private int height_; /** * <code>uint32 height = 2;</code> * @return The height. */ @Override public int getHeight() { return height_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (width_ != 0) { output.writeUInt32(1, width_); } if (height_ != 0) { output.writeUInt32(2, height_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (width_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, width_); } if (height_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, height_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Size)) { return super.equals(obj); } Size other = (Size) obj; if (getWidth() != other.getWidth()) return false; if (getHeight() != other.getHeight()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + WIDTH_FIELD_NUMBER; hash = (53 * hash) + getWidth(); hash = (37 * hash) + HEIGHT_FIELD_NUMBER; hash = (53 * hash) + getHeight(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Size parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Size parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Size parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Size parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Size parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Size parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Size parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Size 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 Size parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Size 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 Size parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Size parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Size prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Rectangle size in pixels * Next ID = 3. * </pre> * * Protobuf type {@code common.Size} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Size) SizeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Size_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Size_fieldAccessorTable .ensureFieldAccessorsInitialized( Size.class, Builder.class); } // Construct using ai.promoted.proto.common.Size.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); width_ = 0; height_ = 0; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Size_descriptor; } @Override public Size getDefaultInstanceForType() { return Size.getDefaultInstance(); } @Override public Size build() { Size result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Size buildPartial() { Size result = new Size(this); result.width_ = width_; result.height_ = height_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Size) { return mergeFrom((Size)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Size other) { if (other == Size.getDefaultInstance()) return this; if (other.getWidth() != 0) { setWidth(other.getWidth()); } if (other.getHeight() != 0) { setHeight(other.getHeight()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Size parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Size) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int width_ ; /** * <code>uint32 width = 1;</code> * @return The width. */ @Override public int getWidth() { return width_; } /** * <code>uint32 width = 1;</code> * @param value The width to set. * @return This builder for chaining. */ public Builder setWidth(int value) { width_ = value; onChanged(); return this; } /** * <code>uint32 width = 1;</code> * @return This builder for chaining. */ public Builder clearWidth() { width_ = 0; onChanged(); return this; } private int height_ ; /** * <code>uint32 height = 2;</code> * @return The height. */ @Override public int getHeight() { return height_; } /** * <code>uint32 height = 2;</code> * @param value The height to set. * @return This builder for chaining. */ public Builder setHeight(int value) { height_ = value; onChanged(); return this; } /** * <code>uint32 height = 2;</code> * @return This builder for chaining. */ public Builder clearHeight() { height_ = 0; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Size) } // @@protoc_insertion_point(class_scope:common.Size) private static final Size DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Size(); } public static Size getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Size> PARSER = new com.google.protobuf.AbstractParser<Size>() { @Override public Size parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Size(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Size> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Size> getParserForType() { return PARSER; } @Override public Size getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/SizeOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface SizeOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Size) com.google.protobuf.MessageOrBuilder { /** * <code>uint32 width = 1;</code> * @return The width. */ int getWidth(); /** * <code>uint32 height = 2;</code> * @return The height. */ int getHeight(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/Timing.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * A message containing timing information. * We can add common timing info to this message. Down the road, we might * make more specific Timing messages (e.g. MetricsTiming). We can reuse * the field numbers. * Next ID = 4. * </pre> * * Protobuf type {@code common.Timing} */ public final class Timing extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.Timing) TimingOrBuilder { private static final long serialVersionUID = 0L; // Use Timing.newBuilder() to construct. private Timing(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Timing() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Timing(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Timing( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { clientLogTimestamp_ = input.readUInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Timing_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Timing_fieldAccessorTable .ensureFieldAccessorsInitialized( Timing.class, Builder.class); } public static final int CLIENT_LOG_TIMESTAMP_FIELD_NUMBER = 1; private long clientLogTimestamp_; /** * <pre> * Optional. Client timestamp when event was created. * </pre> * * <code>uint64 client_log_timestamp = 1;</code> * @return The clientLogTimestamp. */ @Override public long getClientLogTimestamp() { return clientLogTimestamp_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (clientLogTimestamp_ != 0L) { output.writeUInt64(1, clientLogTimestamp_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (clientLogTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, clientLogTimestamp_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Timing)) { return super.equals(obj); } Timing other = (Timing) obj; if (getClientLogTimestamp() != other.getClientLogTimestamp()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CLIENT_LOG_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getClientLogTimestamp()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Timing parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Timing parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Timing parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Timing parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Timing parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Timing parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Timing parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Timing 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 Timing parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Timing 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 Timing parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Timing parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Timing prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * A message containing timing information. * We can add common timing info to this message. Down the road, we might * make more specific Timing messages (e.g. MetricsTiming). We can reuse * the field numbers. * Next ID = 4. * </pre> * * Protobuf type {@code common.Timing} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.Timing) TimingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_Timing_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_Timing_fieldAccessorTable .ensureFieldAccessorsInitialized( Timing.class, Builder.class); } // Construct using ai.promoted.proto.common.Timing.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); clientLogTimestamp_ = 0L; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_Timing_descriptor; } @Override public Timing getDefaultInstanceForType() { return Timing.getDefaultInstance(); } @Override public Timing build() { Timing result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Timing buildPartial() { Timing result = new Timing(this); result.clientLogTimestamp_ = clientLogTimestamp_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Timing) { return mergeFrom((Timing)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Timing other) { if (other == Timing.getDefaultInstance()) return this; if (other.getClientLogTimestamp() != 0L) { setClientLogTimestamp(other.getClientLogTimestamp()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Timing parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Timing) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private long clientLogTimestamp_ ; /** * <pre> * Optional. Client timestamp when event was created. * </pre> * * <code>uint64 client_log_timestamp = 1;</code> * @return The clientLogTimestamp. */ @Override public long getClientLogTimestamp() { return clientLogTimestamp_; } /** * <pre> * Optional. Client timestamp when event was created. * </pre> * * <code>uint64 client_log_timestamp = 1;</code> * @param value The clientLogTimestamp to set. * @return This builder for chaining. */ public Builder setClientLogTimestamp(long value) { clientLogTimestamp_ = value; onChanged(); return this; } /** * <pre> * Optional. Client timestamp when event was created. * </pre> * * <code>uint64 client_log_timestamp = 1;</code> * @return This builder for chaining. */ public Builder clearClientLogTimestamp() { clientLogTimestamp_ = 0L; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.Timing) } // @@protoc_insertion_point(class_scope:common.Timing) private static final Timing DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Timing(); } public static Timing getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Timing> PARSER = new com.google.protobuf.AbstractParser<Timing>() { @Override public Timing parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Timing(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Timing> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Timing> getParserForType() { return PARSER; } @Override public Timing getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/TimingOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface TimingOrBuilder extends // @@protoc_insertion_point(interface_extends:common.Timing) com.google.protobuf.MessageOrBuilder { /** * <pre> * Optional. Client timestamp when event was created. * </pre> * * <code>uint64 client_log_timestamp = 1;</code> * @return The clientLogTimestamp. */ long getClientLogTimestamp(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/UserInfo.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; /** * <pre> * Common submessage that scopes helps scope a request/log to a user. * Next ID = 4. * </pre> * * Protobuf type {@code common.UserInfo} */ public final class UserInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:common.UserInfo) UserInfoOrBuilder { private static final long serialVersionUID = 0L; // Use UserInfo.newBuilder() to construct. private UserInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private UserInfo() { userId_ = ""; logUserId_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new UserInfo(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private UserInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); userId_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); logUserId_ = s; break; } case 24: { isInternalUser_ = input.readBool(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_UserInfo_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_UserInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( UserInfo.class, Builder.class); } public static final int USER_ID_FIELD_NUMBER = 1; private volatile Object userId_; /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return The userId. */ @Override public String getUserId() { Object ref = userId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); userId_ = s; return s; } } /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return The bytes for userId. */ @Override public com.google.protobuf.ByteString getUserIdBytes() { Object ref = userId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); userId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOG_USER_ID_FIELD_NUMBER = 2; private volatile Object logUserId_; /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return The logUserId. */ @Override public String getLogUserId() { Object ref = logUserId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); logUserId_ = s; return s; } } /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return The bytes for logUserId. */ @Override public com.google.protobuf.ByteString getLogUserIdBytes() { Object ref = logUserId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); logUserId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int IS_INTERNAL_USER_FIELD_NUMBER = 3; private boolean isInternalUser_; /** * <pre> * Optional, defaults to false. Indicates that the user is from the * marketplace or Promoted team. * </pre> * * <code>bool is_internal_user = 3;</code> * @return The isInternalUser. */ @Override public boolean getIsInternalUser() { return isInternalUser_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getUserIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userId_); } if (!getLogUserIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, logUserId_); } if (isInternalUser_ != false) { output.writeBool(3, isInternalUser_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUserIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userId_); } if (!getLogUserIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, logUserId_); } if (isInternalUser_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, isInternalUser_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof UserInfo)) { return super.equals(obj); } UserInfo other = (UserInfo) obj; if (!getUserId() .equals(other.getUserId())) return false; if (!getLogUserId() .equals(other.getLogUserId())) return false; if (getIsInternalUser() != other.getIsInternalUser()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USER_ID_FIELD_NUMBER; hash = (53 * hash) + getUserId().hashCode(); hash = (37 * hash) + LOG_USER_ID_FIELD_NUMBER; hash = (53 * hash) + getLogUserId().hashCode(); hash = (37 * hash) + IS_INTERNAL_USER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsInternalUser()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static UserInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static UserInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static UserInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static UserInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static UserInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static UserInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static UserInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static UserInfo 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 UserInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static UserInfo 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 UserInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static UserInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(UserInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Common submessage that scopes helps scope a request/log to a user. * Next ID = 4. * </pre> * * Protobuf type {@code common.UserInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:common.UserInfo) UserInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return CommonProto.internal_static_common_UserInfo_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return CommonProto.internal_static_common_UserInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( UserInfo.class, Builder.class); } // Construct using ai.promoted.proto.common.UserInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); userId_ = ""; logUserId_ = ""; isInternalUser_ = false; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return CommonProto.internal_static_common_UserInfo_descriptor; } @Override public UserInfo getDefaultInstanceForType() { return UserInfo.getDefaultInstance(); } @Override public UserInfo build() { UserInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public UserInfo buildPartial() { UserInfo result = new UserInfo(this); result.userId_ = userId_; result.logUserId_ = logUserId_; result.isInternalUser_ = isInternalUser_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof UserInfo) { return mergeFrom((UserInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(UserInfo other) { if (other == UserInfo.getDefaultInstance()) return this; if (!other.getUserId().isEmpty()) { userId_ = other.userId_; onChanged(); } if (!other.getLogUserId().isEmpty()) { logUserId_ = other.logUserId_; onChanged(); } if (other.getIsInternalUser() != false) { setIsInternalUser(other.getIsInternalUser()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { UserInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (UserInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private Object userId_ = ""; /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return The userId. */ public String getUserId() { Object ref = userId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); userId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return The bytes for userId. */ public com.google.protobuf.ByteString getUserIdBytes() { Object ref = userId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); userId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @param value The userId to set. * @return This builder for chaining. */ public Builder setUserId( String value) { if (value == null) { throw new NullPointerException(); } userId_ = value; onChanged(); return this; } /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return This builder for chaining. */ public Builder clearUserId() { userId_ = getDefaultInstance().getUserId(); onChanged(); return this; } /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @param value The bytes for userId to set. * @return This builder for chaining. */ public Builder setUserIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); userId_ = value; onChanged(); return this; } private Object logUserId_ = ""; /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return The logUserId. */ public String getLogUserId() { Object ref = logUserId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); logUserId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return The bytes for logUserId. */ public com.google.protobuf.ByteString getLogUserIdBytes() { Object ref = logUserId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); logUserId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @param value The logUserId to set. * @return This builder for chaining. */ public Builder setLogUserId( String value) { if (value == null) { throw new NullPointerException(); } logUserId_ = value; onChanged(); return this; } /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return This builder for chaining. */ public Builder clearLogUserId() { logUserId_ = getDefaultInstance().getLogUserId(); onChanged(); return this; } /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @param value The bytes for logUserId to set. * @return This builder for chaining. */ public Builder setLogUserIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); logUserId_ = value; onChanged(); return this; } private boolean isInternalUser_ ; /** * <pre> * Optional, defaults to false. Indicates that the user is from the * marketplace or Promoted team. * </pre> * * <code>bool is_internal_user = 3;</code> * @return The isInternalUser. */ @Override public boolean getIsInternalUser() { return isInternalUser_; } /** * <pre> * Optional, defaults to false. Indicates that the user is from the * marketplace or Promoted team. * </pre> * * <code>bool is_internal_user = 3;</code> * @param value The isInternalUser to set. * @return This builder for chaining. */ public Builder setIsInternalUser(boolean value) { isInternalUser_ = value; onChanged(); return this; } /** * <pre> * Optional, defaults to false. Indicates that the user is from the * marketplace or Promoted team. * </pre> * * <code>bool is_internal_user = 3;</code> * @return This builder for chaining. */ public Builder clearIsInternalUser() { isInternalUser_ = false; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:common.UserInfo) } // @@protoc_insertion_point(class_scope:common.UserInfo) private static final UserInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new UserInfo(); } public static UserInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<UserInfo> PARSER = new com.google.protobuf.AbstractParser<UserInfo>() { @Override public UserInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new UserInfo(input, extensionRegistry); } }; public static com.google.protobuf.Parser<UserInfo> parser() { return PARSER; } @Override public com.google.protobuf.Parser<UserInfo> getParserForType() { return PARSER; } @Override public UserInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/common/UserInfoOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/common/common.proto package ai.promoted.proto.common; public interface UserInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:common.UserInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return The userId. */ String getUserId(); /** * <pre> * Optional. The Platform's actual user ID. * This field will be cleared from our transaction logs. * </pre> * * <code>string user_id = 1;</code> * @return The bytes for userId. */ com.google.protobuf.ByteString getUserIdBytes(); /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return The logUserId. */ String getLogUserId(); /** * <pre> * Optional. This is a user UUID that is different from user_id and * can quickly be disassociated from the actual user ID. This is useful: * 1. in case the user wants to be forgotten. * 2. logging unauthenticated users. * The user UUID is in a different ID space than user_id. * </pre> * * <code>string log_user_id = 2;</code> * @return The bytes for logUserId. */ com.google.protobuf.ByteString getLogUserIdBytes(); /** * <pre> * Optional, defaults to false. Indicates that the user is from the * marketplace or Promoted team. * </pre> * * <code>bool is_internal_user = 3;</code> * @return The isInternalUser. */ boolean getIsInternalUser(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/Blender.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public final class Blender { private Blender() {} 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_delivery_BlenderRule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_BlenderRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_PositiveRule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_PositiveRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_InsertRule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_InsertRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_NegativeRule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_NegativeRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_DiversityRule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_DiversityRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_BlenderConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_BlenderConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_QualityScoreConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_QualityScoreConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_QualityScoreTerm_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_QualityScoreTerm_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_NormalDistribution_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_NormalDistribution_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { String[] descriptorData = { "\n\034proto/delivery/blender.proto\022\010delivery" + "\"\373\001\n\013BlenderRule\022\026\n\016attribute_name\030\001 \001(\t" + "\022/\n\rpositive_rule\030\006 \001(\0132\026.delivery.Posit" + "iveRuleH\000\022+\n\013insert_rule\030\007 \001(\0132\024.deliver" + "y.InsertRuleH\000\022/\n\rnegative_rule\030\010 \001(\0132\026." + "delivery.NegativeRuleH\000\0221\n\016diversity_rul" + "e\030\t \001(\0132\027.delivery.DiversityRuleH\000B\006\n\004ru" + "leJ\004\010\n\020\013J\004\010\002\020\006\"z\n\014PositiveRule\022\027\n\nselect" + "_pct\030\001 \001(\001H\000\210\001\001\022\024\n\007min_pos\030\002 \001(\004H\001\210\001\001\022\024\n" + "\007max_pos\030\003 \001(\004H\002\210\001\001B\r\n\013_select_pctB\n\n\010_m" + "in_posB\n\n\010_max_pos\"x\n\nInsertRule\022\027\n\nsele" + "ct_pct\030\001 \001(\001H\000\210\001\001\022\024\n\007min_pos\030\002 \001(\004H\001\210\001\001\022" + "\024\n\007max_pos\030\003 \001(\004H\002\210\001\001B\r\n\013_select_pctB\n\n\010" + "_min_posB\n\n\010_max_pos\"\356\001\n\014NegativeRule\022\026\n" + "\tpluck_pct\030\001 \001(\001H\000\210\001\001\022\034\n\017forbid_less_pos" + "\030\002 \001(\004H\001\210\001\001\022\030\n\013min_spacing\030\003 \001(\004H\002\210\001\001\022\037\n" + "\022forbid_greater_pos\030\004 \001(\004H\003\210\001\001\022\026\n\tmax_co" + "unt\030\005 \001(\004H\004\210\001\001B\014\n\n_pluck_pctB\022\n\020_forbid_" + "less_posB\016\n\014_min_spacingB\025\n\023_forbid_grea" + "ter_posB\014\n\n_max_count\"-\n\rDiversityRule\022\022" + "\n\005multi\030\001 \001(\001H\000\210\001\001B\010\n\006_multi\"x\n\rBlenderC" + "onfig\022+\n\014blender_rule\030\001 \003(\0132\025.delivery.B" + "lenderRule\022:\n\024quality_score_config\030\002 \001(\013" + "2\034.delivery.QualityScoreConfig\"K\n\022Qualit" + "yScoreConfig\0225\n\021weighted_sum_term\030\001 \003(\0132" + "\032.delivery.QualityScoreTerm\"\367\001\n\020QualityS" + "coreTerm\022\030\n\016attribute_name\030\001 \001(\tH\000\0225\n\rra" + "ndom_normal\030\002 \001(\0132\034.delivery.NormalDistr" + "ibutionH\000\022\016\n\004ones\030\003 \001(\010H\000\022\027\n\nfetch_high\030" + "\n \001(\001H\001\210\001\001\022\026\n\tfetch_low\030\013 \001(\001H\002\210\001\001\022\016\n\006we" + "ight\030\014 \001(\001\022\016\n\006offset\030\r \001(\001B\016\n\014fetch_meth" + "odB\r\n\013_fetch_highB\014\n\n_fetch_lowJ\004\010\004\020\n\"4\n" + "\022NormalDistribution\022\014\n\004mean\030\001 \001(\001\022\020\n\010var" + "iance\030\002 \001(\001B\'\n\032ai.promoted.proto.deliver" + "yB\007BlenderP\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); internal_static_delivery_BlenderRule_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_delivery_BlenderRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_BlenderRule_descriptor, new String[] { "AttributeName", "PositiveRule", "InsertRule", "NegativeRule", "DiversityRule", "Rule", }); internal_static_delivery_PositiveRule_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_delivery_PositiveRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_PositiveRule_descriptor, new String[] { "SelectPct", "MinPos", "MaxPos", "SelectPct", "MinPos", "MaxPos", }); internal_static_delivery_InsertRule_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_delivery_InsertRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_InsertRule_descriptor, new String[] { "SelectPct", "MinPos", "MaxPos", "SelectPct", "MinPos", "MaxPos", }); internal_static_delivery_NegativeRule_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_delivery_NegativeRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_NegativeRule_descriptor, new String[] { "PluckPct", "ForbidLessPos", "MinSpacing", "ForbidGreaterPos", "MaxCount", "PluckPct", "ForbidLessPos", "MinSpacing", "ForbidGreaterPos", "MaxCount", }); internal_static_delivery_DiversityRule_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_delivery_DiversityRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_DiversityRule_descriptor, new String[] { "Multi", "Multi", }); internal_static_delivery_BlenderConfig_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_delivery_BlenderConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_BlenderConfig_descriptor, new String[] { "BlenderRule", "QualityScoreConfig", }); internal_static_delivery_QualityScoreConfig_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_delivery_QualityScoreConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_QualityScoreConfig_descriptor, new String[] { "WeightedSumTerm", }); internal_static_delivery_QualityScoreTerm_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_delivery_QualityScoreTerm_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_QualityScoreTerm_descriptor, new String[] { "AttributeName", "RandomNormal", "Ones", "FetchHigh", "FetchLow", "Weight", "Offset", "FetchMethod", "FetchHigh", "FetchLow", }); internal_static_delivery_NormalDistribution_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_delivery_NormalDistribution_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_NormalDistribution_descriptor, new String[] { "Mean", "Variance", }); } // @@protoc_insertion_point(outer_class_scope) }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/BlenderConfig.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 3. * </pre> * * Protobuf type {@code delivery.BlenderConfig} */ public final class BlenderConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.BlenderConfig) BlenderConfigOrBuilder { private static final long serialVersionUID = 0L; // Use BlenderConfig.newBuilder() to construct. private BlenderConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private BlenderConfig() { blenderRule_ = java.util.Collections.emptyList(); } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new BlenderConfig(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BlenderConfig( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { blenderRule_ = new java.util.ArrayList<BlenderRule>(); mutable_bitField0_ |= 0x00000001; } blenderRule_.add( input.readMessage(BlenderRule.parser(), extensionRegistry)); break; } case 18: { QualityScoreConfig.Builder subBuilder = null; if (qualityScoreConfig_ != null) { subBuilder = qualityScoreConfig_.toBuilder(); } qualityScoreConfig_ = input.readMessage(QualityScoreConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(qualityScoreConfig_); qualityScoreConfig_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { blenderRule_ = java.util.Collections.unmodifiableList(blenderRule_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_BlenderConfig_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_BlenderConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( BlenderConfig.class, Builder.class); } public static final int BLENDER_RULE_FIELD_NUMBER = 1; private java.util.List<BlenderRule> blenderRule_; /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ @Override public java.util.List<BlenderRule> getBlenderRuleList() { return blenderRule_; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ @Override public java.util.List<? extends BlenderRuleOrBuilder> getBlenderRuleOrBuilderList() { return blenderRule_; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ @Override public int getBlenderRuleCount() { return blenderRule_.size(); } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ @Override public BlenderRule getBlenderRule(int index) { return blenderRule_.get(index); } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ @Override public BlenderRuleOrBuilder getBlenderRuleOrBuilder( int index) { return blenderRule_.get(index); } public static final int QUALITY_SCORE_CONFIG_FIELD_NUMBER = 2; private QualityScoreConfig qualityScoreConfig_; /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> * @return Whether the qualityScoreConfig field is set. */ @Override public boolean hasQualityScoreConfig() { return qualityScoreConfig_ != null; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> * @return The qualityScoreConfig. */ @Override public QualityScoreConfig getQualityScoreConfig() { return qualityScoreConfig_ == null ? QualityScoreConfig.getDefaultInstance() : qualityScoreConfig_; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ @Override public QualityScoreConfigOrBuilder getQualityScoreConfigOrBuilder() { return getQualityScoreConfig(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < blenderRule_.size(); i++) { output.writeMessage(1, blenderRule_.get(i)); } if (qualityScoreConfig_ != null) { output.writeMessage(2, getQualityScoreConfig()); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < blenderRule_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, blenderRule_.get(i)); } if (qualityScoreConfig_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getQualityScoreConfig()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlenderConfig)) { return super.equals(obj); } BlenderConfig other = (BlenderConfig) obj; if (!getBlenderRuleList() .equals(other.getBlenderRuleList())) return false; if (hasQualityScoreConfig() != other.hasQualityScoreConfig()) return false; if (hasQualityScoreConfig()) { if (!getQualityScoreConfig() .equals(other.getQualityScoreConfig())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getBlenderRuleCount() > 0) { hash = (37 * hash) + BLENDER_RULE_FIELD_NUMBER; hash = (53 * hash) + getBlenderRuleList().hashCode(); } if (hasQualityScoreConfig()) { hash = (37 * hash) + QUALITY_SCORE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getQualityScoreConfig().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static BlenderConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BlenderConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BlenderConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BlenderConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BlenderConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BlenderConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BlenderConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static BlenderConfig 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 BlenderConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static BlenderConfig 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 BlenderConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static BlenderConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(BlenderConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 3. * </pre> * * Protobuf type {@code delivery.BlenderConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.BlenderConfig) BlenderConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_BlenderConfig_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_BlenderConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( BlenderConfig.class, Builder.class); } // Construct using ai.promoted.proto.delivery.BlenderConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getBlenderRuleFieldBuilder(); } } @Override public Builder clear() { super.clear(); if (blenderRuleBuilder_ == null) { blenderRule_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { blenderRuleBuilder_.clear(); } if (qualityScoreConfigBuilder_ == null) { qualityScoreConfig_ = null; } else { qualityScoreConfig_ = null; qualityScoreConfigBuilder_ = null; } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_BlenderConfig_descriptor; } @Override public BlenderConfig getDefaultInstanceForType() { return BlenderConfig.getDefaultInstance(); } @Override public BlenderConfig build() { BlenderConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public BlenderConfig buildPartial() { BlenderConfig result = new BlenderConfig(this); int from_bitField0_ = bitField0_; if (blenderRuleBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { blenderRule_ = java.util.Collections.unmodifiableList(blenderRule_); bitField0_ = (bitField0_ & ~0x00000001); } result.blenderRule_ = blenderRule_; } else { result.blenderRule_ = blenderRuleBuilder_.build(); } if (qualityScoreConfigBuilder_ == null) { result.qualityScoreConfig_ = qualityScoreConfig_; } else { result.qualityScoreConfig_ = qualityScoreConfigBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof BlenderConfig) { return mergeFrom((BlenderConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(BlenderConfig other) { if (other == BlenderConfig.getDefaultInstance()) return this; if (blenderRuleBuilder_ == null) { if (!other.blenderRule_.isEmpty()) { if (blenderRule_.isEmpty()) { blenderRule_ = other.blenderRule_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureBlenderRuleIsMutable(); blenderRule_.addAll(other.blenderRule_); } onChanged(); } } else { if (!other.blenderRule_.isEmpty()) { if (blenderRuleBuilder_.isEmpty()) { blenderRuleBuilder_.dispose(); blenderRuleBuilder_ = null; blenderRule_ = other.blenderRule_; bitField0_ = (bitField0_ & ~0x00000001); blenderRuleBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getBlenderRuleFieldBuilder() : null; } else { blenderRuleBuilder_.addAllMessages(other.blenderRule_); } } } if (other.hasQualityScoreConfig()) { mergeQualityScoreConfig(other.getQualityScoreConfig()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { BlenderConfig parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (BlenderConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<BlenderRule> blenderRule_ = java.util.Collections.emptyList(); private void ensureBlenderRuleIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { blenderRule_ = new java.util.ArrayList<BlenderRule>(blenderRule_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< BlenderRule, BlenderRule.Builder, BlenderRuleOrBuilder> blenderRuleBuilder_; /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public java.util.List<BlenderRule> getBlenderRuleList() { if (blenderRuleBuilder_ == null) { return java.util.Collections.unmodifiableList(blenderRule_); } else { return blenderRuleBuilder_.getMessageList(); } } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public int getBlenderRuleCount() { if (blenderRuleBuilder_ == null) { return blenderRule_.size(); } else { return blenderRuleBuilder_.getCount(); } } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public BlenderRule getBlenderRule(int index) { if (blenderRuleBuilder_ == null) { return blenderRule_.get(index); } else { return blenderRuleBuilder_.getMessage(index); } } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder setBlenderRule( int index, BlenderRule value) { if (blenderRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBlenderRuleIsMutable(); blenderRule_.set(index, value); onChanged(); } else { blenderRuleBuilder_.setMessage(index, value); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder setBlenderRule( int index, BlenderRule.Builder builderForValue) { if (blenderRuleBuilder_ == null) { ensureBlenderRuleIsMutable(); blenderRule_.set(index, builderForValue.build()); onChanged(); } else { blenderRuleBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder addBlenderRule(BlenderRule value) { if (blenderRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBlenderRuleIsMutable(); blenderRule_.add(value); onChanged(); } else { blenderRuleBuilder_.addMessage(value); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder addBlenderRule( int index, BlenderRule value) { if (blenderRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBlenderRuleIsMutable(); blenderRule_.add(index, value); onChanged(); } else { blenderRuleBuilder_.addMessage(index, value); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder addBlenderRule( BlenderRule.Builder builderForValue) { if (blenderRuleBuilder_ == null) { ensureBlenderRuleIsMutable(); blenderRule_.add(builderForValue.build()); onChanged(); } else { blenderRuleBuilder_.addMessage(builderForValue.build()); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder addBlenderRule( int index, BlenderRule.Builder builderForValue) { if (blenderRuleBuilder_ == null) { ensureBlenderRuleIsMutable(); blenderRule_.add(index, builderForValue.build()); onChanged(); } else { blenderRuleBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder addAllBlenderRule( Iterable<? extends BlenderRule> values) { if (blenderRuleBuilder_ == null) { ensureBlenderRuleIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, blenderRule_); onChanged(); } else { blenderRuleBuilder_.addAllMessages(values); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder clearBlenderRule() { if (blenderRuleBuilder_ == null) { blenderRule_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { blenderRuleBuilder_.clear(); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public Builder removeBlenderRule(int index) { if (blenderRuleBuilder_ == null) { ensureBlenderRuleIsMutable(); blenderRule_.remove(index); onChanged(); } else { blenderRuleBuilder_.remove(index); } return this; } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public BlenderRule.Builder getBlenderRuleBuilder( int index) { return getBlenderRuleFieldBuilder().getBuilder(index); } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public BlenderRuleOrBuilder getBlenderRuleOrBuilder( int index) { if (blenderRuleBuilder_ == null) { return blenderRule_.get(index); } else { return blenderRuleBuilder_.getMessageOrBuilder(index); } } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public java.util.List<? extends BlenderRuleOrBuilder> getBlenderRuleOrBuilderList() { if (blenderRuleBuilder_ != null) { return blenderRuleBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(blenderRule_); } } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public BlenderRule.Builder addBlenderRuleBuilder() { return getBlenderRuleFieldBuilder().addBuilder( BlenderRule.getDefaultInstance()); } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public BlenderRule.Builder addBlenderRuleBuilder( int index) { return getBlenderRuleFieldBuilder().addBuilder( index, BlenderRule.getDefaultInstance()); } /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ public java.util.List<BlenderRule.Builder> getBlenderRuleBuilderList() { return getBlenderRuleFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< BlenderRule, BlenderRule.Builder, BlenderRuleOrBuilder> getBlenderRuleFieldBuilder() { if (blenderRuleBuilder_ == null) { blenderRuleBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< BlenderRule, BlenderRule.Builder, BlenderRuleOrBuilder>( blenderRule_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); blenderRule_ = null; } return blenderRuleBuilder_; } private QualityScoreConfig qualityScoreConfig_; private com.google.protobuf.SingleFieldBuilderV3< QualityScoreConfig, QualityScoreConfig.Builder, QualityScoreConfigOrBuilder> qualityScoreConfigBuilder_; /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> * @return Whether the qualityScoreConfig field is set. */ public boolean hasQualityScoreConfig() { return qualityScoreConfigBuilder_ != null || qualityScoreConfig_ != null; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> * @return The qualityScoreConfig. */ public QualityScoreConfig getQualityScoreConfig() { if (qualityScoreConfigBuilder_ == null) { return qualityScoreConfig_ == null ? QualityScoreConfig.getDefaultInstance() : qualityScoreConfig_; } else { return qualityScoreConfigBuilder_.getMessage(); } } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ public Builder setQualityScoreConfig(QualityScoreConfig value) { if (qualityScoreConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } qualityScoreConfig_ = value; onChanged(); } else { qualityScoreConfigBuilder_.setMessage(value); } return this; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ public Builder setQualityScoreConfig( QualityScoreConfig.Builder builderForValue) { if (qualityScoreConfigBuilder_ == null) { qualityScoreConfig_ = builderForValue.build(); onChanged(); } else { qualityScoreConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ public Builder mergeQualityScoreConfig(QualityScoreConfig value) { if (qualityScoreConfigBuilder_ == null) { if (qualityScoreConfig_ != null) { qualityScoreConfig_ = QualityScoreConfig.newBuilder(qualityScoreConfig_).mergeFrom(value).buildPartial(); } else { qualityScoreConfig_ = value; } onChanged(); } else { qualityScoreConfigBuilder_.mergeFrom(value); } return this; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ public Builder clearQualityScoreConfig() { if (qualityScoreConfigBuilder_ == null) { qualityScoreConfig_ = null; onChanged(); } else { qualityScoreConfig_ = null; qualityScoreConfigBuilder_ = null; } return this; } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ public QualityScoreConfig.Builder getQualityScoreConfigBuilder() { onChanged(); return getQualityScoreConfigFieldBuilder().getBuilder(); } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ public QualityScoreConfigOrBuilder getQualityScoreConfigOrBuilder() { if (qualityScoreConfigBuilder_ != null) { return qualityScoreConfigBuilder_.getMessageOrBuilder(); } else { return qualityScoreConfig_ == null ? QualityScoreConfig.getDefaultInstance() : qualityScoreConfig_; } } /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< QualityScoreConfig, QualityScoreConfig.Builder, QualityScoreConfigOrBuilder> getQualityScoreConfigFieldBuilder() { if (qualityScoreConfigBuilder_ == null) { qualityScoreConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< QualityScoreConfig, QualityScoreConfig.Builder, QualityScoreConfigOrBuilder>( getQualityScoreConfig(), getParentForChildren(), isClean()); qualityScoreConfig_ = null; } return qualityScoreConfigBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.BlenderConfig) } // @@protoc_insertion_point(class_scope:delivery.BlenderConfig) private static final BlenderConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new BlenderConfig(); } public static BlenderConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<BlenderConfig> PARSER = new com.google.protobuf.AbstractParser<BlenderConfig>() { @Override public BlenderConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BlenderConfig(input, extensionRegistry); } }; public static com.google.protobuf.Parser<BlenderConfig> parser() { return PARSER; } @Override public com.google.protobuf.Parser<BlenderConfig> getParserForType() { return PARSER; } @Override public BlenderConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/BlenderConfigOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface BlenderConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.BlenderConfig) com.google.protobuf.MessageOrBuilder { /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ java.util.List<BlenderRule> getBlenderRuleList(); /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ BlenderRule getBlenderRule(int index); /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ int getBlenderRuleCount(); /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ java.util.List<? extends BlenderRuleOrBuilder> getBlenderRuleOrBuilderList(); /** * <pre> * List of blender rules. * </pre> * * <code>repeated .delivery.BlenderRule blender_rule = 1;</code> */ BlenderRuleOrBuilder getBlenderRuleOrBuilder( int index); /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> * @return Whether the qualityScoreConfig field is set. */ boolean hasQualityScoreConfig(); /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> * @return The qualityScoreConfig. */ QualityScoreConfig getQualityScoreConfig(); /** * <code>.delivery.QualityScoreConfig quality_score_config = 2;</code> */ QualityScoreConfigOrBuilder getQualityScoreConfigOrBuilder(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/BlenderRule.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * See: https://github.com/promotedai/blender for README * Next ID = 11. * </pre> * * Protobuf type {@code delivery.BlenderRule} */ public final class BlenderRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.BlenderRule) BlenderRuleOrBuilder { private static final long serialVersionUID = 0L; // Use BlenderRule.newBuilder() to construct. private BlenderRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private BlenderRule() { attributeName_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new BlenderRule(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BlenderRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); attributeName_ = s; break; } case 50: { PositiveRule.Builder subBuilder = null; if (ruleCase_ == 6) { subBuilder = ((PositiveRule) rule_).toBuilder(); } rule_ = input.readMessage(PositiveRule.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((PositiveRule) rule_); rule_ = subBuilder.buildPartial(); } ruleCase_ = 6; break; } case 58: { InsertRule.Builder subBuilder = null; if (ruleCase_ == 7) { subBuilder = ((InsertRule) rule_).toBuilder(); } rule_ = input.readMessage(InsertRule.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((InsertRule) rule_); rule_ = subBuilder.buildPartial(); } ruleCase_ = 7; break; } case 66: { NegativeRule.Builder subBuilder = null; if (ruleCase_ == 8) { subBuilder = ((NegativeRule) rule_).toBuilder(); } rule_ = input.readMessage(NegativeRule.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((NegativeRule) rule_); rule_ = subBuilder.buildPartial(); } ruleCase_ = 8; break; } case 74: { DiversityRule.Builder subBuilder = null; if (ruleCase_ == 9) { subBuilder = ((DiversityRule) rule_).toBuilder(); } rule_ = input.readMessage(DiversityRule.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((DiversityRule) rule_); rule_ = subBuilder.buildPartial(); } ruleCase_ = 9; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_BlenderRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_BlenderRule_fieldAccessorTable .ensureFieldAccessorsInitialized( BlenderRule.class, Builder.class); } private int ruleCase_ = 0; private Object rule_; public enum RuleCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { POSITIVE_RULE(6), INSERT_RULE(7), NEGATIVE_RULE(8), DIVERSITY_RULE(9), RULE_NOT_SET(0); private final int value; private RuleCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static RuleCase valueOf(int value) { return forNumber(value); } public static RuleCase forNumber(int value) { switch (value) { case 6: return POSITIVE_RULE; case 7: return INSERT_RULE; case 8: return NEGATIVE_RULE; case 9: return DIVERSITY_RULE; case 0: return RULE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public RuleCase getRuleCase() { return RuleCase.forNumber( ruleCase_); } public static final int ATTRIBUTE_NAME_FIELD_NUMBER = 1; private volatile Object attributeName_; /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return The attributeName. */ @Override public String getAttributeName() { Object ref = attributeName_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); attributeName_ = s; return s; } } /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return The bytes for attributeName. */ @Override public com.google.protobuf.ByteString getAttributeNameBytes() { Object ref = attributeName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); attributeName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int POSITIVE_RULE_FIELD_NUMBER = 6; /** * <code>.delivery.PositiveRule positive_rule = 6;</code> * @return Whether the positiveRule field is set. */ @Override public boolean hasPositiveRule() { return ruleCase_ == 6; } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> * @return The positiveRule. */ @Override public PositiveRule getPositiveRule() { if (ruleCase_ == 6) { return (PositiveRule) rule_; } return PositiveRule.getDefaultInstance(); } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ @Override public PositiveRuleOrBuilder getPositiveRuleOrBuilder() { if (ruleCase_ == 6) { return (PositiveRule) rule_; } return PositiveRule.getDefaultInstance(); } public static final int INSERT_RULE_FIELD_NUMBER = 7; /** * <code>.delivery.InsertRule insert_rule = 7;</code> * @return Whether the insertRule field is set. */ @Override public boolean hasInsertRule() { return ruleCase_ == 7; } /** * <code>.delivery.InsertRule insert_rule = 7;</code> * @return The insertRule. */ @Override public InsertRule getInsertRule() { if (ruleCase_ == 7) { return (InsertRule) rule_; } return InsertRule.getDefaultInstance(); } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ @Override public InsertRuleOrBuilder getInsertRuleOrBuilder() { if (ruleCase_ == 7) { return (InsertRule) rule_; } return InsertRule.getDefaultInstance(); } public static final int NEGATIVE_RULE_FIELD_NUMBER = 8; /** * <code>.delivery.NegativeRule negative_rule = 8;</code> * @return Whether the negativeRule field is set. */ @Override public boolean hasNegativeRule() { return ruleCase_ == 8; } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> * @return The negativeRule. */ @Override public NegativeRule getNegativeRule() { if (ruleCase_ == 8) { return (NegativeRule) rule_; } return NegativeRule.getDefaultInstance(); } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ @Override public NegativeRuleOrBuilder getNegativeRuleOrBuilder() { if (ruleCase_ == 8) { return (NegativeRule) rule_; } return NegativeRule.getDefaultInstance(); } public static final int DIVERSITY_RULE_FIELD_NUMBER = 9; /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> * @return Whether the diversityRule field is set. */ @Override public boolean hasDiversityRule() { return ruleCase_ == 9; } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> * @return The diversityRule. */ @Override public DiversityRule getDiversityRule() { if (ruleCase_ == 9) { return (DiversityRule) rule_; } return DiversityRule.getDefaultInstance(); } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ @Override public DiversityRuleOrBuilder getDiversityRuleOrBuilder() { if (ruleCase_ == 9) { return (DiversityRule) rule_; } return DiversityRule.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getAttributeNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeName_); } if (ruleCase_ == 6) { output.writeMessage(6, (PositiveRule) rule_); } if (ruleCase_ == 7) { output.writeMessage(7, (InsertRule) rule_); } if (ruleCase_ == 8) { output.writeMessage(8, (NegativeRule) rule_); } if (ruleCase_ == 9) { output.writeMessage(9, (DiversityRule) rule_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getAttributeNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeName_); } if (ruleCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (PositiveRule) rule_); } if (ruleCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, (InsertRule) rule_); } if (ruleCase_ == 8) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, (NegativeRule) rule_); } if (ruleCase_ == 9) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, (DiversityRule) rule_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlenderRule)) { return super.equals(obj); } BlenderRule other = (BlenderRule) obj; if (!getAttributeName() .equals(other.getAttributeName())) return false; if (!getRuleCase().equals(other.getRuleCase())) return false; switch (ruleCase_) { case 6: if (!getPositiveRule() .equals(other.getPositiveRule())) return false; break; case 7: if (!getInsertRule() .equals(other.getInsertRule())) return false; break; case 8: if (!getNegativeRule() .equals(other.getNegativeRule())) return false; break; case 9: if (!getDiversityRule() .equals(other.getDiversityRule())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ATTRIBUTE_NAME_FIELD_NUMBER; hash = (53 * hash) + getAttributeName().hashCode(); switch (ruleCase_) { case 6: hash = (37 * hash) + POSITIVE_RULE_FIELD_NUMBER; hash = (53 * hash) + getPositiveRule().hashCode(); break; case 7: hash = (37 * hash) + INSERT_RULE_FIELD_NUMBER; hash = (53 * hash) + getInsertRule().hashCode(); break; case 8: hash = (37 * hash) + NEGATIVE_RULE_FIELD_NUMBER; hash = (53 * hash) + getNegativeRule().hashCode(); break; case 9: hash = (37 * hash) + DIVERSITY_RULE_FIELD_NUMBER; hash = (53 * hash) + getDiversityRule().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static BlenderRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BlenderRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BlenderRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BlenderRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BlenderRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BlenderRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BlenderRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static BlenderRule 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 BlenderRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static BlenderRule 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 BlenderRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static BlenderRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(BlenderRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * See: https://github.com/promotedai/blender for README * Next ID = 11. * </pre> * * Protobuf type {@code delivery.BlenderRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.BlenderRule) BlenderRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_BlenderRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_BlenderRule_fieldAccessorTable .ensureFieldAccessorsInitialized( BlenderRule.class, Builder.class); } // Construct using ai.promoted.proto.delivery.BlenderRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); attributeName_ = ""; ruleCase_ = 0; rule_ = null; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_BlenderRule_descriptor; } @Override public BlenderRule getDefaultInstanceForType() { return BlenderRule.getDefaultInstance(); } @Override public BlenderRule build() { BlenderRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public BlenderRule buildPartial() { BlenderRule result = new BlenderRule(this); result.attributeName_ = attributeName_; if (ruleCase_ == 6) { if (positiveRuleBuilder_ == null) { result.rule_ = rule_; } else { result.rule_ = positiveRuleBuilder_.build(); } } if (ruleCase_ == 7) { if (insertRuleBuilder_ == null) { result.rule_ = rule_; } else { result.rule_ = insertRuleBuilder_.build(); } } if (ruleCase_ == 8) { if (negativeRuleBuilder_ == null) { result.rule_ = rule_; } else { result.rule_ = negativeRuleBuilder_.build(); } } if (ruleCase_ == 9) { if (diversityRuleBuilder_ == null) { result.rule_ = rule_; } else { result.rule_ = diversityRuleBuilder_.build(); } } result.ruleCase_ = ruleCase_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof BlenderRule) { return mergeFrom((BlenderRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(BlenderRule other) { if (other == BlenderRule.getDefaultInstance()) return this; if (!other.getAttributeName().isEmpty()) { attributeName_ = other.attributeName_; onChanged(); } switch (other.getRuleCase()) { case POSITIVE_RULE: { mergePositiveRule(other.getPositiveRule()); break; } case INSERT_RULE: { mergeInsertRule(other.getInsertRule()); break; } case NEGATIVE_RULE: { mergeNegativeRule(other.getNegativeRule()); break; } case DIVERSITY_RULE: { mergeDiversityRule(other.getDiversityRule()); break; } case RULE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { BlenderRule parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (BlenderRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int ruleCase_ = 0; private Object rule_; public RuleCase getRuleCase() { return RuleCase.forNumber( ruleCase_); } public Builder clearRule() { ruleCase_ = 0; rule_ = null; onChanged(); return this; } private Object attributeName_ = ""; /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return The attributeName. */ public String getAttributeName() { Object ref = attributeName_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); attributeName_ = s; return s; } else { return (String) ref; } } /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return The bytes for attributeName. */ public com.google.protobuf.ByteString getAttributeNameBytes() { Object ref = attributeName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); attributeName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @param value The attributeName to set. * @return This builder for chaining. */ public Builder setAttributeName( String value) { if (value == null) { throw new NullPointerException(); } attributeName_ = value; onChanged(); return this; } /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return This builder for chaining. */ public Builder clearAttributeName() { attributeName_ = getDefaultInstance().getAttributeName(); onChanged(); return this; } /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @param value The bytes for attributeName to set. * @return This builder for chaining. */ public Builder setAttributeNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); attributeName_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< PositiveRule, PositiveRule.Builder, PositiveRuleOrBuilder> positiveRuleBuilder_; /** * <code>.delivery.PositiveRule positive_rule = 6;</code> * @return Whether the positiveRule field is set. */ @Override public boolean hasPositiveRule() { return ruleCase_ == 6; } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> * @return The positiveRule. */ @Override public PositiveRule getPositiveRule() { if (positiveRuleBuilder_ == null) { if (ruleCase_ == 6) { return (PositiveRule) rule_; } return PositiveRule.getDefaultInstance(); } else { if (ruleCase_ == 6) { return positiveRuleBuilder_.getMessage(); } return PositiveRule.getDefaultInstance(); } } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ public Builder setPositiveRule(PositiveRule value) { if (positiveRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } rule_ = value; onChanged(); } else { positiveRuleBuilder_.setMessage(value); } ruleCase_ = 6; return this; } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ public Builder setPositiveRule( PositiveRule.Builder builderForValue) { if (positiveRuleBuilder_ == null) { rule_ = builderForValue.build(); onChanged(); } else { positiveRuleBuilder_.setMessage(builderForValue.build()); } ruleCase_ = 6; return this; } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ public Builder mergePositiveRule(PositiveRule value) { if (positiveRuleBuilder_ == null) { if (ruleCase_ == 6 && rule_ != PositiveRule.getDefaultInstance()) { rule_ = PositiveRule.newBuilder((PositiveRule) rule_) .mergeFrom(value).buildPartial(); } else { rule_ = value; } onChanged(); } else { if (ruleCase_ == 6) { positiveRuleBuilder_.mergeFrom(value); } positiveRuleBuilder_.setMessage(value); } ruleCase_ = 6; return this; } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ public Builder clearPositiveRule() { if (positiveRuleBuilder_ == null) { if (ruleCase_ == 6) { ruleCase_ = 0; rule_ = null; onChanged(); } } else { if (ruleCase_ == 6) { ruleCase_ = 0; rule_ = null; } positiveRuleBuilder_.clear(); } return this; } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ public PositiveRule.Builder getPositiveRuleBuilder() { return getPositiveRuleFieldBuilder().getBuilder(); } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ @Override public PositiveRuleOrBuilder getPositiveRuleOrBuilder() { if ((ruleCase_ == 6) && (positiveRuleBuilder_ != null)) { return positiveRuleBuilder_.getMessageOrBuilder(); } else { if (ruleCase_ == 6) { return (PositiveRule) rule_; } return PositiveRule.getDefaultInstance(); } } /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ private com.google.protobuf.SingleFieldBuilderV3< PositiveRule, PositiveRule.Builder, PositiveRuleOrBuilder> getPositiveRuleFieldBuilder() { if (positiveRuleBuilder_ == null) { if (!(ruleCase_ == 6)) { rule_ = PositiveRule.getDefaultInstance(); } positiveRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< PositiveRule, PositiveRule.Builder, PositiveRuleOrBuilder>( (PositiveRule) rule_, getParentForChildren(), isClean()); rule_ = null; } ruleCase_ = 6; onChanged();; return positiveRuleBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< InsertRule, InsertRule.Builder, InsertRuleOrBuilder> insertRuleBuilder_; /** * <code>.delivery.InsertRule insert_rule = 7;</code> * @return Whether the insertRule field is set. */ @Override public boolean hasInsertRule() { return ruleCase_ == 7; } /** * <code>.delivery.InsertRule insert_rule = 7;</code> * @return The insertRule. */ @Override public InsertRule getInsertRule() { if (insertRuleBuilder_ == null) { if (ruleCase_ == 7) { return (InsertRule) rule_; } return InsertRule.getDefaultInstance(); } else { if (ruleCase_ == 7) { return insertRuleBuilder_.getMessage(); } return InsertRule.getDefaultInstance(); } } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ public Builder setInsertRule(InsertRule value) { if (insertRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } rule_ = value; onChanged(); } else { insertRuleBuilder_.setMessage(value); } ruleCase_ = 7; return this; } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ public Builder setInsertRule( InsertRule.Builder builderForValue) { if (insertRuleBuilder_ == null) { rule_ = builderForValue.build(); onChanged(); } else { insertRuleBuilder_.setMessage(builderForValue.build()); } ruleCase_ = 7; return this; } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ public Builder mergeInsertRule(InsertRule value) { if (insertRuleBuilder_ == null) { if (ruleCase_ == 7 && rule_ != InsertRule.getDefaultInstance()) { rule_ = InsertRule.newBuilder((InsertRule) rule_) .mergeFrom(value).buildPartial(); } else { rule_ = value; } onChanged(); } else { if (ruleCase_ == 7) { insertRuleBuilder_.mergeFrom(value); } insertRuleBuilder_.setMessage(value); } ruleCase_ = 7; return this; } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ public Builder clearInsertRule() { if (insertRuleBuilder_ == null) { if (ruleCase_ == 7) { ruleCase_ = 0; rule_ = null; onChanged(); } } else { if (ruleCase_ == 7) { ruleCase_ = 0; rule_ = null; } insertRuleBuilder_.clear(); } return this; } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ public InsertRule.Builder getInsertRuleBuilder() { return getInsertRuleFieldBuilder().getBuilder(); } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ @Override public InsertRuleOrBuilder getInsertRuleOrBuilder() { if ((ruleCase_ == 7) && (insertRuleBuilder_ != null)) { return insertRuleBuilder_.getMessageOrBuilder(); } else { if (ruleCase_ == 7) { return (InsertRule) rule_; } return InsertRule.getDefaultInstance(); } } /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ private com.google.protobuf.SingleFieldBuilderV3< InsertRule, InsertRule.Builder, InsertRuleOrBuilder> getInsertRuleFieldBuilder() { if (insertRuleBuilder_ == null) { if (!(ruleCase_ == 7)) { rule_ = InsertRule.getDefaultInstance(); } insertRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< InsertRule, InsertRule.Builder, InsertRuleOrBuilder>( (InsertRule) rule_, getParentForChildren(), isClean()); rule_ = null; } ruleCase_ = 7; onChanged();; return insertRuleBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< NegativeRule, NegativeRule.Builder, NegativeRuleOrBuilder> negativeRuleBuilder_; /** * <code>.delivery.NegativeRule negative_rule = 8;</code> * @return Whether the negativeRule field is set. */ @Override public boolean hasNegativeRule() { return ruleCase_ == 8; } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> * @return The negativeRule. */ @Override public NegativeRule getNegativeRule() { if (negativeRuleBuilder_ == null) { if (ruleCase_ == 8) { return (NegativeRule) rule_; } return NegativeRule.getDefaultInstance(); } else { if (ruleCase_ == 8) { return negativeRuleBuilder_.getMessage(); } return NegativeRule.getDefaultInstance(); } } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ public Builder setNegativeRule(NegativeRule value) { if (negativeRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } rule_ = value; onChanged(); } else { negativeRuleBuilder_.setMessage(value); } ruleCase_ = 8; return this; } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ public Builder setNegativeRule( NegativeRule.Builder builderForValue) { if (negativeRuleBuilder_ == null) { rule_ = builderForValue.build(); onChanged(); } else { negativeRuleBuilder_.setMessage(builderForValue.build()); } ruleCase_ = 8; return this; } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ public Builder mergeNegativeRule(NegativeRule value) { if (negativeRuleBuilder_ == null) { if (ruleCase_ == 8 && rule_ != NegativeRule.getDefaultInstance()) { rule_ = NegativeRule.newBuilder((NegativeRule) rule_) .mergeFrom(value).buildPartial(); } else { rule_ = value; } onChanged(); } else { if (ruleCase_ == 8) { negativeRuleBuilder_.mergeFrom(value); } negativeRuleBuilder_.setMessage(value); } ruleCase_ = 8; return this; } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ public Builder clearNegativeRule() { if (negativeRuleBuilder_ == null) { if (ruleCase_ == 8) { ruleCase_ = 0; rule_ = null; onChanged(); } } else { if (ruleCase_ == 8) { ruleCase_ = 0; rule_ = null; } negativeRuleBuilder_.clear(); } return this; } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ public NegativeRule.Builder getNegativeRuleBuilder() { return getNegativeRuleFieldBuilder().getBuilder(); } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ @Override public NegativeRuleOrBuilder getNegativeRuleOrBuilder() { if ((ruleCase_ == 8) && (negativeRuleBuilder_ != null)) { return negativeRuleBuilder_.getMessageOrBuilder(); } else { if (ruleCase_ == 8) { return (NegativeRule) rule_; } return NegativeRule.getDefaultInstance(); } } /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ private com.google.protobuf.SingleFieldBuilderV3< NegativeRule, NegativeRule.Builder, NegativeRuleOrBuilder> getNegativeRuleFieldBuilder() { if (negativeRuleBuilder_ == null) { if (!(ruleCase_ == 8)) { rule_ = NegativeRule.getDefaultInstance(); } negativeRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< NegativeRule, NegativeRule.Builder, NegativeRuleOrBuilder>( (NegativeRule) rule_, getParentForChildren(), isClean()); rule_ = null; } ruleCase_ = 8; onChanged();; return negativeRuleBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< DiversityRule, DiversityRule.Builder, DiversityRuleOrBuilder> diversityRuleBuilder_; /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> * @return Whether the diversityRule field is set. */ @Override public boolean hasDiversityRule() { return ruleCase_ == 9; } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> * @return The diversityRule. */ @Override public DiversityRule getDiversityRule() { if (diversityRuleBuilder_ == null) { if (ruleCase_ == 9) { return (DiversityRule) rule_; } return DiversityRule.getDefaultInstance(); } else { if (ruleCase_ == 9) { return diversityRuleBuilder_.getMessage(); } return DiversityRule.getDefaultInstance(); } } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ public Builder setDiversityRule(DiversityRule value) { if (diversityRuleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } rule_ = value; onChanged(); } else { diversityRuleBuilder_.setMessage(value); } ruleCase_ = 9; return this; } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ public Builder setDiversityRule( DiversityRule.Builder builderForValue) { if (diversityRuleBuilder_ == null) { rule_ = builderForValue.build(); onChanged(); } else { diversityRuleBuilder_.setMessage(builderForValue.build()); } ruleCase_ = 9; return this; } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ public Builder mergeDiversityRule(DiversityRule value) { if (diversityRuleBuilder_ == null) { if (ruleCase_ == 9 && rule_ != DiversityRule.getDefaultInstance()) { rule_ = DiversityRule.newBuilder((DiversityRule) rule_) .mergeFrom(value).buildPartial(); } else { rule_ = value; } onChanged(); } else { if (ruleCase_ == 9) { diversityRuleBuilder_.mergeFrom(value); } diversityRuleBuilder_.setMessage(value); } ruleCase_ = 9; return this; } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ public Builder clearDiversityRule() { if (diversityRuleBuilder_ == null) { if (ruleCase_ == 9) { ruleCase_ = 0; rule_ = null; onChanged(); } } else { if (ruleCase_ == 9) { ruleCase_ = 0; rule_ = null; } diversityRuleBuilder_.clear(); } return this; } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ public DiversityRule.Builder getDiversityRuleBuilder() { return getDiversityRuleFieldBuilder().getBuilder(); } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ @Override public DiversityRuleOrBuilder getDiversityRuleOrBuilder() { if ((ruleCase_ == 9) && (diversityRuleBuilder_ != null)) { return diversityRuleBuilder_.getMessageOrBuilder(); } else { if (ruleCase_ == 9) { return (DiversityRule) rule_; } return DiversityRule.getDefaultInstance(); } } /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ private com.google.protobuf.SingleFieldBuilderV3< DiversityRule, DiversityRule.Builder, DiversityRuleOrBuilder> getDiversityRuleFieldBuilder() { if (diversityRuleBuilder_ == null) { if (!(ruleCase_ == 9)) { rule_ = DiversityRule.getDefaultInstance(); } diversityRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< DiversityRule, DiversityRule.Builder, DiversityRuleOrBuilder>( (DiversityRule) rule_, getParentForChildren(), isClean()); rule_ = null; } ruleCase_ = 9; onChanged();; return diversityRuleBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.BlenderRule) } // @@protoc_insertion_point(class_scope:delivery.BlenderRule) private static final BlenderRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new BlenderRule(); } public static BlenderRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<BlenderRule> PARSER = new com.google.protobuf.AbstractParser<BlenderRule>() { @Override public BlenderRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BlenderRule(input, extensionRegistry); } }; public static com.google.protobuf.Parser<BlenderRule> parser() { return PARSER; } @Override public com.google.protobuf.Parser<BlenderRule> getParserForType() { return PARSER; } @Override public BlenderRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/BlenderRuleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface BlenderRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.BlenderRule) com.google.protobuf.MessageOrBuilder { /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return The attributeName. */ String getAttributeName(); /** * <pre> * The name of item attribute that this rule applies to. It may be a JSON key path. * </pre> * * <code>string attribute_name = 1;</code> * @return The bytes for attributeName. */ com.google.protobuf.ByteString getAttributeNameBytes(); /** * <code>.delivery.PositiveRule positive_rule = 6;</code> * @return Whether the positiveRule field is set. */ boolean hasPositiveRule(); /** * <code>.delivery.PositiveRule positive_rule = 6;</code> * @return The positiveRule. */ PositiveRule getPositiveRule(); /** * <code>.delivery.PositiveRule positive_rule = 6;</code> */ PositiveRuleOrBuilder getPositiveRuleOrBuilder(); /** * <code>.delivery.InsertRule insert_rule = 7;</code> * @return Whether the insertRule field is set. */ boolean hasInsertRule(); /** * <code>.delivery.InsertRule insert_rule = 7;</code> * @return The insertRule. */ InsertRule getInsertRule(); /** * <code>.delivery.InsertRule insert_rule = 7;</code> */ InsertRuleOrBuilder getInsertRuleOrBuilder(); /** * <code>.delivery.NegativeRule negative_rule = 8;</code> * @return Whether the negativeRule field is set. */ boolean hasNegativeRule(); /** * <code>.delivery.NegativeRule negative_rule = 8;</code> * @return The negativeRule. */ NegativeRule getNegativeRule(); /** * <code>.delivery.NegativeRule negative_rule = 8;</code> */ NegativeRuleOrBuilder getNegativeRuleOrBuilder(); /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> * @return Whether the diversityRule field is set. */ boolean hasDiversityRule(); /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> * @return The diversityRule. */ DiversityRule getDiversityRule(); /** * <code>.delivery.DiversityRule diversity_rule = 9;</code> */ DiversityRuleOrBuilder getDiversityRuleOrBuilder(); public BlenderRule.RuleCase getRuleCase(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/Delivery.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; public final class Delivery { private Delivery() {} 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_delivery_Request_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_Request_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_Paging_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_Paging_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_Response_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_Response_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_PagingInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_PagingInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_delivery_Insertion_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_delivery_Insertion_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { String[] descriptorData = { "\n\035proto/delivery/delivery.proto\022\010deliver" + "y\032\034google/protobuf/struct.proto\032\031proto/c" + "ommon/common.proto\032\034proto/delivery/blend" + "er.proto\"\352\003\n\007Request\022\023\n\013platform_id\030\001 \001(" + "\004\022#\n\tuser_info\030\002 \001(\0132\020.common.UserInfo\022\036" + "\n\006timing\030\003 \001(\0132\016.common.Timing\022\'\n\013client" + "_info\030\004 \001(\0132\022.common.ClientInfo\022\036\n\006devic" + "e\030\022 \001(\0132\016.common.Device\022\022\n\nrequest_id\030\006 " + "\001(\t\022\017\n\007view_id\030\007 \001(\t\022\022\n\nsession_id\030\010 \001(\t" + "\022\031\n\021client_request_id\030\016 \001(\t\022#\n\010use_case\030" + "\t \001(\0162\021.delivery.UseCase\022\024\n\014search_query" + "\030\n \001(\t\022 \n\006paging\030\021 \001(\0132\020.delivery.Paging" + "\022&\n\tinsertion\030\013 \003(\0132\023.delivery.Insertion" + "\022/\n\016blender_config\030\014 \001(\0132\027.delivery.Blen" + "derConfig\022&\n\nproperties\030\r \001(\0132\022.common.P" + "ropertiesJ\004\010\005\020\006J\004\010\017\020\020\"Y\n\006Paging\022\021\n\tpagin" + "g_id\030\001 \001(\t\022\014\n\004size\030\002 \001(\005\022\020\n\006cursor\030\003 \001(\t" + "H\000\022\020\n\006offset\030\004 \001(\005H\000B\n\n\010starting\"c\n\010Resp" + "onse\022&\n\tinsertion\030\002 \003(\0132\023.delivery.Inser" + "tion\022)\n\013paging_info\030\003 \001(\0132\024.delivery.Pag" + "ingInfoJ\004\010\001\020\002\"/\n\nPagingInfo\022\021\n\tpaging_id" + "\030\001 \001(\t\022\016\n\006cursor\030\002 \001(\t\"\311\003\n\tInsertion\022\023\n\013" + "platform_id\030\001 \001(\004\022#\n\tuser_info\030\002 \001(\0132\020.c" + "ommon.UserInfo\022\036\n\006timing\030\003 \001(\0132\016.common." + "Timing\022\'\n\013client_info\030\004 \001(\0132\022.common.Cli" + "entInfo\022\024\n\014insertion_id\030\006 \001(\t\022\022\n\nrequest" + "_id\030\007 \001(\t\022\017\n\007view_id\030\t \001(\t\022\022\n\nsession_id" + "\030\010 \001(\t\022\022\n\ncontent_id\030\n \001(\t\022\025\n\010position\030\014" + " \001(\004H\000\210\001\001\022&\n\nproperties\030\r \001(\0132\022.common.P" + "roperties\022\033\n\016retrieval_rank\030\023 \001(\004H\001\210\001\001\022\034" + "\n\017retrieval_score\030\024 \001(\002H\002\210\001\001B\013\n\t_positio" + "nB\021\n\017_retrieval_rankB\022\n\020_retrieval_score" + "J\004\010\005\020\006J\004\010\013\020\014J\004\010\016\020\017J\004\010\017\020\020J\004\010\020\020\021J\004\010\021\020\022J\004\010\022" + "\020\023*\332\001\n\007UseCase\022\024\n\020UNKNOWN_USE_CASE\020\000\022\n\n\006" + "CUSTOM\020\001\022\n\n\006SEARCH\020\002\022\026\n\022SEARCH_SUGGESTIO" + "NS\020\003\022\010\n\004FEED\020\004\022\023\n\017RELATED_CONTENT\020\005\022\014\n\010C" + "LOSE_UP\020\006\022\024\n\020CATEGORY_CONTENT\020\007\022\016\n\nMY_CO" + "NTENT\020\010\022\024\n\020MY_SAVED_CONTENT\020\t\022\022\n\016SELLER_" + "CONTENT\020\n\022\014\n\010DISCOVER\020\013B(\n\032ai.promoted.p" + "roto.deliveryB\010DeliveryP\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.StructProto.getDescriptor(), ai.promoted.proto.common.CommonProto.getDescriptor(), ai.promoted.proto.delivery.Blender.getDescriptor(), }); internal_static_delivery_Request_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_delivery_Request_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_Request_descriptor, new String[] { "PlatformId", "UserInfo", "Timing", "ClientInfo", "Device", "RequestId", "ViewId", "SessionId", "ClientRequestId", "UseCase", "SearchQuery", "Paging", "Insertion", "BlenderConfig", "Properties", }); internal_static_delivery_Paging_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_delivery_Paging_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_Paging_descriptor, new String[] { "PagingId", "Size", "Cursor", "Offset", "Starting", }); internal_static_delivery_Response_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_delivery_Response_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_Response_descriptor, new String[] { "Insertion", "PagingInfo", }); internal_static_delivery_PagingInfo_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_delivery_PagingInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_PagingInfo_descriptor, new String[] { "PagingId", "Cursor", }); internal_static_delivery_Insertion_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_delivery_Insertion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_delivery_Insertion_descriptor, new String[] { "PlatformId", "UserInfo", "Timing", "ClientInfo", "InsertionId", "RequestId", "ViewId", "SessionId", "ContentId", "Position", "Properties", "RetrievalRank", "RetrievalScore", "Position", "RetrievalRank", "RetrievalScore", }); com.google.protobuf.StructProto.getDescriptor(); ai.promoted.proto.common.CommonProto.getDescriptor(); ai.promoted.proto.delivery.Blender.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/DiversityRule.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 2. * </pre> * * Protobuf type {@code delivery.DiversityRule} */ public final class DiversityRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.DiversityRule) DiversityRuleOrBuilder { private static final long serialVersionUID = 0L; // Use DiversityRule.newBuilder() to construct. private DiversityRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private DiversityRule() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new DiversityRule(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DiversityRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 9: { bitField0_ |= 0x00000001; multi_ = input.readDouble(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_DiversityRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_DiversityRule_fieldAccessorTable .ensureFieldAccessorsInitialized( DiversityRule.class, Builder.class); } private int bitField0_; public static final int MULTI_FIELD_NUMBER = 1; private double multi_; /** * <code>double multi = 1;</code> * @return Whether the multi field is set. */ @Override public boolean hasMulti() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double multi = 1;</code> * @return The multi. */ @Override public double getMulti() { return multi_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(1, multi_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, multi_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof DiversityRule)) { return super.equals(obj); } DiversityRule other = (DiversityRule) obj; if (hasMulti() != other.hasMulti()) return false; if (hasMulti()) { if (Double.doubleToLongBits(getMulti()) != Double.doubleToLongBits( other.getMulti())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasMulti()) { hash = (37 * hash) + MULTI_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getMulti())); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static DiversityRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static DiversityRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static DiversityRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static DiversityRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static DiversityRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static DiversityRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static DiversityRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static DiversityRule 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 DiversityRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static DiversityRule 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 DiversityRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static DiversityRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(DiversityRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 2. * </pre> * * Protobuf type {@code delivery.DiversityRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.DiversityRule) DiversityRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_DiversityRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_DiversityRule_fieldAccessorTable .ensureFieldAccessorsInitialized( DiversityRule.class, Builder.class); } // Construct using ai.promoted.proto.delivery.DiversityRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); multi_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_DiversityRule_descriptor; } @Override public DiversityRule getDefaultInstanceForType() { return DiversityRule.getDefaultInstance(); } @Override public DiversityRule build() { DiversityRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public DiversityRule buildPartial() { DiversityRule result = new DiversityRule(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.multi_ = multi_; to_bitField0_ |= 0x00000001; } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof DiversityRule) { return mergeFrom((DiversityRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(DiversityRule other) { if (other == DiversityRule.getDefaultInstance()) return this; if (other.hasMulti()) { setMulti(other.getMulti()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { DiversityRule parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (DiversityRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private double multi_ ; /** * <code>double multi = 1;</code> * @return Whether the multi field is set. */ @Override public boolean hasMulti() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double multi = 1;</code> * @return The multi. */ @Override public double getMulti() { return multi_; } /** * <code>double multi = 1;</code> * @param value The multi to set. * @return This builder for chaining. */ public Builder setMulti(double value) { bitField0_ |= 0x00000001; multi_ = value; onChanged(); return this; } /** * <code>double multi = 1;</code> * @return This builder for chaining. */ public Builder clearMulti() { bitField0_ = (bitField0_ & ~0x00000001); multi_ = 0D; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.DiversityRule) } // @@protoc_insertion_point(class_scope:delivery.DiversityRule) private static final DiversityRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new DiversityRule(); } public static DiversityRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<DiversityRule> PARSER = new com.google.protobuf.AbstractParser<DiversityRule>() { @Override public DiversityRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DiversityRule(input, extensionRegistry); } }; public static com.google.protobuf.Parser<DiversityRule> parser() { return PARSER; } @Override public com.google.protobuf.Parser<DiversityRule> getParserForType() { return PARSER; } @Override public DiversityRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/DiversityRuleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface DiversityRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.DiversityRule) com.google.protobuf.MessageOrBuilder { /** * <code>double multi = 1;</code> * @return Whether the multi field is set. */ boolean hasMulti(); /** * <code>double multi = 1;</code> * @return The multi. */ double getMulti(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/InsertRule.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code delivery.InsertRule} */ public final class InsertRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.InsertRule) InsertRuleOrBuilder { private static final long serialVersionUID = 0L; // Use InsertRule.newBuilder() to construct. private InsertRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private InsertRule() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new InsertRule(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private InsertRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 9: { bitField0_ |= 0x00000001; selectPct_ = input.readDouble(); break; } case 16: { bitField0_ |= 0x00000002; minPos_ = input.readUInt64(); break; } case 24: { bitField0_ |= 0x00000004; maxPos_ = input.readUInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_InsertRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_InsertRule_fieldAccessorTable .ensureFieldAccessorsInitialized( InsertRule.class, Builder.class); } private int bitField0_; public static final int SELECT_PCT_FIELD_NUMBER = 1; private double selectPct_; /** * <code>double select_pct = 1;</code> * @return Whether the selectPct field is set. */ @Override public boolean hasSelectPct() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double select_pct = 1;</code> * @return The selectPct. */ @Override public double getSelectPct() { return selectPct_; } public static final int MIN_POS_FIELD_NUMBER = 2; private long minPos_; /** * <code>uint64 min_pos = 2;</code> * @return Whether the minPos field is set. */ @Override public boolean hasMinPos() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>uint64 min_pos = 2;</code> * @return The minPos. */ @Override public long getMinPos() { return minPos_; } public static final int MAX_POS_FIELD_NUMBER = 3; private long maxPos_; /** * <code>uint64 max_pos = 3;</code> * @return Whether the maxPos field is set. */ @Override public boolean hasMaxPos() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>uint64 max_pos = 3;</code> * @return The maxPos. */ @Override public long getMaxPos() { return maxPos_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(1, selectPct_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(2, minPos_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeUInt64(3, maxPos_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, selectPct_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, minPos_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, maxPos_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof InsertRule)) { return super.equals(obj); } InsertRule other = (InsertRule) obj; if (hasSelectPct() != other.hasSelectPct()) return false; if (hasSelectPct()) { if (Double.doubleToLongBits(getSelectPct()) != Double.doubleToLongBits( other.getSelectPct())) return false; } if (hasMinPos() != other.hasMinPos()) return false; if (hasMinPos()) { if (getMinPos() != other.getMinPos()) return false; } if (hasMaxPos() != other.hasMaxPos()) return false; if (hasMaxPos()) { if (getMaxPos() != other.getMaxPos()) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSelectPct()) { hash = (37 * hash) + SELECT_PCT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getSelectPct())); } if (hasMinPos()) { hash = (37 * hash) + MIN_POS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinPos()); } if (hasMaxPos()) { hash = (37 * hash) + MAX_POS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxPos()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static InsertRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static InsertRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static InsertRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static InsertRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static InsertRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static InsertRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static InsertRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static InsertRule 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 InsertRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static InsertRule 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 InsertRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static InsertRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(InsertRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code delivery.InsertRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.InsertRule) InsertRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_InsertRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_InsertRule_fieldAccessorTable .ensureFieldAccessorsInitialized( InsertRule.class, Builder.class); } // Construct using ai.promoted.proto.delivery.InsertRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); selectPct_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); minPos_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); maxPos_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_InsertRule_descriptor; } @Override public InsertRule getDefaultInstanceForType() { return InsertRule.getDefaultInstance(); } @Override public InsertRule build() { InsertRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public InsertRule buildPartial() { InsertRule result = new InsertRule(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.selectPct_ = selectPct_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.minPos_ = minPos_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.maxPos_ = maxPos_; to_bitField0_ |= 0x00000004; } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof InsertRule) { return mergeFrom((InsertRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(InsertRule other) { if (other == InsertRule.getDefaultInstance()) return this; if (other.hasSelectPct()) { setSelectPct(other.getSelectPct()); } if (other.hasMinPos()) { setMinPos(other.getMinPos()); } if (other.hasMaxPos()) { setMaxPos(other.getMaxPos()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { InsertRule parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (InsertRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private double selectPct_ ; /** * <code>double select_pct = 1;</code> * @return Whether the selectPct field is set. */ @Override public boolean hasSelectPct() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double select_pct = 1;</code> * @return The selectPct. */ @Override public double getSelectPct() { return selectPct_; } /** * <code>double select_pct = 1;</code> * @param value The selectPct to set. * @return This builder for chaining. */ public Builder setSelectPct(double value) { bitField0_ |= 0x00000001; selectPct_ = value; onChanged(); return this; } /** * <code>double select_pct = 1;</code> * @return This builder for chaining. */ public Builder clearSelectPct() { bitField0_ = (bitField0_ & ~0x00000001); selectPct_ = 0D; onChanged(); return this; } private long minPos_ ; /** * <code>uint64 min_pos = 2;</code> * @return Whether the minPos field is set. */ @Override public boolean hasMinPos() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>uint64 min_pos = 2;</code> * @return The minPos. */ @Override public long getMinPos() { return minPos_; } /** * <code>uint64 min_pos = 2;</code> * @param value The minPos to set. * @return This builder for chaining. */ public Builder setMinPos(long value) { bitField0_ |= 0x00000002; minPos_ = value; onChanged(); return this; } /** * <code>uint64 min_pos = 2;</code> * @return This builder for chaining. */ public Builder clearMinPos() { bitField0_ = (bitField0_ & ~0x00000002); minPos_ = 0L; onChanged(); return this; } private long maxPos_ ; /** * <code>uint64 max_pos = 3;</code> * @return Whether the maxPos field is set. */ @Override public boolean hasMaxPos() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>uint64 max_pos = 3;</code> * @return The maxPos. */ @Override public long getMaxPos() { return maxPos_; } /** * <code>uint64 max_pos = 3;</code> * @param value The maxPos to set. * @return This builder for chaining. */ public Builder setMaxPos(long value) { bitField0_ |= 0x00000004; maxPos_ = value; onChanged(); return this; } /** * <code>uint64 max_pos = 3;</code> * @return This builder for chaining. */ public Builder clearMaxPos() { bitField0_ = (bitField0_ & ~0x00000004); maxPos_ = 0L; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.InsertRule) } // @@protoc_insertion_point(class_scope:delivery.InsertRule) private static final InsertRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new InsertRule(); } public static InsertRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<InsertRule> PARSER = new com.google.protobuf.AbstractParser<InsertRule>() { @Override public InsertRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new InsertRule(input, extensionRegistry); } }; public static com.google.protobuf.Parser<InsertRule> parser() { return PARSER; } @Override public com.google.protobuf.Parser<InsertRule> getParserForType() { return PARSER; } @Override public InsertRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/InsertRuleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface InsertRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.InsertRule) com.google.protobuf.MessageOrBuilder { /** * <code>double select_pct = 1;</code> * @return Whether the selectPct field is set. */ boolean hasSelectPct(); /** * <code>double select_pct = 1;</code> * @return The selectPct. */ double getSelectPct(); /** * <code>uint64 min_pos = 2;</code> * @return Whether the minPos field is set. */ boolean hasMinPos(); /** * <code>uint64 min_pos = 2;</code> * @return The minPos. */ long getMinPos(); /** * <code>uint64 max_pos = 3;</code> * @return Whether the maxPos field is set. */ boolean hasMaxPos(); /** * <code>uint64 max_pos = 3;</code> * @return The maxPos. */ long getMaxPos(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/Insertion.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; /** * <pre> * This Event represents a Content being served at a certain position regardless * of it was views by a user. Insertions are immutable. * Next ID = 21. * </pre> * * Protobuf type {@code delivery.Insertion} */ public final class Insertion extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.Insertion) InsertionOrBuilder { private static final long serialVersionUID = 0L; // Use Insertion.newBuilder() to construct. private Insertion(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Insertion() { insertionId_ = ""; requestId_ = ""; viewId_ = ""; sessionId_ = ""; contentId_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Insertion(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Insertion( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { platformId_ = input.readUInt64(); break; } case 18: { ai.promoted.proto.common.UserInfo.Builder subBuilder = null; if (userInfo_ != null) { subBuilder = userInfo_.toBuilder(); } userInfo_ = input.readMessage(ai.promoted.proto.common.UserInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(userInfo_); userInfo_ = subBuilder.buildPartial(); } break; } case 26: { ai.promoted.proto.common.Timing.Builder subBuilder = null; if (timing_ != null) { subBuilder = timing_.toBuilder(); } timing_ = input.readMessage(ai.promoted.proto.common.Timing.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(timing_); timing_ = subBuilder.buildPartial(); } break; } case 34: { ai.promoted.proto.common.ClientInfo.Builder subBuilder = null; if (clientInfo_ != null) { subBuilder = clientInfo_.toBuilder(); } clientInfo_ = input.readMessage(ai.promoted.proto.common.ClientInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(clientInfo_); clientInfo_ = subBuilder.buildPartial(); } break; } case 50: { String s = input.readStringRequireUtf8(); insertionId_ = s; break; } case 58: { String s = input.readStringRequireUtf8(); requestId_ = s; break; } case 66: { String s = input.readStringRequireUtf8(); sessionId_ = s; break; } case 74: { String s = input.readStringRequireUtf8(); viewId_ = s; break; } case 82: { String s = input.readStringRequireUtf8(); contentId_ = s; break; } case 96: { bitField0_ |= 0x00000001; position_ = input.readUInt64(); break; } case 106: { ai.promoted.proto.common.Properties.Builder subBuilder = null; if (properties_ != null) { subBuilder = properties_.toBuilder(); } properties_ = input.readMessage(ai.promoted.proto.common.Properties.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(properties_); properties_ = subBuilder.buildPartial(); } break; } case 152: { bitField0_ |= 0x00000002; retrievalRank_ = input.readUInt64(); break; } case 165: { bitField0_ |= 0x00000004; retrievalScore_ = input.readFloat(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Insertion_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Insertion_fieldAccessorTable .ensureFieldAccessorsInitialized( Insertion.class, Builder.class); } private int bitField0_; public static final int PLATFORM_ID_FIELD_NUMBER = 1; private long platformId_; /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } public static final int USER_INFO_FIELD_NUMBER = 2; private ai.promoted.proto.common.UserInfo userInfo_; /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ @Override public boolean hasUserInfo() { return userInfo_ != null; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ @Override public ai.promoted.proto.common.UserInfo getUserInfo() { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ @Override public ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder() { return getUserInfo(); } public static final int TIMING_FIELD_NUMBER = 3; private ai.promoted.proto.common.Timing timing_; /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ @Override public boolean hasTiming() { return timing_ != null; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ @Override public ai.promoted.proto.common.Timing getTiming() { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ @Override public ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder() { return getTiming(); } public static final int CLIENT_INFO_FIELD_NUMBER = 4; private ai.promoted.proto.common.ClientInfo clientInfo_; /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ @Override public boolean hasClientInfo() { return clientInfo_ != null; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ @Override public ai.promoted.proto.common.ClientInfo getClientInfo() { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ @Override public ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder() { return getClientInfo(); } public static final int INSERTION_ID_FIELD_NUMBER = 6; private volatile Object insertionId_; /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return The insertionId. */ @Override public String getInsertionId() { Object ref = insertionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); insertionId_ = s; return s; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return The bytes for insertionId. */ @Override public com.google.protobuf.ByteString getInsertionIdBytes() { Object ref = insertionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); insertionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REQUEST_ID_FIELD_NUMBER = 7; private volatile Object requestId_; /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return The requestId. */ @Override public String getRequestId() { Object ref = requestId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); requestId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return The bytes for requestId. */ @Override public com.google.protobuf.ByteString getRequestIdBytes() { Object ref = requestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); requestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VIEW_ID_FIELD_NUMBER = 9; private volatile Object viewId_; /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return The viewId. */ @Override public String getViewId() { Object ref = viewId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); viewId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return The bytes for viewId. */ @Override public com.google.protobuf.ByteString getViewIdBytes() { Object ref = viewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); viewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SESSION_ID_FIELD_NUMBER = 8; private volatile Object sessionId_; /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The sessionId. */ @Override public String getSessionId() { Object ref = sessionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); sessionId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The bytes for sessionId. */ @Override public com.google.protobuf.ByteString getSessionIdBytes() { Object ref = sessionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); sessionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTENT_ID_FIELD_NUMBER = 10; private volatile Object contentId_; /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return The contentId. */ @Override public String getContentId() { Object ref = contentId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); contentId_ = s; return s; } } /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return The bytes for contentId. */ @Override public com.google.protobuf.ByteString getContentIdBytes() { Object ref = contentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); contentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int POSITION_FIELD_NUMBER = 12; private long position_; /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return Whether the position field is set. */ @Override public boolean hasPosition() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return The position. */ @Override public long getPosition() { return position_; } public static final int PROPERTIES_FIELD_NUMBER = 13; private ai.promoted.proto.common.Properties properties_; /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> * @return Whether the properties field is set. */ @Override public boolean hasProperties() { return properties_ != null; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> * @return The properties. */ @Override public ai.promoted.proto.common.Properties getProperties() { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ @Override public ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder() { return getProperties(); } public static final int RETRIEVAL_RANK_FIELD_NUMBER = 19; private long retrievalRank_; /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return Whether the retrievalRank field is set. */ @Override public boolean hasRetrievalRank() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return The retrievalRank. */ @Override public long getRetrievalRank() { return retrievalRank_; } public static final int RETRIEVAL_SCORE_FIELD_NUMBER = 20; private float retrievalScore_; /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return Whether the retrievalScore field is set. */ @Override public boolean hasRetrievalScore() { return ((bitField0_ & 0x00000004) != 0); } /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return The retrievalScore. */ @Override public float getRetrievalScore() { return retrievalScore_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (platformId_ != 0L) { output.writeUInt64(1, platformId_); } if (userInfo_ != null) { output.writeMessage(2, getUserInfo()); } if (timing_ != null) { output.writeMessage(3, getTiming()); } if (clientInfo_ != null) { output.writeMessage(4, getClientInfo()); } if (!getInsertionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, insertionId_); } if (!getRequestIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, requestId_); } if (!getSessionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, sessionId_); } if (!getViewIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, viewId_); } if (!getContentIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, contentId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt64(12, position_); } if (properties_ != null) { output.writeMessage(13, getProperties()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(19, retrievalRank_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeFloat(20, retrievalScore_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (platformId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, platformId_); } if (userInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getUserInfo()); } if (timing_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTiming()); } if (clientInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getClientInfo()); } if (!getInsertionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, insertionId_); } if (!getRequestIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, requestId_); } if (!getSessionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, sessionId_); } if (!getViewIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, viewId_); } if (!getContentIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, contentId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(12, position_); } if (properties_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(13, getProperties()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(19, retrievalRank_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(20, retrievalScore_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Insertion)) { return super.equals(obj); } Insertion other = (Insertion) obj; if (getPlatformId() != other.getPlatformId()) return false; if (hasUserInfo() != other.hasUserInfo()) return false; if (hasUserInfo()) { if (!getUserInfo() .equals(other.getUserInfo())) return false; } if (hasTiming() != other.hasTiming()) return false; if (hasTiming()) { if (!getTiming() .equals(other.getTiming())) return false; } if (hasClientInfo() != other.hasClientInfo()) return false; if (hasClientInfo()) { if (!getClientInfo() .equals(other.getClientInfo())) return false; } if (!getInsertionId() .equals(other.getInsertionId())) return false; if (!getRequestId() .equals(other.getRequestId())) return false; if (!getViewId() .equals(other.getViewId())) return false; if (!getSessionId() .equals(other.getSessionId())) return false; if (!getContentId() .equals(other.getContentId())) return false; if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { if (getPosition() != other.getPosition()) return false; } if (hasProperties() != other.hasProperties()) return false; if (hasProperties()) { if (!getProperties() .equals(other.getProperties())) return false; } if (hasRetrievalRank() != other.hasRetrievalRank()) return false; if (hasRetrievalRank()) { if (getRetrievalRank() != other.getRetrievalRank()) return false; } if (hasRetrievalScore() != other.hasRetrievalScore()) return false; if (hasRetrievalScore()) { if (Float.floatToIntBits(getRetrievalScore()) != Float.floatToIntBits( other.getRetrievalScore())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PLATFORM_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPlatformId()); if (hasUserInfo()) { hash = (37 * hash) + USER_INFO_FIELD_NUMBER; hash = (53 * hash) + getUserInfo().hashCode(); } if (hasTiming()) { hash = (37 * hash) + TIMING_FIELD_NUMBER; hash = (53 * hash) + getTiming().hashCode(); } if (hasClientInfo()) { hash = (37 * hash) + CLIENT_INFO_FIELD_NUMBER; hash = (53 * hash) + getClientInfo().hashCode(); } hash = (37 * hash) + INSERTION_ID_FIELD_NUMBER; hash = (53 * hash) + getInsertionId().hashCode(); hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VIEW_ID_FIELD_NUMBER; hash = (53 * hash) + getViewId().hashCode(); hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; hash = (53 * hash) + getSessionId().hashCode(); hash = (37 * hash) + CONTENT_ID_FIELD_NUMBER; hash = (53 * hash) + getContentId().hashCode(); if (hasPosition()) { hash = (37 * hash) + POSITION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPosition()); } if (hasProperties()) { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getProperties().hashCode(); } if (hasRetrievalRank()) { hash = (37 * hash) + RETRIEVAL_RANK_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getRetrievalRank()); } if (hasRetrievalScore()) { hash = (37 * hash) + RETRIEVAL_SCORE_FIELD_NUMBER; hash = (53 * hash) + Float.floatToIntBits( getRetrievalScore()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Insertion parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Insertion parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Insertion parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Insertion parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Insertion parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Insertion parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Insertion parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Insertion 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 Insertion parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Insertion 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 Insertion parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Insertion parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Insertion prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * This Event represents a Content being served at a certain position regardless * of it was views by a user. Insertions are immutable. * Next ID = 21. * </pre> * * Protobuf type {@code delivery.Insertion} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.Insertion) InsertionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Insertion_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Insertion_fieldAccessorTable .ensureFieldAccessorsInitialized( Insertion.class, Builder.class); } // Construct using ai.promoted.proto.delivery.Insertion.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); platformId_ = 0L; if (userInfoBuilder_ == null) { userInfo_ = null; } else { userInfo_ = null; userInfoBuilder_ = null; } if (timingBuilder_ == null) { timing_ = null; } else { timing_ = null; timingBuilder_ = null; } if (clientInfoBuilder_ == null) { clientInfo_ = null; } else { clientInfo_ = null; clientInfoBuilder_ = null; } insertionId_ = ""; requestId_ = ""; viewId_ = ""; sessionId_ = ""; contentId_ = ""; position_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); if (propertiesBuilder_ == null) { properties_ = null; } else { properties_ = null; propertiesBuilder_ = null; } retrievalRank_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); retrievalScore_ = 0F; bitField0_ = (bitField0_ & ~0x00000004); return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Delivery.internal_static_delivery_Insertion_descriptor; } @Override public Insertion getDefaultInstanceForType() { return Insertion.getDefaultInstance(); } @Override public Insertion build() { Insertion result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Insertion buildPartial() { Insertion result = new Insertion(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.platformId_ = platformId_; if (userInfoBuilder_ == null) { result.userInfo_ = userInfo_; } else { result.userInfo_ = userInfoBuilder_.build(); } if (timingBuilder_ == null) { result.timing_ = timing_; } else { result.timing_ = timingBuilder_.build(); } if (clientInfoBuilder_ == null) { result.clientInfo_ = clientInfo_; } else { result.clientInfo_ = clientInfoBuilder_.build(); } result.insertionId_ = insertionId_; result.requestId_ = requestId_; result.viewId_ = viewId_; result.sessionId_ = sessionId_; result.contentId_ = contentId_; if (((from_bitField0_ & 0x00000001) != 0)) { result.position_ = position_; to_bitField0_ |= 0x00000001; } if (propertiesBuilder_ == null) { result.properties_ = properties_; } else { result.properties_ = propertiesBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { result.retrievalRank_ = retrievalRank_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.retrievalScore_ = retrievalScore_; to_bitField0_ |= 0x00000004; } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Insertion) { return mergeFrom((Insertion)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Insertion other) { if (other == Insertion.getDefaultInstance()) return this; if (other.getPlatformId() != 0L) { setPlatformId(other.getPlatformId()); } if (other.hasUserInfo()) { mergeUserInfo(other.getUserInfo()); } if (other.hasTiming()) { mergeTiming(other.getTiming()); } if (other.hasClientInfo()) { mergeClientInfo(other.getClientInfo()); } if (!other.getInsertionId().isEmpty()) { insertionId_ = other.insertionId_; onChanged(); } if (!other.getRequestId().isEmpty()) { requestId_ = other.requestId_; onChanged(); } if (!other.getViewId().isEmpty()) { viewId_ = other.viewId_; onChanged(); } if (!other.getSessionId().isEmpty()) { sessionId_ = other.sessionId_; onChanged(); } if (!other.getContentId().isEmpty()) { contentId_ = other.contentId_; onChanged(); } if (other.hasPosition()) { setPosition(other.getPosition()); } if (other.hasProperties()) { mergeProperties(other.getProperties()); } if (other.hasRetrievalRank()) { setRetrievalRank(other.getRetrievalRank()); } if (other.hasRetrievalScore()) { setRetrievalScore(other.getRetrievalScore()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Insertion parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Insertion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long platformId_ ; /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>uint64 platform_id = 1;</code> * @param value The platformId to set. * @return This builder for chaining. */ public Builder setPlatformId(long value) { platformId_ = value; onChanged(); return this; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>uint64 platform_id = 1;</code> * @return This builder for chaining. */ public Builder clearPlatformId() { platformId_ = 0L; onChanged(); return this; } private ai.promoted.proto.common.UserInfo userInfo_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder> userInfoBuilder_; /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ public boolean hasUserInfo() { return userInfoBuilder_ != null || userInfo_ != null; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ public ai.promoted.proto.common.UserInfo getUserInfo() { if (userInfoBuilder_ == null) { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } else { return userInfoBuilder_.getMessage(); } } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder setUserInfo(ai.promoted.proto.common.UserInfo value) { if (userInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } userInfo_ = value; onChanged(); } else { userInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder setUserInfo( ai.promoted.proto.common.UserInfo.Builder builderForValue) { if (userInfoBuilder_ == null) { userInfo_ = builderForValue.build(); onChanged(); } else { userInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder mergeUserInfo(ai.promoted.proto.common.UserInfo value) { if (userInfoBuilder_ == null) { if (userInfo_ != null) { userInfo_ = ai.promoted.proto.common.UserInfo.newBuilder(userInfo_).mergeFrom(value).buildPartial(); } else { userInfo_ = value; } onChanged(); } else { userInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder clearUserInfo() { if (userInfoBuilder_ == null) { userInfo_ = null; onChanged(); } else { userInfo_ = null; userInfoBuilder_ = null; } return this; } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public ai.promoted.proto.common.UserInfo.Builder getUserInfoBuilder() { onChanged(); return getUserInfoFieldBuilder().getBuilder(); } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder() { if (userInfoBuilder_ != null) { return userInfoBuilder_.getMessageOrBuilder(); } else { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } } /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder> getUserInfoFieldBuilder() { if (userInfoBuilder_ == null) { userInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder>( getUserInfo(), getParentForChildren(), isClean()); userInfo_ = null; } return userInfoBuilder_; } private ai.promoted.proto.common.Timing timing_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder> timingBuilder_; /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ public boolean hasTiming() { return timingBuilder_ != null || timing_ != null; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ public ai.promoted.proto.common.Timing getTiming() { if (timingBuilder_ == null) { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } else { return timingBuilder_.getMessage(); } } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder setTiming(ai.promoted.proto.common.Timing value) { if (timingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timing_ = value; onChanged(); } else { timingBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder setTiming( ai.promoted.proto.common.Timing.Builder builderForValue) { if (timingBuilder_ == null) { timing_ = builderForValue.build(); onChanged(); } else { timingBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder mergeTiming(ai.promoted.proto.common.Timing value) { if (timingBuilder_ == null) { if (timing_ != null) { timing_ = ai.promoted.proto.common.Timing.newBuilder(timing_).mergeFrom(value).buildPartial(); } else { timing_ = value; } onChanged(); } else { timingBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder clearTiming() { if (timingBuilder_ == null) { timing_ = null; onChanged(); } else { timing_ = null; timingBuilder_ = null; } return this; } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ public ai.promoted.proto.common.Timing.Builder getTimingBuilder() { onChanged(); return getTimingFieldBuilder().getBuilder(); } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ public ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder() { if (timingBuilder_ != null) { return timingBuilder_.getMessageOrBuilder(); } else { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } } /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder> getTimingFieldBuilder() { if (timingBuilder_ == null) { timingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder>( getTiming(), getParentForChildren(), isClean()); timing_ = null; } return timingBuilder_; } private ai.promoted.proto.common.ClientInfo clientInfo_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder> clientInfoBuilder_; /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ public boolean hasClientInfo() { return clientInfoBuilder_ != null || clientInfo_ != null; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ public ai.promoted.proto.common.ClientInfo getClientInfo() { if (clientInfoBuilder_ == null) { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } else { return clientInfoBuilder_.getMessage(); } } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder setClientInfo(ai.promoted.proto.common.ClientInfo value) { if (clientInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } clientInfo_ = value; onChanged(); } else { clientInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder setClientInfo( ai.promoted.proto.common.ClientInfo.Builder builderForValue) { if (clientInfoBuilder_ == null) { clientInfo_ = builderForValue.build(); onChanged(); } else { clientInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder mergeClientInfo(ai.promoted.proto.common.ClientInfo value) { if (clientInfoBuilder_ == null) { if (clientInfo_ != null) { clientInfo_ = ai.promoted.proto.common.ClientInfo.newBuilder(clientInfo_).mergeFrom(value).buildPartial(); } else { clientInfo_ = value; } onChanged(); } else { clientInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder clearClientInfo() { if (clientInfoBuilder_ == null) { clientInfo_ = null; onChanged(); } else { clientInfo_ = null; clientInfoBuilder_ = null; } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public ai.promoted.proto.common.ClientInfo.Builder getClientInfoBuilder() { onChanged(); return getClientInfoFieldBuilder().getBuilder(); } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder() { if (clientInfoBuilder_ != null) { return clientInfoBuilder_.getMessageOrBuilder(); } else { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder> getClientInfoFieldBuilder() { if (clientInfoBuilder_ == null) { clientInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder>( getClientInfo(), getParentForChildren(), isClean()); clientInfo_ = null; } return clientInfoBuilder_; } private Object insertionId_ = ""; /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return The insertionId. */ public String getInsertionId() { Object ref = insertionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); insertionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return The bytes for insertionId. */ public com.google.protobuf.ByteString getInsertionIdBytes() { Object ref = insertionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); insertionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @param value The insertionId to set. * @return This builder for chaining. */ public Builder setInsertionId( String value) { if (value == null) { throw new NullPointerException(); } insertionId_ = value; onChanged(); return this; } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return This builder for chaining. */ public Builder clearInsertionId() { insertionId_ = getDefaultInstance().getInsertionId(); onChanged(); return this; } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @param value The bytes for insertionId to set. * @return This builder for chaining. */ public Builder setInsertionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); insertionId_ = value; onChanged(); return this; } private Object requestId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return The requestId. */ public String getRequestId() { Object ref = requestId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); requestId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return The bytes for requestId. */ public com.google.protobuf.ByteString getRequestIdBytes() { Object ref = requestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); requestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @param value The requestId to set. * @return This builder for chaining. */ public Builder setRequestId( String value) { if (value == null) { throw new NullPointerException(); } requestId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return This builder for chaining. */ public Builder clearRequestId() { requestId_ = getDefaultInstance().getRequestId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @param value The bytes for requestId to set. * @return This builder for chaining. */ public Builder setRequestIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); requestId_ = value; onChanged(); return this; } private Object viewId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return The viewId. */ public String getViewId() { Object ref = viewId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); viewId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return The bytes for viewId. */ public com.google.protobuf.ByteString getViewIdBytes() { Object ref = viewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); viewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @param value The viewId to set. * @return This builder for chaining. */ public Builder setViewId( String value) { if (value == null) { throw new NullPointerException(); } viewId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return This builder for chaining. */ public Builder clearViewId() { viewId_ = getDefaultInstance().getViewId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @param value The bytes for viewId to set. * @return This builder for chaining. */ public Builder setViewIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); viewId_ = value; onChanged(); return this; } private Object sessionId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The sessionId. */ public String getSessionId() { Object ref = sessionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); sessionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The bytes for sessionId. */ public com.google.protobuf.ByteString getSessionIdBytes() { Object ref = sessionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); sessionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @param value The sessionId to set. * @return This builder for chaining. */ public Builder setSessionId( String value) { if (value == null) { throw new NullPointerException(); } sessionId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return This builder for chaining. */ public Builder clearSessionId() { sessionId_ = getDefaultInstance().getSessionId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @param value The bytes for sessionId to set. * @return This builder for chaining. */ public Builder setSessionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sessionId_ = value; onChanged(); return this; } private Object contentId_ = ""; /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return The contentId. */ public String getContentId() { Object ref = contentId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); contentId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return The bytes for contentId. */ public com.google.protobuf.ByteString getContentIdBytes() { Object ref = contentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); contentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @param value The contentId to set. * @return This builder for chaining. */ public Builder setContentId( String value) { if (value == null) { throw new NullPointerException(); } contentId_ = value; onChanged(); return this; } /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return This builder for chaining. */ public Builder clearContentId() { contentId_ = getDefaultInstance().getContentId(); onChanged(); return this; } /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @param value The bytes for contentId to set. * @return This builder for chaining. */ public Builder setContentIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); contentId_ = value; onChanged(); return this; } private long position_ ; /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return Whether the position field is set. */ @Override public boolean hasPosition() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return The position. */ @Override public long getPosition() { return position_; } /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @param value The position to set. * @return This builder for chaining. */ public Builder setPosition(long value) { bitField0_ |= 0x00000001; position_ = value; onChanged(); return this; } /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return This builder for chaining. */ public Builder clearPosition() { bitField0_ = (bitField0_ & ~0x00000001); position_ = 0L; onChanged(); return this; } private ai.promoted.proto.common.Properties properties_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder> propertiesBuilder_; /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> * @return Whether the properties field is set. */ public boolean hasProperties() { return propertiesBuilder_ != null || properties_ != null; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> * @return The properties. */ public ai.promoted.proto.common.Properties getProperties() { if (propertiesBuilder_ == null) { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } else { return propertiesBuilder_.getMessage(); } } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder setProperties(ai.promoted.proto.common.Properties value) { if (propertiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } properties_ = value; onChanged(); } else { propertiesBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder setProperties( ai.promoted.proto.common.Properties.Builder builderForValue) { if (propertiesBuilder_ == null) { properties_ = builderForValue.build(); onChanged(); } else { propertiesBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder mergeProperties(ai.promoted.proto.common.Properties value) { if (propertiesBuilder_ == null) { if (properties_ != null) { properties_ = ai.promoted.proto.common.Properties.newBuilder(properties_).mergeFrom(value).buildPartial(); } else { properties_ = value; } onChanged(); } else { propertiesBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder clearProperties() { if (propertiesBuilder_ == null) { properties_ = null; onChanged(); } else { properties_ = null; propertiesBuilder_ = null; } return this; } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ public ai.promoted.proto.common.Properties.Builder getPropertiesBuilder() { onChanged(); return getPropertiesFieldBuilder().getBuilder(); } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ public ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder() { if (propertiesBuilder_ != null) { return propertiesBuilder_.getMessageOrBuilder(); } else { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } } /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder> getPropertiesFieldBuilder() { if (propertiesBuilder_ == null) { propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder>( getProperties(), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; } private long retrievalRank_ ; /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return Whether the retrievalRank field is set. */ @Override public boolean hasRetrievalRank() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return The retrievalRank. */ @Override public long getRetrievalRank() { return retrievalRank_; } /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @param value The retrievalRank to set. * @return This builder for chaining. */ public Builder setRetrievalRank(long value) { bitField0_ |= 0x00000002; retrievalRank_ = value; onChanged(); return this; } /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return This builder for chaining. */ public Builder clearRetrievalRank() { bitField0_ = (bitField0_ & ~0x00000002); retrievalRank_ = 0L; onChanged(); return this; } private float retrievalScore_ ; /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return Whether the retrievalScore field is set. */ @Override public boolean hasRetrievalScore() { return ((bitField0_ & 0x00000004) != 0); } /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return The retrievalScore. */ @Override public float getRetrievalScore() { return retrievalScore_; } /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @param value The retrievalScore to set. * @return This builder for chaining. */ public Builder setRetrievalScore(float value) { bitField0_ |= 0x00000004; retrievalScore_ = value; onChanged(); return this; } /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return This builder for chaining. */ public Builder clearRetrievalScore() { bitField0_ = (bitField0_ & ~0x00000004); retrievalScore_ = 0F; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.Insertion) } // @@protoc_insertion_point(class_scope:delivery.Insertion) private static final Insertion DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Insertion(); } public static Insertion getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Insertion> PARSER = new com.google.protobuf.AbstractParser<Insertion>() { @Override public Insertion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Insertion(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Insertion> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Insertion> getParserForType() { return PARSER; } @Override public Insertion getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/InsertionOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; public interface InsertionOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.Insertion) com.google.protobuf.MessageOrBuilder { /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ long getPlatformId(); /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ boolean hasUserInfo(); /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ ai.promoted.proto.common.UserInfo getUserInfo(); /** * <pre> * Required. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder(); /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ boolean hasTiming(); /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ ai.promoted.proto.common.Timing getTiming(); /** * <pre> * Optional. If not set, set by API servers. * </pre> * * <code>.common.Timing timing = 3;</code> */ ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ boolean hasClientInfo(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ ai.promoted.proto.common.ClientInfo getClientInfo(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder(); /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return The insertionId. */ String getInsertionId(); /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string insertion_id = 6;</code> * @return The bytes for insertionId. */ com.google.protobuf.ByteString getInsertionIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return The requestId. */ String getRequestId(); /** * <pre> * Optional. * </pre> * * <code>string request_id = 7;</code> * @return The bytes for requestId. */ com.google.protobuf.ByteString getRequestIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return The viewId. */ String getViewId(); /** * <pre> * Optional. * </pre> * * <code>string view_id = 9;</code> * @return The bytes for viewId. */ com.google.protobuf.ByteString getViewIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The sessionId. */ String getSessionId(); /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The bytes for sessionId. */ com.google.protobuf.ByteString getSessionIdBytes(); /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return The contentId. */ String getContentId(); /** * <pre> * Optional. We'll look this up using the external_content_id. * </pre> * * <code>string content_id = 10;</code> * @return The bytes for contentId. */ com.google.protobuf.ByteString getContentIdBytes(); /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return Whether the position field is set. */ boolean hasPosition(); /** * <pre> * Optional. 0-based. Position "in what" depends on insertion context: * if request_insertion, then position provided by client or retrieval * if response_insertion, then the position returned by Delivery to the client * </pre> * * <code>uint64 position = 12;</code> * @return The position. */ long getPosition(); /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> * @return Whether the properties field is set. */ boolean hasProperties(); /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> * @return The properties. */ ai.promoted.proto.common.Properties getProperties(); /** * <pre> * Optional. Custom item attributes and features set by customers. * </pre> * * <code>.common.Properties properties = 13;</code> */ ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder(); /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return Whether the retrievalRank field is set. */ boolean hasRetrievalRank(); /** * <pre> * Optional. Ranking (if known) of this insertion from the retrieval system. * </pre> * * <code>uint64 retrieval_rank = 19;</code> * @return The retrievalRank. */ long getRetrievalRank(); /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return Whether the retrievalScore field is set. */ boolean hasRetrievalScore(); /** * <pre> * Optional. Score (if any) of this insertion from the retrieval system. * </pre> * * <code>float retrieval_score = 20;</code> * @return The retrievalScore. */ float getRetrievalScore(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/NegativeRule.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 6. * </pre> * * Protobuf type {@code delivery.NegativeRule} */ public final class NegativeRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.NegativeRule) NegativeRuleOrBuilder { private static final long serialVersionUID = 0L; // Use NegativeRule.newBuilder() to construct. private NegativeRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private NegativeRule() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new NegativeRule(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private NegativeRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 9: { bitField0_ |= 0x00000001; pluckPct_ = input.readDouble(); break; } case 16: { bitField0_ |= 0x00000002; forbidLessPos_ = input.readUInt64(); break; } case 24: { bitField0_ |= 0x00000004; minSpacing_ = input.readUInt64(); break; } case 32: { bitField0_ |= 0x00000008; forbidGreaterPos_ = input.readUInt64(); break; } case 40: { bitField0_ |= 0x00000010; maxCount_ = input.readUInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_NegativeRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_NegativeRule_fieldAccessorTable .ensureFieldAccessorsInitialized( NegativeRule.class, Builder.class); } private int bitField0_; public static final int PLUCK_PCT_FIELD_NUMBER = 1; private double pluckPct_; /** * <code>double pluck_pct = 1;</code> * @return Whether the pluckPct field is set. */ @Override public boolean hasPluckPct() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double pluck_pct = 1;</code> * @return The pluckPct. */ @Override public double getPluckPct() { return pluckPct_; } public static final int FORBID_LESS_POS_FIELD_NUMBER = 2; private long forbidLessPos_; /** * <code>uint64 forbid_less_pos = 2;</code> * @return Whether the forbidLessPos field is set. */ @Override public boolean hasForbidLessPos() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>uint64 forbid_less_pos = 2;</code> * @return The forbidLessPos. */ @Override public long getForbidLessPos() { return forbidLessPos_; } public static final int MIN_SPACING_FIELD_NUMBER = 3; private long minSpacing_; /** * <code>uint64 min_spacing = 3;</code> * @return Whether the minSpacing field is set. */ @Override public boolean hasMinSpacing() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>uint64 min_spacing = 3;</code> * @return The minSpacing. */ @Override public long getMinSpacing() { return minSpacing_; } public static final int FORBID_GREATER_POS_FIELD_NUMBER = 4; private long forbidGreaterPos_; /** * <code>uint64 forbid_greater_pos = 4;</code> * @return Whether the forbidGreaterPos field is set. */ @Override public boolean hasForbidGreaterPos() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>uint64 forbid_greater_pos = 4;</code> * @return The forbidGreaterPos. */ @Override public long getForbidGreaterPos() { return forbidGreaterPos_; } public static final int MAX_COUNT_FIELD_NUMBER = 5; private long maxCount_; /** * <code>uint64 max_count = 5;</code> * @return Whether the maxCount field is set. */ @Override public boolean hasMaxCount() { return ((bitField0_ & 0x00000010) != 0); } /** * <code>uint64 max_count = 5;</code> * @return The maxCount. */ @Override public long getMaxCount() { return maxCount_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(1, pluckPct_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(2, forbidLessPos_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeUInt64(3, minSpacing_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeUInt64(4, forbidGreaterPos_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeUInt64(5, maxCount_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, pluckPct_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, forbidLessPos_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, minSpacing_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(4, forbidGreaterPos_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(5, maxCount_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof NegativeRule)) { return super.equals(obj); } NegativeRule other = (NegativeRule) obj; if (hasPluckPct() != other.hasPluckPct()) return false; if (hasPluckPct()) { if (Double.doubleToLongBits(getPluckPct()) != Double.doubleToLongBits( other.getPluckPct())) return false; } if (hasForbidLessPos() != other.hasForbidLessPos()) return false; if (hasForbidLessPos()) { if (getForbidLessPos() != other.getForbidLessPos()) return false; } if (hasMinSpacing() != other.hasMinSpacing()) return false; if (hasMinSpacing()) { if (getMinSpacing() != other.getMinSpacing()) return false; } if (hasForbidGreaterPos() != other.hasForbidGreaterPos()) return false; if (hasForbidGreaterPos()) { if (getForbidGreaterPos() != other.getForbidGreaterPos()) return false; } if (hasMaxCount() != other.hasMaxCount()) return false; if (hasMaxCount()) { if (getMaxCount() != other.getMaxCount()) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasPluckPct()) { hash = (37 * hash) + PLUCK_PCT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getPluckPct())); } if (hasForbidLessPos()) { hash = (37 * hash) + FORBID_LESS_POS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getForbidLessPos()); } if (hasMinSpacing()) { hash = (37 * hash) + MIN_SPACING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinSpacing()); } if (hasForbidGreaterPos()) { hash = (37 * hash) + FORBID_GREATER_POS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getForbidGreaterPos()); } if (hasMaxCount()) { hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxCount()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static NegativeRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static NegativeRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static NegativeRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static NegativeRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static NegativeRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static NegativeRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static NegativeRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static NegativeRule 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 NegativeRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static NegativeRule 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 NegativeRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static NegativeRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(NegativeRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 6. * </pre> * * Protobuf type {@code delivery.NegativeRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.NegativeRule) NegativeRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_NegativeRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_NegativeRule_fieldAccessorTable .ensureFieldAccessorsInitialized( NegativeRule.class, Builder.class); } // Construct using ai.promoted.proto.delivery.NegativeRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); pluckPct_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); forbidLessPos_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); minSpacing_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); forbidGreaterPos_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); maxCount_ = 0L; bitField0_ = (bitField0_ & ~0x00000010); return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_NegativeRule_descriptor; } @Override public NegativeRule getDefaultInstanceForType() { return NegativeRule.getDefaultInstance(); } @Override public NegativeRule build() { NegativeRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public NegativeRule buildPartial() { NegativeRule result = new NegativeRule(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.pluckPct_ = pluckPct_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.forbidLessPos_ = forbidLessPos_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.minSpacing_ = minSpacing_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.forbidGreaterPos_ = forbidGreaterPos_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { result.maxCount_ = maxCount_; to_bitField0_ |= 0x00000010; } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof NegativeRule) { return mergeFrom((NegativeRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(NegativeRule other) { if (other == NegativeRule.getDefaultInstance()) return this; if (other.hasPluckPct()) { setPluckPct(other.getPluckPct()); } if (other.hasForbidLessPos()) { setForbidLessPos(other.getForbidLessPos()); } if (other.hasMinSpacing()) { setMinSpacing(other.getMinSpacing()); } if (other.hasForbidGreaterPos()) { setForbidGreaterPos(other.getForbidGreaterPos()); } if (other.hasMaxCount()) { setMaxCount(other.getMaxCount()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { NegativeRule parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (NegativeRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private double pluckPct_ ; /** * <code>double pluck_pct = 1;</code> * @return Whether the pluckPct field is set. */ @Override public boolean hasPluckPct() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double pluck_pct = 1;</code> * @return The pluckPct. */ @Override public double getPluckPct() { return pluckPct_; } /** * <code>double pluck_pct = 1;</code> * @param value The pluckPct to set. * @return This builder for chaining. */ public Builder setPluckPct(double value) { bitField0_ |= 0x00000001; pluckPct_ = value; onChanged(); return this; } /** * <code>double pluck_pct = 1;</code> * @return This builder for chaining. */ public Builder clearPluckPct() { bitField0_ = (bitField0_ & ~0x00000001); pluckPct_ = 0D; onChanged(); return this; } private long forbidLessPos_ ; /** * <code>uint64 forbid_less_pos = 2;</code> * @return Whether the forbidLessPos field is set. */ @Override public boolean hasForbidLessPos() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>uint64 forbid_less_pos = 2;</code> * @return The forbidLessPos. */ @Override public long getForbidLessPos() { return forbidLessPos_; } /** * <code>uint64 forbid_less_pos = 2;</code> * @param value The forbidLessPos to set. * @return This builder for chaining. */ public Builder setForbidLessPos(long value) { bitField0_ |= 0x00000002; forbidLessPos_ = value; onChanged(); return this; } /** * <code>uint64 forbid_less_pos = 2;</code> * @return This builder for chaining. */ public Builder clearForbidLessPos() { bitField0_ = (bitField0_ & ~0x00000002); forbidLessPos_ = 0L; onChanged(); return this; } private long minSpacing_ ; /** * <code>uint64 min_spacing = 3;</code> * @return Whether the minSpacing field is set. */ @Override public boolean hasMinSpacing() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>uint64 min_spacing = 3;</code> * @return The minSpacing. */ @Override public long getMinSpacing() { return minSpacing_; } /** * <code>uint64 min_spacing = 3;</code> * @param value The minSpacing to set. * @return This builder for chaining. */ public Builder setMinSpacing(long value) { bitField0_ |= 0x00000004; minSpacing_ = value; onChanged(); return this; } /** * <code>uint64 min_spacing = 3;</code> * @return This builder for chaining. */ public Builder clearMinSpacing() { bitField0_ = (bitField0_ & ~0x00000004); minSpacing_ = 0L; onChanged(); return this; } private long forbidGreaterPos_ ; /** * <code>uint64 forbid_greater_pos = 4;</code> * @return Whether the forbidGreaterPos field is set. */ @Override public boolean hasForbidGreaterPos() { return ((bitField0_ & 0x00000008) != 0); } /** * <code>uint64 forbid_greater_pos = 4;</code> * @return The forbidGreaterPos. */ @Override public long getForbidGreaterPos() { return forbidGreaterPos_; } /** * <code>uint64 forbid_greater_pos = 4;</code> * @param value The forbidGreaterPos to set. * @return This builder for chaining. */ public Builder setForbidGreaterPos(long value) { bitField0_ |= 0x00000008; forbidGreaterPos_ = value; onChanged(); return this; } /** * <code>uint64 forbid_greater_pos = 4;</code> * @return This builder for chaining. */ public Builder clearForbidGreaterPos() { bitField0_ = (bitField0_ & ~0x00000008); forbidGreaterPos_ = 0L; onChanged(); return this; } private long maxCount_ ; /** * <code>uint64 max_count = 5;</code> * @return Whether the maxCount field is set. */ @Override public boolean hasMaxCount() { return ((bitField0_ & 0x00000010) != 0); } /** * <code>uint64 max_count = 5;</code> * @return The maxCount. */ @Override public long getMaxCount() { return maxCount_; } /** * <code>uint64 max_count = 5;</code> * @param value The maxCount to set. * @return This builder for chaining. */ public Builder setMaxCount(long value) { bitField0_ |= 0x00000010; maxCount_ = value; onChanged(); return this; } /** * <code>uint64 max_count = 5;</code> * @return This builder for chaining. */ public Builder clearMaxCount() { bitField0_ = (bitField0_ & ~0x00000010); maxCount_ = 0L; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.NegativeRule) } // @@protoc_insertion_point(class_scope:delivery.NegativeRule) private static final NegativeRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new NegativeRule(); } public static NegativeRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<NegativeRule> PARSER = new com.google.protobuf.AbstractParser<NegativeRule>() { @Override public NegativeRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new NegativeRule(input, extensionRegistry); } }; public static com.google.protobuf.Parser<NegativeRule> parser() { return PARSER; } @Override public com.google.protobuf.Parser<NegativeRule> getParserForType() { return PARSER; } @Override public NegativeRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/NegativeRuleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface NegativeRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.NegativeRule) com.google.protobuf.MessageOrBuilder { /** * <code>double pluck_pct = 1;</code> * @return Whether the pluckPct field is set. */ boolean hasPluckPct(); /** * <code>double pluck_pct = 1;</code> * @return The pluckPct. */ double getPluckPct(); /** * <code>uint64 forbid_less_pos = 2;</code> * @return Whether the forbidLessPos field is set. */ boolean hasForbidLessPos(); /** * <code>uint64 forbid_less_pos = 2;</code> * @return The forbidLessPos. */ long getForbidLessPos(); /** * <code>uint64 min_spacing = 3;</code> * @return Whether the minSpacing field is set. */ boolean hasMinSpacing(); /** * <code>uint64 min_spacing = 3;</code> * @return The minSpacing. */ long getMinSpacing(); /** * <code>uint64 forbid_greater_pos = 4;</code> * @return Whether the forbidGreaterPos field is set. */ boolean hasForbidGreaterPos(); /** * <code>uint64 forbid_greater_pos = 4;</code> * @return The forbidGreaterPos. */ long getForbidGreaterPos(); /** * <code>uint64 max_count = 5;</code> * @return Whether the maxCount field is set. */ boolean hasMaxCount(); /** * <code>uint64 max_count = 5;</code> * @return The maxCount. */ long getMaxCount(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/NormalDistribution.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 3. * </pre> * * Protobuf type {@code delivery.NormalDistribution} */ public final class NormalDistribution extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.NormalDistribution) NormalDistributionOrBuilder { private static final long serialVersionUID = 0L; // Use NormalDistribution.newBuilder() to construct. private NormalDistribution(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private NormalDistribution() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new NormalDistribution(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private NormalDistribution( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 9: { mean_ = input.readDouble(); break; } case 17: { variance_ = input.readDouble(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_NormalDistribution_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_NormalDistribution_fieldAccessorTable .ensureFieldAccessorsInitialized( NormalDistribution.class, Builder.class); } public static final int MEAN_FIELD_NUMBER = 1; private double mean_; /** * <code>double mean = 1;</code> * @return The mean. */ @Override public double getMean() { return mean_; } public static final int VARIANCE_FIELD_NUMBER = 2; private double variance_; /** * <code>double variance = 2;</code> * @return The variance. */ @Override public double getVariance() { return variance_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (mean_ != 0D) { output.writeDouble(1, mean_); } if (variance_ != 0D) { output.writeDouble(2, variance_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (mean_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, mean_); } if (variance_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(2, variance_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof NormalDistribution)) { return super.equals(obj); } NormalDistribution other = (NormalDistribution) obj; if (Double.doubleToLongBits(getMean()) != Double.doubleToLongBits( other.getMean())) return false; if (Double.doubleToLongBits(getVariance()) != Double.doubleToLongBits( other.getVariance())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MEAN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getMean())); hash = (37 * hash) + VARIANCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getVariance())); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static NormalDistribution parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static NormalDistribution parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static NormalDistribution parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static NormalDistribution parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static NormalDistribution parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static NormalDistribution parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static NormalDistribution parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static NormalDistribution 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 NormalDistribution parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static NormalDistribution 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 NormalDistribution parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static NormalDistribution parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(NormalDistribution prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 3. * </pre> * * Protobuf type {@code delivery.NormalDistribution} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.NormalDistribution) NormalDistributionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_NormalDistribution_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_NormalDistribution_fieldAccessorTable .ensureFieldAccessorsInitialized( NormalDistribution.class, Builder.class); } // Construct using ai.promoted.proto.delivery.NormalDistribution.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); mean_ = 0D; variance_ = 0D; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_NormalDistribution_descriptor; } @Override public NormalDistribution getDefaultInstanceForType() { return NormalDistribution.getDefaultInstance(); } @Override public NormalDistribution build() { NormalDistribution result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public NormalDistribution buildPartial() { NormalDistribution result = new NormalDistribution(this); result.mean_ = mean_; result.variance_ = variance_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof NormalDistribution) { return mergeFrom((NormalDistribution)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(NormalDistribution other) { if (other == NormalDistribution.getDefaultInstance()) return this; if (other.getMean() != 0D) { setMean(other.getMean()); } if (other.getVariance() != 0D) { setVariance(other.getVariance()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { NormalDistribution parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (NormalDistribution) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private double mean_ ; /** * <code>double mean = 1;</code> * @return The mean. */ @Override public double getMean() { return mean_; } /** * <code>double mean = 1;</code> * @param value The mean to set. * @return This builder for chaining. */ public Builder setMean(double value) { mean_ = value; onChanged(); return this; } /** * <code>double mean = 1;</code> * @return This builder for chaining. */ public Builder clearMean() { mean_ = 0D; onChanged(); return this; } private double variance_ ; /** * <code>double variance = 2;</code> * @return The variance. */ @Override public double getVariance() { return variance_; } /** * <code>double variance = 2;</code> * @param value The variance to set. * @return This builder for chaining. */ public Builder setVariance(double value) { variance_ = value; onChanged(); return this; } /** * <code>double variance = 2;</code> * @return This builder for chaining. */ public Builder clearVariance() { variance_ = 0D; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.NormalDistribution) } // @@protoc_insertion_point(class_scope:delivery.NormalDistribution) private static final NormalDistribution DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new NormalDistribution(); } public static NormalDistribution getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<NormalDistribution> PARSER = new com.google.protobuf.AbstractParser<NormalDistribution>() { @Override public NormalDistribution parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new NormalDistribution(input, extensionRegistry); } }; public static com.google.protobuf.Parser<NormalDistribution> parser() { return PARSER; } @Override public com.google.protobuf.Parser<NormalDistribution> getParserForType() { return PARSER; } @Override public NormalDistribution getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/NormalDistributionOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface NormalDistributionOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.NormalDistribution) com.google.protobuf.MessageOrBuilder { /** * <code>double mean = 1;</code> * @return The mean. */ double getMean(); /** * <code>double variance = 2;</code> * @return The variance. */ double getVariance(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/Paging.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 5. * </pre> * * Protobuf type {@code delivery.Paging} */ public final class Paging extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.Paging) PagingOrBuilder { private static final long serialVersionUID = 0L; // Use Paging.newBuilder() to construct. private Paging(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Paging() { pagingId_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Paging(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Paging( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); pagingId_ = s; break; } case 16: { size_ = input.readInt32(); break; } case 26: { String s = input.readStringRequireUtf8(); startingCase_ = 3; starting_ = s; break; } case 32: { startingCase_ = 4; starting_ = input.readInt32(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Paging_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Paging_fieldAccessorTable .ensureFieldAccessorsInitialized( Paging.class, Builder.class); } private int startingCase_ = 0; private Object starting_; public enum StartingCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { CURSOR(3), OFFSET(4), STARTING_NOT_SET(0); private final int value; private StartingCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static StartingCase valueOf(int value) { return forNumber(value); } public static StartingCase forNumber(int value) { switch (value) { case 3: return CURSOR; case 4: return OFFSET; case 0: return STARTING_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public StartingCase getStartingCase() { return StartingCase.forNumber( startingCase_); } public static final int PAGING_ID_FIELD_NUMBER = 1; private volatile Object pagingId_; /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return The pagingId. */ @Override public String getPagingId() { Object ref = pagingId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); pagingId_ = s; return s; } } /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return The bytes for pagingId. */ @Override public com.google.protobuf.ByteString getPagingIdBytes() { Object ref = pagingId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); pagingId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SIZE_FIELD_NUMBER = 2; private int size_; /** * <pre> * Required. The number of items (insertions) to return. * </pre> * * <code>int32 size = 2;</code> * @return The size. */ @Override public int getSize() { return size_; } public static final int CURSOR_FIELD_NUMBER = 3; /** * <code>string cursor = 3;</code> * @return Whether the cursor field is set. */ public boolean hasCursor() { return startingCase_ == 3; } /** * <code>string cursor = 3;</code> * @return The cursor. */ public String getCursor() { Object ref = ""; if (startingCase_ == 3) { ref = starting_; } if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (startingCase_ == 3) { starting_ = s; } return s; } } /** * <code>string cursor = 3;</code> * @return The bytes for cursor. */ public com.google.protobuf.ByteString getCursorBytes() { Object ref = ""; if (startingCase_ == 3) { ref = starting_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); if (startingCase_ == 3) { starting_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OFFSET_FIELD_NUMBER = 4; /** * <code>int32 offset = 4;</code> * @return Whether the offset field is set. */ @Override public boolean hasOffset() { return startingCase_ == 4; } /** * <code>int32 offset = 4;</code> * @return The offset. */ @Override public int getOffset() { if (startingCase_ == 4) { return (Integer) starting_; } return 0; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getPagingIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pagingId_); } if (size_ != 0) { output.writeInt32(2, size_); } if (startingCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, starting_); } if (startingCase_ == 4) { output.writeInt32( 4, (int)((Integer) starting_)); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getPagingIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pagingId_); } if (size_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, size_); } if (startingCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, starting_); } if (startingCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeInt32Size( 4, (int)((Integer) starting_)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Paging)) { return super.equals(obj); } Paging other = (Paging) obj; if (!getPagingId() .equals(other.getPagingId())) return false; if (getSize() != other.getSize()) return false; if (!getStartingCase().equals(other.getStartingCase())) return false; switch (startingCase_) { case 3: if (!getCursor() .equals(other.getCursor())) return false; break; case 4: if (getOffset() != other.getOffset()) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PAGING_ID_FIELD_NUMBER; hash = (53 * hash) + getPagingId().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + getSize(); switch (startingCase_) { case 3: hash = (37 * hash) + CURSOR_FIELD_NUMBER; hash = (53 * hash) + getCursor().hashCode(); break; case 4: hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + getOffset(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Paging parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Paging parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Paging parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Paging parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Paging parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Paging parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Paging parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Paging 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 Paging parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Paging 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 Paging parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Paging parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Paging prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 5. * </pre> * * Protobuf type {@code delivery.Paging} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.Paging) PagingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Paging_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Paging_fieldAccessorTable .ensureFieldAccessorsInitialized( Paging.class, Builder.class); } // Construct using ai.promoted.proto.delivery.Paging.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); pagingId_ = ""; size_ = 0; startingCase_ = 0; starting_ = null; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Delivery.internal_static_delivery_Paging_descriptor; } @Override public Paging getDefaultInstanceForType() { return Paging.getDefaultInstance(); } @Override public Paging build() { Paging result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Paging buildPartial() { Paging result = new Paging(this); result.pagingId_ = pagingId_; result.size_ = size_; if (startingCase_ == 3) { result.starting_ = starting_; } if (startingCase_ == 4) { result.starting_ = starting_; } result.startingCase_ = startingCase_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Paging) { return mergeFrom((Paging)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Paging other) { if (other == Paging.getDefaultInstance()) return this; if (!other.getPagingId().isEmpty()) { pagingId_ = other.pagingId_; onChanged(); } if (other.getSize() != 0) { setSize(other.getSize()); } switch (other.getStartingCase()) { case CURSOR: { startingCase_ = 3; starting_ = other.starting_; onChanged(); break; } case OFFSET: { setOffset(other.getOffset()); break; } case STARTING_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Paging parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Paging) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int startingCase_ = 0; private Object starting_; public StartingCase getStartingCase() { return StartingCase.forNumber( startingCase_); } public Builder clearStarting() { startingCase_ = 0; starting_ = null; onChanged(); return this; } private Object pagingId_ = ""; /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return The pagingId. */ public String getPagingId() { Object ref = pagingId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); pagingId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return The bytes for pagingId. */ public com.google.protobuf.ByteString getPagingIdBytes() { Object ref = pagingId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); pagingId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @param value The pagingId to set. * @return This builder for chaining. */ public Builder setPagingId( String value) { if (value == null) { throw new NullPointerException(); } pagingId_ = value; onChanged(); return this; } /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return This builder for chaining. */ public Builder clearPagingId() { pagingId_ = getDefaultInstance().getPagingId(); onChanged(); return this; } /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @param value The bytes for pagingId to set. * @return This builder for chaining. */ public Builder setPagingIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pagingId_ = value; onChanged(); return this; } private int size_ ; /** * <pre> * Required. The number of items (insertions) to return. * </pre> * * <code>int32 size = 2;</code> * @return The size. */ @Override public int getSize() { return size_; } /** * <pre> * Required. The number of items (insertions) to return. * </pre> * * <code>int32 size = 2;</code> * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(int value) { size_ = value; onChanged(); return this; } /** * <pre> * Required. The number of items (insertions) to return. * </pre> * * <code>int32 size = 2;</code> * @return This builder for chaining. */ public Builder clearSize() { size_ = 0; onChanged(); return this; } /** * <code>string cursor = 3;</code> * @return Whether the cursor field is set. */ @Override public boolean hasCursor() { return startingCase_ == 3; } /** * <code>string cursor = 3;</code> * @return The cursor. */ @Override public String getCursor() { Object ref = ""; if (startingCase_ == 3) { ref = starting_; } if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (startingCase_ == 3) { starting_ = s; } return s; } else { return (String) ref; } } /** * <code>string cursor = 3;</code> * @return The bytes for cursor. */ @Override public com.google.protobuf.ByteString getCursorBytes() { Object ref = ""; if (startingCase_ == 3) { ref = starting_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); if (startingCase_ == 3) { starting_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string cursor = 3;</code> * @param value The cursor to set. * @return This builder for chaining. */ public Builder setCursor( String value) { if (value == null) { throw new NullPointerException(); } startingCase_ = 3; starting_ = value; onChanged(); return this; } /** * <code>string cursor = 3;</code> * @return This builder for chaining. */ public Builder clearCursor() { if (startingCase_ == 3) { startingCase_ = 0; starting_ = null; onChanged(); } return this; } /** * <code>string cursor = 3;</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); startingCase_ = 3; starting_ = value; onChanged(); return this; } /** * <code>int32 offset = 4;</code> * @return Whether the offset field is set. */ public boolean hasOffset() { return startingCase_ == 4; } /** * <code>int32 offset = 4;</code> * @return The offset. */ public int getOffset() { if (startingCase_ == 4) { return (Integer) starting_; } return 0; } /** * <code>int32 offset = 4;</code> * @param value The offset to set. * @return This builder for chaining. */ public Builder setOffset(int value) { startingCase_ = 4; starting_ = value; onChanged(); return this; } /** * <code>int32 offset = 4;</code> * @return This builder for chaining. */ public Builder clearOffset() { if (startingCase_ == 4) { startingCase_ = 0; starting_ = null; onChanged(); } return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.Paging) } // @@protoc_insertion_point(class_scope:delivery.Paging) private static final Paging DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Paging(); } public static Paging getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Paging> PARSER = new com.google.protobuf.AbstractParser<Paging>() { @Override public Paging parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Paging(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Paging> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Paging> getParserForType() { return PARSER; } @Override public Paging getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/PagingInfo.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 3. * </pre> * * Protobuf type {@code delivery.PagingInfo} */ public final class PagingInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.PagingInfo) PagingInfoOrBuilder { private static final long serialVersionUID = 0L; // Use PagingInfo.newBuilder() to construct. private PagingInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private PagingInfo() { pagingId_ = ""; cursor_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new PagingInfo(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PagingInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); pagingId_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); cursor_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_PagingInfo_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_PagingInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( PagingInfo.class, Builder.class); } public static final int PAGING_ID_FIELD_NUMBER = 1; private volatile Object pagingId_; /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return The pagingId. */ @Override public String getPagingId() { Object ref = pagingId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); pagingId_ = s; return s; } } /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return The bytes for pagingId. */ @Override public com.google.protobuf.ByteString getPagingIdBytes() { Object ref = pagingId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); pagingId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CURSOR_FIELD_NUMBER = 2; private volatile Object cursor_; /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return The cursor. */ @Override public String getCursor() { Object ref = cursor_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); cursor_ = s; return s; } } /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return The bytes for cursor. */ @Override public com.google.protobuf.ByteString getCursorBytes() { Object ref = cursor_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); cursor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getPagingIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pagingId_); } if (!getCursorBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cursor_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getPagingIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pagingId_); } if (!getCursorBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cursor_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof PagingInfo)) { return super.equals(obj); } PagingInfo other = (PagingInfo) obj; if (!getPagingId() .equals(other.getPagingId())) return false; if (!getCursor() .equals(other.getCursor())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PAGING_ID_FIELD_NUMBER; hash = (53 * hash) + getPagingId().hashCode(); hash = (37 * hash) + CURSOR_FIELD_NUMBER; hash = (53 * hash) + getCursor().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static PagingInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static PagingInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static PagingInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static PagingInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static PagingInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static PagingInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static PagingInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static PagingInfo 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 PagingInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static PagingInfo 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 PagingInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static PagingInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(PagingInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 3. * </pre> * * Protobuf type {@code delivery.PagingInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.PagingInfo) PagingInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_PagingInfo_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_PagingInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( PagingInfo.class, Builder.class); } // Construct using ai.promoted.proto.delivery.PagingInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); pagingId_ = ""; cursor_ = ""; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Delivery.internal_static_delivery_PagingInfo_descriptor; } @Override public PagingInfo getDefaultInstanceForType() { return PagingInfo.getDefaultInstance(); } @Override public PagingInfo build() { PagingInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public PagingInfo buildPartial() { PagingInfo result = new PagingInfo(this); result.pagingId_ = pagingId_; result.cursor_ = cursor_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof PagingInfo) { return mergeFrom((PagingInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(PagingInfo other) { if (other == PagingInfo.getDefaultInstance()) return this; if (!other.getPagingId().isEmpty()) { pagingId_ = other.pagingId_; onChanged(); } if (!other.getCursor().isEmpty()) { cursor_ = other.cursor_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { PagingInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (PagingInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private Object pagingId_ = ""; /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return The pagingId. */ public String getPagingId() { Object ref = pagingId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); pagingId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return The bytes for pagingId. */ public com.google.protobuf.ByteString getPagingIdBytes() { Object ref = pagingId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); pagingId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @param value The pagingId to set. * @return This builder for chaining. */ public Builder setPagingId( String value) { if (value == null) { throw new NullPointerException(); } pagingId_ = value; onChanged(); return this; } /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return This builder for chaining. */ public Builder clearPagingId() { pagingId_ = getDefaultInstance().getPagingId(); onChanged(); return this; } /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @param value The bytes for pagingId to set. * @return This builder for chaining. */ public Builder setPagingIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pagingId_ = value; onChanged(); return this; } private Object cursor_ = ""; /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return The cursor. */ public String getCursor() { Object ref = cursor_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); cursor_ = s; return s; } else { return (String) ref; } } /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return The bytes for cursor. */ public com.google.protobuf.ByteString getCursorBytes() { Object ref = cursor_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); cursor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @param value The cursor to set. * @return This builder for chaining. */ public Builder setCursor( String value) { if (value == null) { throw new NullPointerException(); } cursor_ = value; onChanged(); return this; } /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return This builder for chaining. */ public Builder clearCursor() { cursor_ = getDefaultInstance().getCursor(); onChanged(); return this; } /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</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; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.PagingInfo) } // @@protoc_insertion_point(class_scope:delivery.PagingInfo) private static final PagingInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new PagingInfo(); } public static PagingInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<PagingInfo> PARSER = new com.google.protobuf.AbstractParser<PagingInfo>() { @Override public PagingInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PagingInfo(input, extensionRegistry); } }; public static com.google.protobuf.Parser<PagingInfo> parser() { return PARSER; } @Override public com.google.protobuf.Parser<PagingInfo> getParserForType() { return PARSER; } @Override public PagingInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/PagingInfoOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; public interface PagingInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.PagingInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return The pagingId. */ String getPagingId(); /** * <pre> * Opaque identifier to be used in subsequent paging requests for a specific * paged repsonse set. * </pre> * * <code>string paging_id = 1;</code> * @return The bytes for pagingId. */ com.google.protobuf.ByteString getPagingIdBytes(); /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return The cursor. */ String getCursor(); /** * <pre> * Opaque token that represents the last item index of this response. * </pre> * * <code>string cursor = 2;</code> * @return The bytes for cursor. */ com.google.protobuf.ByteString getCursorBytes(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/PagingOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; public interface PagingOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.Paging) com.google.protobuf.MessageOrBuilder { /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return The pagingId. */ String getPagingId(); /** * <pre> * Identity for the paging request (opaque token). * A single paging_id will have many associated requests to get the fully * paged response set (hence, many request_id's and client_request_id's). * Required if using the cursor for the last_index; optional if using offset. * Setting this value provides better paging consistency/stability. Ideally, * it should be set from the initial paging response * (Response.paging_info.paging_id). * An external value can be used when *not* using promoted.ai's item * datastore. The value must be specific enough to be globally unique, yet * general enough to ignore paging parameters. A good example of a useful, * externally set paging_id is to use the paging token or identifiers returned * by your item datastore retrieval while passing the eligible insertions in * the Request. If in doubt, rely on the Response.paging_info.paging_id or * contact us. * </pre> * * <code>string paging_id = 1;</code> * @return The bytes for pagingId. */ com.google.protobuf.ByteString getPagingIdBytes(); /** * <pre> * Required. The number of items (insertions) to return. * </pre> * * <code>int32 size = 2;</code> * @return The size. */ int getSize(); /** * <code>string cursor = 3;</code> * @return Whether the cursor field is set. */ boolean hasCursor(); /** * <code>string cursor = 3;</code> * @return The cursor. */ String getCursor(); /** * <code>string cursor = 3;</code> * @return The bytes for cursor. */ com.google.protobuf.ByteString getCursorBytes(); /** * <code>int32 offset = 4;</code> * @return Whether the offset field is set. */ boolean hasOffset(); /** * <code>int32 offset = 4;</code> * @return The offset. */ int getOffset(); public Paging.StartingCase getStartingCase(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/PositiveRule.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code delivery.PositiveRule} */ public final class PositiveRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.PositiveRule) PositiveRuleOrBuilder { private static final long serialVersionUID = 0L; // Use PositiveRule.newBuilder() to construct. private PositiveRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private PositiveRule() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new PositiveRule(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PositiveRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 9: { bitField0_ |= 0x00000001; selectPct_ = input.readDouble(); break; } case 16: { bitField0_ |= 0x00000002; minPos_ = input.readUInt64(); break; } case 24: { bitField0_ |= 0x00000004; maxPos_ = input.readUInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_PositiveRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_PositiveRule_fieldAccessorTable .ensureFieldAccessorsInitialized( PositiveRule.class, Builder.class); } private int bitField0_; public static final int SELECT_PCT_FIELD_NUMBER = 1; private double selectPct_; /** * <code>double select_pct = 1;</code> * @return Whether the selectPct field is set. */ @Override public boolean hasSelectPct() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double select_pct = 1;</code> * @return The selectPct. */ @Override public double getSelectPct() { return selectPct_; } public static final int MIN_POS_FIELD_NUMBER = 2; private long minPos_; /** * <code>uint64 min_pos = 2;</code> * @return Whether the minPos field is set. */ @Override public boolean hasMinPos() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>uint64 min_pos = 2;</code> * @return The minPos. */ @Override public long getMinPos() { return minPos_; } public static final int MAX_POS_FIELD_NUMBER = 3; private long maxPos_; /** * <code>uint64 max_pos = 3;</code> * @return Whether the maxPos field is set. */ @Override public boolean hasMaxPos() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>uint64 max_pos = 3;</code> * @return The maxPos. */ @Override public long getMaxPos() { return maxPos_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(1, selectPct_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(2, minPos_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeUInt64(3, maxPos_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, selectPct_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, minPos_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, maxPos_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof PositiveRule)) { return super.equals(obj); } PositiveRule other = (PositiveRule) obj; if (hasSelectPct() != other.hasSelectPct()) return false; if (hasSelectPct()) { if (Double.doubleToLongBits(getSelectPct()) != Double.doubleToLongBits( other.getSelectPct())) return false; } if (hasMinPos() != other.hasMinPos()) return false; if (hasMinPos()) { if (getMinPos() != other.getMinPos()) return false; } if (hasMaxPos() != other.hasMaxPos()) return false; if (hasMaxPos()) { if (getMaxPos() != other.getMaxPos()) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSelectPct()) { hash = (37 * hash) + SELECT_PCT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getSelectPct())); } if (hasMinPos()) { hash = (37 * hash) + MIN_POS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinPos()); } if (hasMaxPos()) { hash = (37 * hash) + MAX_POS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxPos()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static PositiveRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static PositiveRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static PositiveRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static PositiveRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static PositiveRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static PositiveRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static PositiveRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static PositiveRule 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 PositiveRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static PositiveRule 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 PositiveRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static PositiveRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(PositiveRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code delivery.PositiveRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.PositiveRule) PositiveRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_PositiveRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_PositiveRule_fieldAccessorTable .ensureFieldAccessorsInitialized( PositiveRule.class, Builder.class); } // Construct using ai.promoted.proto.delivery.PositiveRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); selectPct_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); minPos_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); maxPos_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_PositiveRule_descriptor; } @Override public PositiveRule getDefaultInstanceForType() { return PositiveRule.getDefaultInstance(); } @Override public PositiveRule build() { PositiveRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public PositiveRule buildPartial() { PositiveRule result = new PositiveRule(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.selectPct_ = selectPct_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.minPos_ = minPos_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.maxPos_ = maxPos_; to_bitField0_ |= 0x00000004; } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof PositiveRule) { return mergeFrom((PositiveRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(PositiveRule other) { if (other == PositiveRule.getDefaultInstance()) return this; if (other.hasSelectPct()) { setSelectPct(other.getSelectPct()); } if (other.hasMinPos()) { setMinPos(other.getMinPos()); } if (other.hasMaxPos()) { setMaxPos(other.getMaxPos()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { PositiveRule parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (PositiveRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private double selectPct_ ; /** * <code>double select_pct = 1;</code> * @return Whether the selectPct field is set. */ @Override public boolean hasSelectPct() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>double select_pct = 1;</code> * @return The selectPct. */ @Override public double getSelectPct() { return selectPct_; } /** * <code>double select_pct = 1;</code> * @param value The selectPct to set. * @return This builder for chaining. */ public Builder setSelectPct(double value) { bitField0_ |= 0x00000001; selectPct_ = value; onChanged(); return this; } /** * <code>double select_pct = 1;</code> * @return This builder for chaining. */ public Builder clearSelectPct() { bitField0_ = (bitField0_ & ~0x00000001); selectPct_ = 0D; onChanged(); return this; } private long minPos_ ; /** * <code>uint64 min_pos = 2;</code> * @return Whether the minPos field is set. */ @Override public boolean hasMinPos() { return ((bitField0_ & 0x00000002) != 0); } /** * <code>uint64 min_pos = 2;</code> * @return The minPos. */ @Override public long getMinPos() { return minPos_; } /** * <code>uint64 min_pos = 2;</code> * @param value The minPos to set. * @return This builder for chaining. */ public Builder setMinPos(long value) { bitField0_ |= 0x00000002; minPos_ = value; onChanged(); return this; } /** * <code>uint64 min_pos = 2;</code> * @return This builder for chaining. */ public Builder clearMinPos() { bitField0_ = (bitField0_ & ~0x00000002); minPos_ = 0L; onChanged(); return this; } private long maxPos_ ; /** * <code>uint64 max_pos = 3;</code> * @return Whether the maxPos field is set. */ @Override public boolean hasMaxPos() { return ((bitField0_ & 0x00000004) != 0); } /** * <code>uint64 max_pos = 3;</code> * @return The maxPos. */ @Override public long getMaxPos() { return maxPos_; } /** * <code>uint64 max_pos = 3;</code> * @param value The maxPos to set. * @return This builder for chaining. */ public Builder setMaxPos(long value) { bitField0_ |= 0x00000004; maxPos_ = value; onChanged(); return this; } /** * <code>uint64 max_pos = 3;</code> * @return This builder for chaining. */ public Builder clearMaxPos() { bitField0_ = (bitField0_ & ~0x00000004); maxPos_ = 0L; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.PositiveRule) } // @@protoc_insertion_point(class_scope:delivery.PositiveRule) private static final PositiveRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new PositiveRule(); } public static PositiveRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<PositiveRule> PARSER = new com.google.protobuf.AbstractParser<PositiveRule>() { @Override public PositiveRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PositiveRule(input, extensionRegistry); } }; public static com.google.protobuf.Parser<PositiveRule> parser() { return PARSER; } @Override public com.google.protobuf.Parser<PositiveRule> getParserForType() { return PARSER; } @Override public PositiveRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/PositiveRuleOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface PositiveRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.PositiveRule) com.google.protobuf.MessageOrBuilder { /** * <code>double select_pct = 1;</code> * @return Whether the selectPct field is set. */ boolean hasSelectPct(); /** * <code>double select_pct = 1;</code> * @return The selectPct. */ double getSelectPct(); /** * <code>uint64 min_pos = 2;</code> * @return Whether the minPos field is set. */ boolean hasMinPos(); /** * <code>uint64 min_pos = 2;</code> * @return The minPos. */ long getMinPos(); /** * <code>uint64 max_pos = 3;</code> * @return Whether the maxPos field is set. */ boolean hasMaxPos(); /** * <code>uint64 max_pos = 3;</code> * @return The maxPos. */ long getMaxPos(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/QualityScoreConfig.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * See: https://github.com/promotedai/qualityscore * Next ID = 2. * </pre> * * Protobuf type {@code delivery.QualityScoreConfig} */ public final class QualityScoreConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.QualityScoreConfig) QualityScoreConfigOrBuilder { private static final long serialVersionUID = 0L; // Use QualityScoreConfig.newBuilder() to construct. private QualityScoreConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private QualityScoreConfig() { weightedSumTerm_ = java.util.Collections.emptyList(); } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new QualityScoreConfig(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private QualityScoreConfig( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { weightedSumTerm_ = new java.util.ArrayList<QualityScoreTerm>(); mutable_bitField0_ |= 0x00000001; } weightedSumTerm_.add( input.readMessage(QualityScoreTerm.parser(), extensionRegistry)); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { weightedSumTerm_ = java.util.Collections.unmodifiableList(weightedSumTerm_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_QualityScoreConfig_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_QualityScoreConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( QualityScoreConfig.class, Builder.class); } public static final int WEIGHTED_SUM_TERM_FIELD_NUMBER = 1; private java.util.List<QualityScoreTerm> weightedSumTerm_; /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ @Override public java.util.List<QualityScoreTerm> getWeightedSumTermList() { return weightedSumTerm_; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ @Override public java.util.List<? extends QualityScoreTermOrBuilder> getWeightedSumTermOrBuilderList() { return weightedSumTerm_; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ @Override public int getWeightedSumTermCount() { return weightedSumTerm_.size(); } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ @Override public QualityScoreTerm getWeightedSumTerm(int index) { return weightedSumTerm_.get(index); } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ @Override public QualityScoreTermOrBuilder getWeightedSumTermOrBuilder( int index) { return weightedSumTerm_.get(index); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < weightedSumTerm_.size(); i++) { output.writeMessage(1, weightedSumTerm_.get(i)); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < weightedSumTerm_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, weightedSumTerm_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof QualityScoreConfig)) { return super.equals(obj); } QualityScoreConfig other = (QualityScoreConfig) obj; if (!getWeightedSumTermList() .equals(other.getWeightedSumTermList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getWeightedSumTermCount() > 0) { hash = (37 * hash) + WEIGHTED_SUM_TERM_FIELD_NUMBER; hash = (53 * hash) + getWeightedSumTermList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static QualityScoreConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QualityScoreConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QualityScoreConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QualityScoreConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QualityScoreConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QualityScoreConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QualityScoreConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static QualityScoreConfig 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 QualityScoreConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static QualityScoreConfig 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 QualityScoreConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static QualityScoreConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(QualityScoreConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * See: https://github.com/promotedai/qualityscore * Next ID = 2. * </pre> * * Protobuf type {@code delivery.QualityScoreConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.QualityScoreConfig) QualityScoreConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_QualityScoreConfig_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_QualityScoreConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( QualityScoreConfig.class, Builder.class); } // Construct using ai.promoted.proto.delivery.QualityScoreConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getWeightedSumTermFieldBuilder(); } } @Override public Builder clear() { super.clear(); if (weightedSumTermBuilder_ == null) { weightedSumTerm_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { weightedSumTermBuilder_.clear(); } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_QualityScoreConfig_descriptor; } @Override public QualityScoreConfig getDefaultInstanceForType() { return QualityScoreConfig.getDefaultInstance(); } @Override public QualityScoreConfig build() { QualityScoreConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public QualityScoreConfig buildPartial() { QualityScoreConfig result = new QualityScoreConfig(this); int from_bitField0_ = bitField0_; if (weightedSumTermBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { weightedSumTerm_ = java.util.Collections.unmodifiableList(weightedSumTerm_); bitField0_ = (bitField0_ & ~0x00000001); } result.weightedSumTerm_ = weightedSumTerm_; } else { result.weightedSumTerm_ = weightedSumTermBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof QualityScoreConfig) { return mergeFrom((QualityScoreConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(QualityScoreConfig other) { if (other == QualityScoreConfig.getDefaultInstance()) return this; if (weightedSumTermBuilder_ == null) { if (!other.weightedSumTerm_.isEmpty()) { if (weightedSumTerm_.isEmpty()) { weightedSumTerm_ = other.weightedSumTerm_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureWeightedSumTermIsMutable(); weightedSumTerm_.addAll(other.weightedSumTerm_); } onChanged(); } } else { if (!other.weightedSumTerm_.isEmpty()) { if (weightedSumTermBuilder_.isEmpty()) { weightedSumTermBuilder_.dispose(); weightedSumTermBuilder_ = null; weightedSumTerm_ = other.weightedSumTerm_; bitField0_ = (bitField0_ & ~0x00000001); weightedSumTermBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWeightedSumTermFieldBuilder() : null; } else { weightedSumTermBuilder_.addAllMessages(other.weightedSumTerm_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { QualityScoreConfig parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (QualityScoreConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<QualityScoreTerm> weightedSumTerm_ = java.util.Collections.emptyList(); private void ensureWeightedSumTermIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { weightedSumTerm_ = new java.util.ArrayList<QualityScoreTerm>(weightedSumTerm_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< QualityScoreTerm, QualityScoreTerm.Builder, QualityScoreTermOrBuilder> weightedSumTermBuilder_; /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public java.util.List<QualityScoreTerm> getWeightedSumTermList() { if (weightedSumTermBuilder_ == null) { return java.util.Collections.unmodifiableList(weightedSumTerm_); } else { return weightedSumTermBuilder_.getMessageList(); } } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public int getWeightedSumTermCount() { if (weightedSumTermBuilder_ == null) { return weightedSumTerm_.size(); } else { return weightedSumTermBuilder_.getCount(); } } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public QualityScoreTerm getWeightedSumTerm(int index) { if (weightedSumTermBuilder_ == null) { return weightedSumTerm_.get(index); } else { return weightedSumTermBuilder_.getMessage(index); } } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder setWeightedSumTerm( int index, QualityScoreTerm value) { if (weightedSumTermBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWeightedSumTermIsMutable(); weightedSumTerm_.set(index, value); onChanged(); } else { weightedSumTermBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder setWeightedSumTerm( int index, QualityScoreTerm.Builder builderForValue) { if (weightedSumTermBuilder_ == null) { ensureWeightedSumTermIsMutable(); weightedSumTerm_.set(index, builderForValue.build()); onChanged(); } else { weightedSumTermBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder addWeightedSumTerm(QualityScoreTerm value) { if (weightedSumTermBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWeightedSumTermIsMutable(); weightedSumTerm_.add(value); onChanged(); } else { weightedSumTermBuilder_.addMessage(value); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder addWeightedSumTerm( int index, QualityScoreTerm value) { if (weightedSumTermBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWeightedSumTermIsMutable(); weightedSumTerm_.add(index, value); onChanged(); } else { weightedSumTermBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder addWeightedSumTerm( QualityScoreTerm.Builder builderForValue) { if (weightedSumTermBuilder_ == null) { ensureWeightedSumTermIsMutable(); weightedSumTerm_.add(builderForValue.build()); onChanged(); } else { weightedSumTermBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder addWeightedSumTerm( int index, QualityScoreTerm.Builder builderForValue) { if (weightedSumTermBuilder_ == null) { ensureWeightedSumTermIsMutable(); weightedSumTerm_.add(index, builderForValue.build()); onChanged(); } else { weightedSumTermBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder addAllWeightedSumTerm( Iterable<? extends QualityScoreTerm> values) { if (weightedSumTermBuilder_ == null) { ensureWeightedSumTermIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, weightedSumTerm_); onChanged(); } else { weightedSumTermBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder clearWeightedSumTerm() { if (weightedSumTermBuilder_ == null) { weightedSumTerm_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { weightedSumTermBuilder_.clear(); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public Builder removeWeightedSumTerm(int index) { if (weightedSumTermBuilder_ == null) { ensureWeightedSumTermIsMutable(); weightedSumTerm_.remove(index); onChanged(); } else { weightedSumTermBuilder_.remove(index); } return this; } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public QualityScoreTerm.Builder getWeightedSumTermBuilder( int index) { return getWeightedSumTermFieldBuilder().getBuilder(index); } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public QualityScoreTermOrBuilder getWeightedSumTermOrBuilder( int index) { if (weightedSumTermBuilder_ == null) { return weightedSumTerm_.get(index); } else { return weightedSumTermBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public java.util.List<? extends QualityScoreTermOrBuilder> getWeightedSumTermOrBuilderList() { if (weightedSumTermBuilder_ != null) { return weightedSumTermBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(weightedSumTerm_); } } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public QualityScoreTerm.Builder addWeightedSumTermBuilder() { return getWeightedSumTermFieldBuilder().addBuilder( QualityScoreTerm.getDefaultInstance()); } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public QualityScoreTerm.Builder addWeightedSumTermBuilder( int index) { return getWeightedSumTermFieldBuilder().addBuilder( index, QualityScoreTerm.getDefaultInstance()); } /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ public java.util.List<QualityScoreTerm.Builder> getWeightedSumTermBuilderList() { return getWeightedSumTermFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< QualityScoreTerm, QualityScoreTerm.Builder, QualityScoreTermOrBuilder> getWeightedSumTermFieldBuilder() { if (weightedSumTermBuilder_ == null) { weightedSumTermBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< QualityScoreTerm, QualityScoreTerm.Builder, QualityScoreTermOrBuilder>( weightedSumTerm_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); weightedSumTerm_ = null; } return weightedSumTermBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.QualityScoreConfig) } // @@protoc_insertion_point(class_scope:delivery.QualityScoreConfig) private static final QualityScoreConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new QualityScoreConfig(); } public static QualityScoreConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<QualityScoreConfig> PARSER = new com.google.protobuf.AbstractParser<QualityScoreConfig>() { @Override public QualityScoreConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QualityScoreConfig(input, extensionRegistry); } }; public static com.google.protobuf.Parser<QualityScoreConfig> parser() { return PARSER; } @Override public com.google.protobuf.Parser<QualityScoreConfig> getParserForType() { return PARSER; } @Override public QualityScoreConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/QualityScoreConfigOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface QualityScoreConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.QualityScoreConfig) com.google.protobuf.MessageOrBuilder { /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ java.util.List<QualityScoreTerm> getWeightedSumTermList(); /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ QualityScoreTerm getWeightedSumTerm(int index); /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ int getWeightedSumTermCount(); /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ java.util.List<? extends QualityScoreTermOrBuilder> getWeightedSumTermOrBuilderList(); /** * <code>repeated .delivery.QualityScoreTerm weighted_sum_term = 1;</code> */ QualityScoreTermOrBuilder getWeightedSumTermOrBuilder( int index); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/QualityScoreTerm.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 14. * </pre> * * Protobuf type {@code delivery.QualityScoreTerm} */ public final class QualityScoreTerm extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.QualityScoreTerm) QualityScoreTermOrBuilder { private static final long serialVersionUID = 0L; // Use QualityScoreTerm.newBuilder() to construct. private QualityScoreTerm(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private QualityScoreTerm() { } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new QualityScoreTerm(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private QualityScoreTerm( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); fetchMethodCase_ = 1; fetchMethod_ = s; break; } case 18: { NormalDistribution.Builder subBuilder = null; if (fetchMethodCase_ == 2) { subBuilder = ((NormalDistribution) fetchMethod_).toBuilder(); } fetchMethod_ = input.readMessage(NormalDistribution.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((NormalDistribution) fetchMethod_); fetchMethod_ = subBuilder.buildPartial(); } fetchMethodCase_ = 2; break; } case 24: { fetchMethodCase_ = 3; fetchMethod_ = input.readBool(); break; } case 81: { bitField0_ |= 0x00000001; fetchHigh_ = input.readDouble(); break; } case 89: { bitField0_ |= 0x00000002; fetchLow_ = input.readDouble(); break; } case 97: { weight_ = input.readDouble(); break; } case 105: { offset_ = input.readDouble(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_QualityScoreTerm_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_QualityScoreTerm_fieldAccessorTable .ensureFieldAccessorsInitialized( QualityScoreTerm.class, Builder.class); } private int bitField0_; private int fetchMethodCase_ = 0; private Object fetchMethod_; public enum FetchMethodCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { ATTRIBUTE_NAME(1), RANDOM_NORMAL(2), ONES(3), FETCHMETHOD_NOT_SET(0); private final int value; private FetchMethodCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static FetchMethodCase valueOf(int value) { return forNumber(value); } public static FetchMethodCase forNumber(int value) { switch (value) { case 1: return ATTRIBUTE_NAME; case 2: return RANDOM_NORMAL; case 3: return ONES; case 0: return FETCHMETHOD_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public FetchMethodCase getFetchMethodCase() { return FetchMethodCase.forNumber( fetchMethodCase_); } public static final int ATTRIBUTE_NAME_FIELD_NUMBER = 1; /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return Whether the attributeName field is set. */ public boolean hasAttributeName() { return fetchMethodCase_ == 1; } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return The attributeName. */ public String getAttributeName() { Object ref = ""; if (fetchMethodCase_ == 1) { ref = fetchMethod_; } if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (fetchMethodCase_ == 1) { fetchMethod_ = s; } return s; } } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return The bytes for attributeName. */ public com.google.protobuf.ByteString getAttributeNameBytes() { Object ref = ""; if (fetchMethodCase_ == 1) { ref = fetchMethod_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); if (fetchMethodCase_ == 1) { fetchMethod_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RANDOM_NORMAL_FIELD_NUMBER = 2; /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> * @return Whether the randomNormal field is set. */ @Override public boolean hasRandomNormal() { return fetchMethodCase_ == 2; } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> * @return The randomNormal. */ @Override public NormalDistribution getRandomNormal() { if (fetchMethodCase_ == 2) { return (NormalDistribution) fetchMethod_; } return NormalDistribution.getDefaultInstance(); } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ @Override public NormalDistributionOrBuilder getRandomNormalOrBuilder() { if (fetchMethodCase_ == 2) { return (NormalDistribution) fetchMethod_; } return NormalDistribution.getDefaultInstance(); } public static final int ONES_FIELD_NUMBER = 3; /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return Whether the ones field is set. */ @Override public boolean hasOnes() { return fetchMethodCase_ == 3; } /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return The ones. */ @Override public boolean getOnes() { if (fetchMethodCase_ == 3) { return (Boolean) fetchMethod_; } return false; } public static final int FETCH_HIGH_FIELD_NUMBER = 10; private double fetchHigh_; /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return Whether the fetchHigh field is set. */ @Override public boolean hasFetchHigh() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return The fetchHigh. */ @Override public double getFetchHigh() { return fetchHigh_; } public static final int FETCH_LOW_FIELD_NUMBER = 11; private double fetchLow_; /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return Whether the fetchLow field is set. */ @Override public boolean hasFetchLow() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return The fetchLow. */ @Override public double getFetchLow() { return fetchLow_; } public static final int WEIGHT_FIELD_NUMBER = 12; private double weight_; /** * <pre> * Multiply by this value. default =1 (no multiply). * </pre> * * <code>double weight = 12;</code> * @return The weight. */ @Override public double getWeight() { return weight_; } public static final int OFFSET_FIELD_NUMBER = 13; private double offset_; /** * <pre> * Add by this value. default = 0 (no addition) * </pre> * * <code>double offset = 13;</code> * @return The offset. */ @Override public double getOffset() { return offset_; } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (fetchMethodCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fetchMethod_); } if (fetchMethodCase_ == 2) { output.writeMessage(2, (NormalDistribution) fetchMethod_); } if (fetchMethodCase_ == 3) { output.writeBool( 3, (boolean)((Boolean) fetchMethod_)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(10, fetchHigh_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeDouble(11, fetchLow_); } if (weight_ != 0D) { output.writeDouble(12, weight_); } if (offset_ != 0D) { output.writeDouble(13, offset_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (fetchMethodCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fetchMethod_); } if (fetchMethodCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (NormalDistribution) fetchMethod_); } if (fetchMethodCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeBoolSize( 3, (boolean)((Boolean) fetchMethod_)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(10, fetchHigh_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(11, fetchLow_); } if (weight_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(12, weight_); } if (offset_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(13, offset_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof QualityScoreTerm)) { return super.equals(obj); } QualityScoreTerm other = (QualityScoreTerm) obj; if (hasFetchHigh() != other.hasFetchHigh()) return false; if (hasFetchHigh()) { if (Double.doubleToLongBits(getFetchHigh()) != Double.doubleToLongBits( other.getFetchHigh())) return false; } if (hasFetchLow() != other.hasFetchLow()) return false; if (hasFetchLow()) { if (Double.doubleToLongBits(getFetchLow()) != Double.doubleToLongBits( other.getFetchLow())) return false; } if (Double.doubleToLongBits(getWeight()) != Double.doubleToLongBits( other.getWeight())) return false; if (Double.doubleToLongBits(getOffset()) != Double.doubleToLongBits( other.getOffset())) return false; if (!getFetchMethodCase().equals(other.getFetchMethodCase())) return false; switch (fetchMethodCase_) { case 1: if (!getAttributeName() .equals(other.getAttributeName())) return false; break; case 2: if (!getRandomNormal() .equals(other.getRandomNormal())) return false; break; case 3: if (getOnes() != other.getOnes()) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasFetchHigh()) { hash = (37 * hash) + FETCH_HIGH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getFetchHigh())); } if (hasFetchLow()) { hash = (37 * hash) + FETCH_LOW_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getFetchLow())); } hash = (37 * hash) + WEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getWeight())); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getOffset())); switch (fetchMethodCase_) { case 1: hash = (37 * hash) + ATTRIBUTE_NAME_FIELD_NUMBER; hash = (53 * hash) + getAttributeName().hashCode(); break; case 2: hash = (37 * hash) + RANDOM_NORMAL_FIELD_NUMBER; hash = (53 * hash) + getRandomNormal().hashCode(); break; case 3: hash = (37 * hash) + ONES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getOnes()); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static QualityScoreTerm parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QualityScoreTerm parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QualityScoreTerm parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QualityScoreTerm parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QualityScoreTerm parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static QualityScoreTerm parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static QualityScoreTerm parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static QualityScoreTerm 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 QualityScoreTerm parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static QualityScoreTerm 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 QualityScoreTerm parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static QualityScoreTerm parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(QualityScoreTerm prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 14. * </pre> * * Protobuf type {@code delivery.QualityScoreTerm} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.QualityScoreTerm) QualityScoreTermOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Blender.internal_static_delivery_QualityScoreTerm_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Blender.internal_static_delivery_QualityScoreTerm_fieldAccessorTable .ensureFieldAccessorsInitialized( QualityScoreTerm.class, Builder.class); } // Construct using ai.promoted.proto.delivery.QualityScoreTerm.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); fetchHigh_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); fetchLow_ = 0D; bitField0_ = (bitField0_ & ~0x00000002); weight_ = 0D; offset_ = 0D; fetchMethodCase_ = 0; fetchMethod_ = null; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Blender.internal_static_delivery_QualityScoreTerm_descriptor; } @Override public QualityScoreTerm getDefaultInstanceForType() { return QualityScoreTerm.getDefaultInstance(); } @Override public QualityScoreTerm build() { QualityScoreTerm result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public QualityScoreTerm buildPartial() { QualityScoreTerm result = new QualityScoreTerm(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (fetchMethodCase_ == 1) { result.fetchMethod_ = fetchMethod_; } if (fetchMethodCase_ == 2) { if (randomNormalBuilder_ == null) { result.fetchMethod_ = fetchMethod_; } else { result.fetchMethod_ = randomNormalBuilder_.build(); } } if (fetchMethodCase_ == 3) { result.fetchMethod_ = fetchMethod_; } if (((from_bitField0_ & 0x00000001) != 0)) { result.fetchHigh_ = fetchHigh_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.fetchLow_ = fetchLow_; to_bitField0_ |= 0x00000002; } result.weight_ = weight_; result.offset_ = offset_; result.bitField0_ = to_bitField0_; result.fetchMethodCase_ = fetchMethodCase_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof QualityScoreTerm) { return mergeFrom((QualityScoreTerm)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(QualityScoreTerm other) { if (other == QualityScoreTerm.getDefaultInstance()) return this; if (other.hasFetchHigh()) { setFetchHigh(other.getFetchHigh()); } if (other.hasFetchLow()) { setFetchLow(other.getFetchLow()); } if (other.getWeight() != 0D) { setWeight(other.getWeight()); } if (other.getOffset() != 0D) { setOffset(other.getOffset()); } switch (other.getFetchMethodCase()) { case ATTRIBUTE_NAME: { fetchMethodCase_ = 1; fetchMethod_ = other.fetchMethod_; onChanged(); break; } case RANDOM_NORMAL: { mergeRandomNormal(other.getRandomNormal()); break; } case ONES: { setOnes(other.getOnes()); break; } case FETCHMETHOD_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { QualityScoreTerm parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (QualityScoreTerm) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int fetchMethodCase_ = 0; private Object fetchMethod_; public FetchMethodCase getFetchMethodCase() { return FetchMethodCase.forNumber( fetchMethodCase_); } public Builder clearFetchMethod() { fetchMethodCase_ = 0; fetchMethod_ = null; onChanged(); return this; } private int bitField0_; /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return Whether the attributeName field is set. */ @Override public boolean hasAttributeName() { return fetchMethodCase_ == 1; } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return The attributeName. */ @Override public String getAttributeName() { Object ref = ""; if (fetchMethodCase_ == 1) { ref = fetchMethod_; } if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (fetchMethodCase_ == 1) { fetchMethod_ = s; } return s; } else { return (String) ref; } } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return The bytes for attributeName. */ @Override public com.google.protobuf.ByteString getAttributeNameBytes() { Object ref = ""; if (fetchMethodCase_ == 1) { ref = fetchMethod_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); if (fetchMethodCase_ == 1) { fetchMethod_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @param value The attributeName to set. * @return This builder for chaining. */ public Builder setAttributeName( String value) { if (value == null) { throw new NullPointerException(); } fetchMethodCase_ = 1; fetchMethod_ = value; onChanged(); return this; } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return This builder for chaining. */ public Builder clearAttributeName() { if (fetchMethodCase_ == 1) { fetchMethodCase_ = 0; fetchMethod_ = null; onChanged(); } return this; } /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @param value The bytes for attributeName to set. * @return This builder for chaining. */ public Builder setAttributeNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); fetchMethodCase_ = 1; fetchMethod_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< NormalDistribution, NormalDistribution.Builder, NormalDistributionOrBuilder> randomNormalBuilder_; /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> * @return Whether the randomNormal field is set. */ @Override public boolean hasRandomNormal() { return fetchMethodCase_ == 2; } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> * @return The randomNormal. */ @Override public NormalDistribution getRandomNormal() { if (randomNormalBuilder_ == null) { if (fetchMethodCase_ == 2) { return (NormalDistribution) fetchMethod_; } return NormalDistribution.getDefaultInstance(); } else { if (fetchMethodCase_ == 2) { return randomNormalBuilder_.getMessage(); } return NormalDistribution.getDefaultInstance(); } } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ public Builder setRandomNormal(NormalDistribution value) { if (randomNormalBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fetchMethod_ = value; onChanged(); } else { randomNormalBuilder_.setMessage(value); } fetchMethodCase_ = 2; return this; } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ public Builder setRandomNormal( NormalDistribution.Builder builderForValue) { if (randomNormalBuilder_ == null) { fetchMethod_ = builderForValue.build(); onChanged(); } else { randomNormalBuilder_.setMessage(builderForValue.build()); } fetchMethodCase_ = 2; return this; } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ public Builder mergeRandomNormal(NormalDistribution value) { if (randomNormalBuilder_ == null) { if (fetchMethodCase_ == 2 && fetchMethod_ != NormalDistribution.getDefaultInstance()) { fetchMethod_ = NormalDistribution.newBuilder((NormalDistribution) fetchMethod_) .mergeFrom(value).buildPartial(); } else { fetchMethod_ = value; } onChanged(); } else { if (fetchMethodCase_ == 2) { randomNormalBuilder_.mergeFrom(value); } randomNormalBuilder_.setMessage(value); } fetchMethodCase_ = 2; return this; } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ public Builder clearRandomNormal() { if (randomNormalBuilder_ == null) { if (fetchMethodCase_ == 2) { fetchMethodCase_ = 0; fetchMethod_ = null; onChanged(); } } else { if (fetchMethodCase_ == 2) { fetchMethodCase_ = 0; fetchMethod_ = null; } randomNormalBuilder_.clear(); } return this; } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ public NormalDistribution.Builder getRandomNormalBuilder() { return getRandomNormalFieldBuilder().getBuilder(); } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ @Override public NormalDistributionOrBuilder getRandomNormalOrBuilder() { if ((fetchMethodCase_ == 2) && (randomNormalBuilder_ != null)) { return randomNormalBuilder_.getMessageOrBuilder(); } else { if (fetchMethodCase_ == 2) { return (NormalDistribution) fetchMethod_; } return NormalDistribution.getDefaultInstance(); } } /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< NormalDistribution, NormalDistribution.Builder, NormalDistributionOrBuilder> getRandomNormalFieldBuilder() { if (randomNormalBuilder_ == null) { if (!(fetchMethodCase_ == 2)) { fetchMethod_ = NormalDistribution.getDefaultInstance(); } randomNormalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< NormalDistribution, NormalDistribution.Builder, NormalDistributionOrBuilder>( (NormalDistribution) fetchMethod_, getParentForChildren(), isClean()); fetchMethod_ = null; } fetchMethodCase_ = 2; onChanged();; return randomNormalBuilder_; } /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return Whether the ones field is set. */ public boolean hasOnes() { return fetchMethodCase_ == 3; } /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return The ones. */ public boolean getOnes() { if (fetchMethodCase_ == 3) { return (Boolean) fetchMethod_; } return false; } /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @param value The ones to set. * @return This builder for chaining. */ public Builder setOnes(boolean value) { fetchMethodCase_ = 3; fetchMethod_ = value; onChanged(); return this; } /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return This builder for chaining. */ public Builder clearOnes() { if (fetchMethodCase_ == 3) { fetchMethodCase_ = 0; fetchMethod_ = null; onChanged(); } return this; } private double fetchHigh_ ; /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return Whether the fetchHigh field is set. */ @Override public boolean hasFetchHigh() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return The fetchHigh. */ @Override public double getFetchHigh() { return fetchHigh_; } /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @param value The fetchHigh to set. * @return This builder for chaining. */ public Builder setFetchHigh(double value) { bitField0_ |= 0x00000001; fetchHigh_ = value; onChanged(); return this; } /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return This builder for chaining. */ public Builder clearFetchHigh() { bitField0_ = (bitField0_ & ~0x00000001); fetchHigh_ = 0D; onChanged(); return this; } private double fetchLow_ ; /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return Whether the fetchLow field is set. */ @Override public boolean hasFetchLow() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return The fetchLow. */ @Override public double getFetchLow() { return fetchLow_; } /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @param value The fetchLow to set. * @return This builder for chaining. */ public Builder setFetchLow(double value) { bitField0_ |= 0x00000002; fetchLow_ = value; onChanged(); return this; } /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return This builder for chaining. */ public Builder clearFetchLow() { bitField0_ = (bitField0_ & ~0x00000002); fetchLow_ = 0D; onChanged(); return this; } private double weight_ ; /** * <pre> * Multiply by this value. default =1 (no multiply). * </pre> * * <code>double weight = 12;</code> * @return The weight. */ @Override public double getWeight() { return weight_; } /** * <pre> * Multiply by this value. default =1 (no multiply). * </pre> * * <code>double weight = 12;</code> * @param value The weight to set. * @return This builder for chaining. */ public Builder setWeight(double value) { weight_ = value; onChanged(); return this; } /** * <pre> * Multiply by this value. default =1 (no multiply). * </pre> * * <code>double weight = 12;</code> * @return This builder for chaining. */ public Builder clearWeight() { weight_ = 0D; onChanged(); return this; } private double offset_ ; /** * <pre> * Add by this value. default = 0 (no addition) * </pre> * * <code>double offset = 13;</code> * @return The offset. */ @Override public double getOffset() { return offset_; } /** * <pre> * Add by this value. default = 0 (no addition) * </pre> * * <code>double offset = 13;</code> * @param value The offset to set. * @return This builder for chaining. */ public Builder setOffset(double value) { offset_ = value; onChanged(); return this; } /** * <pre> * Add by this value. default = 0 (no addition) * </pre> * * <code>double offset = 13;</code> * @return This builder for chaining. */ public Builder clearOffset() { offset_ = 0D; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.QualityScoreTerm) } // @@protoc_insertion_point(class_scope:delivery.QualityScoreTerm) private static final QualityScoreTerm DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new QualityScoreTerm(); } public static QualityScoreTerm getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<QualityScoreTerm> PARSER = new com.google.protobuf.AbstractParser<QualityScoreTerm>() { @Override public QualityScoreTerm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QualityScoreTerm(input, extensionRegistry); } }; public static com.google.protobuf.Parser<QualityScoreTerm> parser() { return PARSER; } @Override public com.google.protobuf.Parser<QualityScoreTerm> getParserForType() { return PARSER; } @Override public QualityScoreTerm getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/QualityScoreTermOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/blender.proto package ai.promoted.proto.delivery; public interface QualityScoreTermOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.QualityScoreTerm) com.google.protobuf.MessageOrBuilder { /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return Whether the attributeName field is set. */ boolean hasAttributeName(); /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return The attributeName. */ String getAttributeName(); /** * <pre> * A named vector provided from elsewhere. * </pre> * * <code>string attribute_name = 1;</code> * @return The bytes for attributeName. */ com.google.protobuf.ByteString getAttributeNameBytes(); /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> * @return Whether the randomNormal field is set. */ boolean hasRandomNormal(); /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> * @return The randomNormal. */ NormalDistribution getRandomNormal(); /** * <pre> * Randomly generated values from a normal distribution. * </pre> * * <code>.delivery.NormalDistribution random_normal = 2;</code> */ NormalDistributionOrBuilder getRandomNormalOrBuilder(); /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return Whether the ones field is set. */ boolean hasOnes(); /** * <pre> * A constant value of ones. Set to any constant with offset and/or weight. * Set to "true" to indicate that this option is set by convention. * </pre> * * <code>bool ones = 3;</code> * @return The ones. */ boolean getOnes(); /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return Whether the fetchHigh field is set. */ boolean hasFetchHigh(); /** * <pre> * Maximum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_high = 10;</code> * @return The fetchHigh. */ double getFetchHigh(); /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return Whether the fetchLow field is set. */ boolean hasFetchLow(); /** * <pre> * Minimum limit of underlying value (before weight and offset). * </pre> * * <code>double fetch_low = 11;</code> * @return The fetchLow. */ double getFetchLow(); /** * <pre> * Multiply by this value. default =1 (no multiply). * </pre> * * <code>double weight = 12;</code> * @return The weight. */ double getWeight(); /** * <pre> * Add by this value. default = 0 (no addition) * </pre> * * <code>double offset = 13;</code> * @return The offset. */ double getOffset(); public QualityScoreTerm.FetchMethodCase getFetchMethodCase(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/Request.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; /** * <pre> * Represents a Request for Insertions (Content). * Can be used to log existing ranking (not Promoted) or Promoted's Delivery * API requests. * Next ID = 19. * </pre> * * Protobuf type {@code delivery.Request} */ public final class Request extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.Request) RequestOrBuilder { private static final long serialVersionUID = 0L; // Use Request.newBuilder() to construct. private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Request() { requestId_ = ""; viewId_ = ""; sessionId_ = ""; clientRequestId_ = ""; useCase_ = 0; searchQuery_ = ""; insertion_ = java.util.Collections.emptyList(); } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Request(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Request( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { platformId_ = input.readUInt64(); break; } case 18: { ai.promoted.proto.common.UserInfo.Builder subBuilder = null; if (userInfo_ != null) { subBuilder = userInfo_.toBuilder(); } userInfo_ = input.readMessage(ai.promoted.proto.common.UserInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(userInfo_); userInfo_ = subBuilder.buildPartial(); } break; } case 26: { ai.promoted.proto.common.Timing.Builder subBuilder = null; if (timing_ != null) { subBuilder = timing_.toBuilder(); } timing_ = input.readMessage(ai.promoted.proto.common.Timing.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(timing_); timing_ = subBuilder.buildPartial(); } break; } case 34: { ai.promoted.proto.common.ClientInfo.Builder subBuilder = null; if (clientInfo_ != null) { subBuilder = clientInfo_.toBuilder(); } clientInfo_ = input.readMessage(ai.promoted.proto.common.ClientInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(clientInfo_); clientInfo_ = subBuilder.buildPartial(); } break; } case 50: { String s = input.readStringRequireUtf8(); requestId_ = s; break; } case 58: { String s = input.readStringRequireUtf8(); viewId_ = s; break; } case 66: { String s = input.readStringRequireUtf8(); sessionId_ = s; break; } case 72: { int rawValue = input.readEnum(); useCase_ = rawValue; break; } case 82: { String s = input.readStringRequireUtf8(); searchQuery_ = s; break; } case 90: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { insertion_ = new java.util.ArrayList<Insertion>(); mutable_bitField0_ |= 0x00000001; } insertion_.add( input.readMessage(Insertion.parser(), extensionRegistry)); break; } case 98: { ai.promoted.proto.delivery.BlenderConfig.Builder subBuilder = null; if (blenderConfig_ != null) { subBuilder = blenderConfig_.toBuilder(); } blenderConfig_ = input.readMessage(ai.promoted.proto.delivery.BlenderConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(blenderConfig_); blenderConfig_ = subBuilder.buildPartial(); } break; } case 106: { ai.promoted.proto.common.Properties.Builder subBuilder = null; if (properties_ != null) { subBuilder = properties_.toBuilder(); } properties_ = input.readMessage(ai.promoted.proto.common.Properties.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(properties_); properties_ = subBuilder.buildPartial(); } break; } case 114: { String s = input.readStringRequireUtf8(); clientRequestId_ = s; break; } case 138: { Paging.Builder subBuilder = null; if (paging_ != null) { subBuilder = paging_.toBuilder(); } paging_ = input.readMessage(Paging.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(paging_); paging_ = subBuilder.buildPartial(); } break; } case 146: { ai.promoted.proto.common.Device.Builder subBuilder = null; if (device_ != null) { subBuilder = device_.toBuilder(); } device_ = input.readMessage(ai.promoted.proto.common.Device.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(device_); device_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { insertion_ = java.util.Collections.unmodifiableList(insertion_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Request_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Request_fieldAccessorTable .ensureFieldAccessorsInitialized( Request.class, Builder.class); } public static final int PLATFORM_ID_FIELD_NUMBER = 1; private long platformId_; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } public static final int USER_INFO_FIELD_NUMBER = 2; private ai.promoted.proto.common.UserInfo userInfo_; /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ @Override public boolean hasUserInfo() { return userInfo_ != null; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ @Override public ai.promoted.proto.common.UserInfo getUserInfo() { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ @Override public ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder() { return getUserInfo(); } public static final int TIMING_FIELD_NUMBER = 3; private ai.promoted.proto.common.Timing timing_; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ @Override public boolean hasTiming() { return timing_ != null; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ @Override public ai.promoted.proto.common.Timing getTiming() { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ @Override public ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder() { return getTiming(); } public static final int CLIENT_INFO_FIELD_NUMBER = 4; private ai.promoted.proto.common.ClientInfo clientInfo_; /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ @Override public boolean hasClientInfo() { return clientInfo_ != null; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ @Override public ai.promoted.proto.common.ClientInfo getClientInfo() { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ @Override public ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder() { return getClientInfo(); } public static final int DEVICE_FIELD_NUMBER = 18; private ai.promoted.proto.common.Device device_; /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> * @return Whether the device field is set. */ @Override public boolean hasDevice() { return device_ != null; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> * @return The device. */ @Override public ai.promoted.proto.common.Device getDevice() { return device_ == null ? ai.promoted.proto.common.Device.getDefaultInstance() : device_; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ @Override public ai.promoted.proto.common.DeviceOrBuilder getDeviceOrBuilder() { return getDevice(); } public static final int REQUEST_ID_FIELD_NUMBER = 6; private volatile Object requestId_; /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return The requestId. */ @Override public String getRequestId() { Object ref = requestId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); requestId_ = s; return s; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return The bytes for requestId. */ @Override public com.google.protobuf.ByteString getRequestIdBytes() { Object ref = requestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); requestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VIEW_ID_FIELD_NUMBER = 7; private volatile Object viewId_; /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return The viewId. */ @Override public String getViewId() { Object ref = viewId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); viewId_ = s; return s; } } /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return The bytes for viewId. */ @Override public com.google.protobuf.ByteString getViewIdBytes() { Object ref = viewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); viewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SESSION_ID_FIELD_NUMBER = 8; private volatile Object sessionId_; /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The sessionId. */ @Override public String getSessionId() { Object ref = sessionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); sessionId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The bytes for sessionId. */ @Override public com.google.protobuf.ByteString getSessionIdBytes() { Object ref = sessionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); sessionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CLIENT_REQUEST_ID_FIELD_NUMBER = 14; private volatile Object clientRequestId_; /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return The clientRequestId. */ @Override public String getClientRequestId() { Object ref = clientRequestId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); clientRequestId_ = s; return s; } } /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return The bytes for clientRequestId. */ @Override public com.google.protobuf.ByteString getClientRequestIdBytes() { Object ref = clientRequestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); clientRequestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int USE_CASE_FIELD_NUMBER = 9; private int useCase_; /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return The enum numeric value on the wire for useCase. */ @Override public int getUseCaseValue() { return useCase_; } /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return The useCase. */ @Override public UseCase getUseCase() { @SuppressWarnings("deprecation") UseCase result = UseCase.valueOf(useCase_); return result == null ? UseCase.UNRECOGNIZED : result; } public static final int SEARCH_QUERY_FIELD_NUMBER = 10; private volatile Object searchQuery_; /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return The searchQuery. */ @Override public String getSearchQuery() { Object ref = searchQuery_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); searchQuery_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return The bytes for searchQuery. */ @Override public com.google.protobuf.ByteString getSearchQueryBytes() { Object ref = searchQuery_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); searchQuery_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PAGING_FIELD_NUMBER = 17; private Paging paging_; /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> * @return Whether the paging field is set. */ @Override public boolean hasPaging() { return paging_ != null; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> * @return The paging. */ @Override public Paging getPaging() { return paging_ == null ? Paging.getDefaultInstance() : paging_; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ @Override public PagingOrBuilder getPagingOrBuilder() { return getPaging(); } public static final int INSERTION_FIELD_NUMBER = 11; private java.util.List<Insertion> insertion_; /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ @Override public java.util.List<Insertion> getInsertionList() { return insertion_; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ @Override public java.util.List<? extends InsertionOrBuilder> getInsertionOrBuilderList() { return insertion_; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ @Override public int getInsertionCount() { return insertion_.size(); } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ @Override public Insertion getInsertion(int index) { return insertion_.get(index); } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ @Override public InsertionOrBuilder getInsertionOrBuilder( int index) { return insertion_.get(index); } public static final int BLENDER_CONFIG_FIELD_NUMBER = 12; private ai.promoted.proto.delivery.BlenderConfig blenderConfig_; /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> * @return Whether the blenderConfig field is set. */ @Override public boolean hasBlenderConfig() { return blenderConfig_ != null; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> * @return The blenderConfig. */ @Override public ai.promoted.proto.delivery.BlenderConfig getBlenderConfig() { return blenderConfig_ == null ? ai.promoted.proto.delivery.BlenderConfig.getDefaultInstance() : blenderConfig_; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ @Override public ai.promoted.proto.delivery.BlenderConfigOrBuilder getBlenderConfigOrBuilder() { return getBlenderConfig(); } public static final int PROPERTIES_FIELD_NUMBER = 13; private ai.promoted.proto.common.Properties properties_; /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> * @return Whether the properties field is set. */ @Override public boolean hasProperties() { return properties_ != null; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> * @return The properties. */ @Override public ai.promoted.proto.common.Properties getProperties() { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ @Override public ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder() { return getProperties(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (platformId_ != 0L) { output.writeUInt64(1, platformId_); } if (userInfo_ != null) { output.writeMessage(2, getUserInfo()); } if (timing_ != null) { output.writeMessage(3, getTiming()); } if (clientInfo_ != null) { output.writeMessage(4, getClientInfo()); } if (!getRequestIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, requestId_); } if (!getViewIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, viewId_); } if (!getSessionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, sessionId_); } if (useCase_ != UseCase.UNKNOWN_USE_CASE.getNumber()) { output.writeEnum(9, useCase_); } if (!getSearchQueryBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, searchQuery_); } for (int i = 0; i < insertion_.size(); i++) { output.writeMessage(11, insertion_.get(i)); } if (blenderConfig_ != null) { output.writeMessage(12, getBlenderConfig()); } if (properties_ != null) { output.writeMessage(13, getProperties()); } if (!getClientRequestIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, clientRequestId_); } if (paging_ != null) { output.writeMessage(17, getPaging()); } if (device_ != null) { output.writeMessage(18, getDevice()); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (platformId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, platformId_); } if (userInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getUserInfo()); } if (timing_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTiming()); } if (clientInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getClientInfo()); } if (!getRequestIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, requestId_); } if (!getViewIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, viewId_); } if (!getSessionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, sessionId_); } if (useCase_ != UseCase.UNKNOWN_USE_CASE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(9, useCase_); } if (!getSearchQueryBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, searchQuery_); } for (int i = 0; i < insertion_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, insertion_.get(i)); } if (blenderConfig_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, getBlenderConfig()); } if (properties_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(13, getProperties()); } if (!getClientRequestIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, clientRequestId_); } if (paging_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(17, getPaging()); } if (device_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(18, getDevice()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Request)) { return super.equals(obj); } Request other = (Request) obj; if (getPlatformId() != other.getPlatformId()) return false; if (hasUserInfo() != other.hasUserInfo()) return false; if (hasUserInfo()) { if (!getUserInfo() .equals(other.getUserInfo())) return false; } if (hasTiming() != other.hasTiming()) return false; if (hasTiming()) { if (!getTiming() .equals(other.getTiming())) return false; } if (hasClientInfo() != other.hasClientInfo()) return false; if (hasClientInfo()) { if (!getClientInfo() .equals(other.getClientInfo())) return false; } if (hasDevice() != other.hasDevice()) return false; if (hasDevice()) { if (!getDevice() .equals(other.getDevice())) return false; } if (!getRequestId() .equals(other.getRequestId())) return false; if (!getViewId() .equals(other.getViewId())) return false; if (!getSessionId() .equals(other.getSessionId())) return false; if (!getClientRequestId() .equals(other.getClientRequestId())) return false; if (useCase_ != other.useCase_) return false; if (!getSearchQuery() .equals(other.getSearchQuery())) return false; if (hasPaging() != other.hasPaging()) return false; if (hasPaging()) { if (!getPaging() .equals(other.getPaging())) return false; } if (!getInsertionList() .equals(other.getInsertionList())) return false; if (hasBlenderConfig() != other.hasBlenderConfig()) return false; if (hasBlenderConfig()) { if (!getBlenderConfig() .equals(other.getBlenderConfig())) return false; } if (hasProperties() != other.hasProperties()) return false; if (hasProperties()) { if (!getProperties() .equals(other.getProperties())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PLATFORM_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPlatformId()); if (hasUserInfo()) { hash = (37 * hash) + USER_INFO_FIELD_NUMBER; hash = (53 * hash) + getUserInfo().hashCode(); } if (hasTiming()) { hash = (37 * hash) + TIMING_FIELD_NUMBER; hash = (53 * hash) + getTiming().hashCode(); } if (hasClientInfo()) { hash = (37 * hash) + CLIENT_INFO_FIELD_NUMBER; hash = (53 * hash) + getClientInfo().hashCode(); } if (hasDevice()) { hash = (37 * hash) + DEVICE_FIELD_NUMBER; hash = (53 * hash) + getDevice().hashCode(); } hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VIEW_ID_FIELD_NUMBER; hash = (53 * hash) + getViewId().hashCode(); hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; hash = (53 * hash) + getSessionId().hashCode(); hash = (37 * hash) + CLIENT_REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getClientRequestId().hashCode(); hash = (37 * hash) + USE_CASE_FIELD_NUMBER; hash = (53 * hash) + useCase_; hash = (37 * hash) + SEARCH_QUERY_FIELD_NUMBER; hash = (53 * hash) + getSearchQuery().hashCode(); if (hasPaging()) { hash = (37 * hash) + PAGING_FIELD_NUMBER; hash = (53 * hash) + getPaging().hashCode(); } if (getInsertionCount() > 0) { hash = (37 * hash) + INSERTION_FIELD_NUMBER; hash = (53 * hash) + getInsertionList().hashCode(); } if (hasBlenderConfig()) { hash = (37 * hash) + BLENDER_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getBlenderConfig().hashCode(); } if (hasProperties()) { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getProperties().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Request parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Request parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Request parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Request parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Request parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Request parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Request parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Request 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 Request parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Request 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 Request parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Request parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Request prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Represents a Request for Insertions (Content). * Can be used to log existing ranking (not Promoted) or Promoted's Delivery * API requests. * Next ID = 19. * </pre> * * Protobuf type {@code delivery.Request} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.Request) RequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Request_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Request_fieldAccessorTable .ensureFieldAccessorsInitialized( Request.class, Builder.class); } // Construct using ai.promoted.proto.delivery.Request.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getInsertionFieldBuilder(); } } @Override public Builder clear() { super.clear(); platformId_ = 0L; if (userInfoBuilder_ == null) { userInfo_ = null; } else { userInfo_ = null; userInfoBuilder_ = null; } if (timingBuilder_ == null) { timing_ = null; } else { timing_ = null; timingBuilder_ = null; } if (clientInfoBuilder_ == null) { clientInfo_ = null; } else { clientInfo_ = null; clientInfoBuilder_ = null; } if (deviceBuilder_ == null) { device_ = null; } else { device_ = null; deviceBuilder_ = null; } requestId_ = ""; viewId_ = ""; sessionId_ = ""; clientRequestId_ = ""; useCase_ = 0; searchQuery_ = ""; if (pagingBuilder_ == null) { paging_ = null; } else { paging_ = null; pagingBuilder_ = null; } if (insertionBuilder_ == null) { insertion_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { insertionBuilder_.clear(); } if (blenderConfigBuilder_ == null) { blenderConfig_ = null; } else { blenderConfig_ = null; blenderConfigBuilder_ = null; } if (propertiesBuilder_ == null) { properties_ = null; } else { properties_ = null; propertiesBuilder_ = null; } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Delivery.internal_static_delivery_Request_descriptor; } @Override public Request getDefaultInstanceForType() { return Request.getDefaultInstance(); } @Override public Request build() { Request result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Request buildPartial() { Request result = new Request(this); int from_bitField0_ = bitField0_; result.platformId_ = platformId_; if (userInfoBuilder_ == null) { result.userInfo_ = userInfo_; } else { result.userInfo_ = userInfoBuilder_.build(); } if (timingBuilder_ == null) { result.timing_ = timing_; } else { result.timing_ = timingBuilder_.build(); } if (clientInfoBuilder_ == null) { result.clientInfo_ = clientInfo_; } else { result.clientInfo_ = clientInfoBuilder_.build(); } if (deviceBuilder_ == null) { result.device_ = device_; } else { result.device_ = deviceBuilder_.build(); } result.requestId_ = requestId_; result.viewId_ = viewId_; result.sessionId_ = sessionId_; result.clientRequestId_ = clientRequestId_; result.useCase_ = useCase_; result.searchQuery_ = searchQuery_; if (pagingBuilder_ == null) { result.paging_ = paging_; } else { result.paging_ = pagingBuilder_.build(); } if (insertionBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { insertion_ = java.util.Collections.unmodifiableList(insertion_); bitField0_ = (bitField0_ & ~0x00000001); } result.insertion_ = insertion_; } else { result.insertion_ = insertionBuilder_.build(); } if (blenderConfigBuilder_ == null) { result.blenderConfig_ = blenderConfig_; } else { result.blenderConfig_ = blenderConfigBuilder_.build(); } if (propertiesBuilder_ == null) { result.properties_ = properties_; } else { result.properties_ = propertiesBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Request) { return mergeFrom((Request)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Request other) { if (other == Request.getDefaultInstance()) return this; if (other.getPlatformId() != 0L) { setPlatformId(other.getPlatformId()); } if (other.hasUserInfo()) { mergeUserInfo(other.getUserInfo()); } if (other.hasTiming()) { mergeTiming(other.getTiming()); } if (other.hasClientInfo()) { mergeClientInfo(other.getClientInfo()); } if (other.hasDevice()) { mergeDevice(other.getDevice()); } if (!other.getRequestId().isEmpty()) { requestId_ = other.requestId_; onChanged(); } if (!other.getViewId().isEmpty()) { viewId_ = other.viewId_; onChanged(); } if (!other.getSessionId().isEmpty()) { sessionId_ = other.sessionId_; onChanged(); } if (!other.getClientRequestId().isEmpty()) { clientRequestId_ = other.clientRequestId_; onChanged(); } if (other.useCase_ != 0) { setUseCaseValue(other.getUseCaseValue()); } if (!other.getSearchQuery().isEmpty()) { searchQuery_ = other.searchQuery_; onChanged(); } if (other.hasPaging()) { mergePaging(other.getPaging()); } if (insertionBuilder_ == null) { if (!other.insertion_.isEmpty()) { if (insertion_.isEmpty()) { insertion_ = other.insertion_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureInsertionIsMutable(); insertion_.addAll(other.insertion_); } onChanged(); } } else { if (!other.insertion_.isEmpty()) { if (insertionBuilder_.isEmpty()) { insertionBuilder_.dispose(); insertionBuilder_ = null; insertion_ = other.insertion_; bitField0_ = (bitField0_ & ~0x00000001); insertionBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getInsertionFieldBuilder() : null; } else { insertionBuilder_.addAllMessages(other.insertion_); } } } if (other.hasBlenderConfig()) { mergeBlenderConfig(other.getBlenderConfig()); } if (other.hasProperties()) { mergeProperties(other.getProperties()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Request parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Request) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long platformId_ ; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @param value The platformId to set. * @return This builder for chaining. */ public Builder setPlatformId(long value) { platformId_ = value; onChanged(); return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return This builder for chaining. */ public Builder clearPlatformId() { platformId_ = 0L; onChanged(); return this; } private ai.promoted.proto.common.UserInfo userInfo_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder> userInfoBuilder_; /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ public boolean hasUserInfo() { return userInfoBuilder_ != null || userInfo_ != null; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ public ai.promoted.proto.common.UserInfo getUserInfo() { if (userInfoBuilder_ == null) { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } else { return userInfoBuilder_.getMessage(); } } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder setUserInfo(ai.promoted.proto.common.UserInfo value) { if (userInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } userInfo_ = value; onChanged(); } else { userInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder setUserInfo( ai.promoted.proto.common.UserInfo.Builder builderForValue) { if (userInfoBuilder_ == null) { userInfo_ = builderForValue.build(); onChanged(); } else { userInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder mergeUserInfo(ai.promoted.proto.common.UserInfo value) { if (userInfoBuilder_ == null) { if (userInfo_ != null) { userInfo_ = ai.promoted.proto.common.UserInfo.newBuilder(userInfo_).mergeFrom(value).buildPartial(); } else { userInfo_ = value; } onChanged(); } else { userInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder clearUserInfo() { if (userInfoBuilder_ == null) { userInfo_ = null; onChanged(); } else { userInfo_ = null; userInfoBuilder_ = null; } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public ai.promoted.proto.common.UserInfo.Builder getUserInfoBuilder() { onChanged(); return getUserInfoFieldBuilder().getBuilder(); } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder() { if (userInfoBuilder_ != null) { return userInfoBuilder_.getMessageOrBuilder(); } else { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder> getUserInfoFieldBuilder() { if (userInfoBuilder_ == null) { userInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder>( getUserInfo(), getParentForChildren(), isClean()); userInfo_ = null; } return userInfoBuilder_; } private ai.promoted.proto.common.Timing timing_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder> timingBuilder_; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ public boolean hasTiming() { return timingBuilder_ != null || timing_ != null; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ public ai.promoted.proto.common.Timing getTiming() { if (timingBuilder_ == null) { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } else { return timingBuilder_.getMessage(); } } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder setTiming(ai.promoted.proto.common.Timing value) { if (timingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timing_ = value; onChanged(); } else { timingBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder setTiming( ai.promoted.proto.common.Timing.Builder builderForValue) { if (timingBuilder_ == null) { timing_ = builderForValue.build(); onChanged(); } else { timingBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder mergeTiming(ai.promoted.proto.common.Timing value) { if (timingBuilder_ == null) { if (timing_ != null) { timing_ = ai.promoted.proto.common.Timing.newBuilder(timing_).mergeFrom(value).buildPartial(); } else { timing_ = value; } onChanged(); } else { timingBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder clearTiming() { if (timingBuilder_ == null) { timing_ = null; onChanged(); } else { timing_ = null; timingBuilder_ = null; } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public ai.promoted.proto.common.Timing.Builder getTimingBuilder() { onChanged(); return getTimingFieldBuilder().getBuilder(); } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder() { if (timingBuilder_ != null) { return timingBuilder_.getMessageOrBuilder(); } else { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder> getTimingFieldBuilder() { if (timingBuilder_ == null) { timingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder>( getTiming(), getParentForChildren(), isClean()); timing_ = null; } return timingBuilder_; } private ai.promoted.proto.common.ClientInfo clientInfo_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder> clientInfoBuilder_; /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ public boolean hasClientInfo() { return clientInfoBuilder_ != null || clientInfo_ != null; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ public ai.promoted.proto.common.ClientInfo getClientInfo() { if (clientInfoBuilder_ == null) { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } else { return clientInfoBuilder_.getMessage(); } } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder setClientInfo(ai.promoted.proto.common.ClientInfo value) { if (clientInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } clientInfo_ = value; onChanged(); } else { clientInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder setClientInfo( ai.promoted.proto.common.ClientInfo.Builder builderForValue) { if (clientInfoBuilder_ == null) { clientInfo_ = builderForValue.build(); onChanged(); } else { clientInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder mergeClientInfo(ai.promoted.proto.common.ClientInfo value) { if (clientInfoBuilder_ == null) { if (clientInfo_ != null) { clientInfo_ = ai.promoted.proto.common.ClientInfo.newBuilder(clientInfo_).mergeFrom(value).buildPartial(); } else { clientInfo_ = value; } onChanged(); } else { clientInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder clearClientInfo() { if (clientInfoBuilder_ == null) { clientInfo_ = null; onChanged(); } else { clientInfo_ = null; clientInfoBuilder_ = null; } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public ai.promoted.proto.common.ClientInfo.Builder getClientInfoBuilder() { onChanged(); return getClientInfoFieldBuilder().getBuilder(); } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder() { if (clientInfoBuilder_ != null) { return clientInfoBuilder_.getMessageOrBuilder(); } else { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder> getClientInfoFieldBuilder() { if (clientInfoBuilder_ == null) { clientInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder>( getClientInfo(), getParentForChildren(), isClean()); clientInfo_ = null; } return clientInfoBuilder_; } private ai.promoted.proto.common.Device device_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Device, ai.promoted.proto.common.Device.Builder, ai.promoted.proto.common.DeviceOrBuilder> deviceBuilder_; /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> * @return Whether the device field is set. */ public boolean hasDevice() { return deviceBuilder_ != null || device_ != null; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> * @return The device. */ public ai.promoted.proto.common.Device getDevice() { if (deviceBuilder_ == null) { return device_ == null ? ai.promoted.proto.common.Device.getDefaultInstance() : device_; } else { return deviceBuilder_.getMessage(); } } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ public Builder setDevice(ai.promoted.proto.common.Device value) { if (deviceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } device_ = value; onChanged(); } else { deviceBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ public Builder setDevice( ai.promoted.proto.common.Device.Builder builderForValue) { if (deviceBuilder_ == null) { device_ = builderForValue.build(); onChanged(); } else { deviceBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ public Builder mergeDevice(ai.promoted.proto.common.Device value) { if (deviceBuilder_ == null) { if (device_ != null) { device_ = ai.promoted.proto.common.Device.newBuilder(device_).mergeFrom(value).buildPartial(); } else { device_ = value; } onChanged(); } else { deviceBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ public Builder clearDevice() { if (deviceBuilder_ == null) { device_ = null; onChanged(); } else { device_ = null; deviceBuilder_ = null; } return this; } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ public ai.promoted.proto.common.Device.Builder getDeviceBuilder() { onChanged(); return getDeviceFieldBuilder().getBuilder(); } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ public ai.promoted.proto.common.DeviceOrBuilder getDeviceOrBuilder() { if (deviceBuilder_ != null) { return deviceBuilder_.getMessageOrBuilder(); } else { return device_ == null ? ai.promoted.proto.common.Device.getDefaultInstance() : device_; } } /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Device, ai.promoted.proto.common.Device.Builder, ai.promoted.proto.common.DeviceOrBuilder> getDeviceFieldBuilder() { if (deviceBuilder_ == null) { deviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Device, ai.promoted.proto.common.Device.Builder, ai.promoted.proto.common.DeviceOrBuilder>( getDevice(), getParentForChildren(), isClean()); device_ = null; } return deviceBuilder_; } private Object requestId_ = ""; /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return The requestId. */ public String getRequestId() { Object ref = requestId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); requestId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return The bytes for requestId. */ public com.google.protobuf.ByteString getRequestIdBytes() { Object ref = requestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); requestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @param value The requestId to set. * @return This builder for chaining. */ public Builder setRequestId( String value) { if (value == null) { throw new NullPointerException(); } requestId_ = value; onChanged(); return this; } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return This builder for chaining. */ public Builder clearRequestId() { requestId_ = getDefaultInstance().getRequestId(); onChanged(); return this; } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @param value The bytes for requestId to set. * @return This builder for chaining. */ public Builder setRequestIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); requestId_ = value; onChanged(); return this; } private Object viewId_ = ""; /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return The viewId. */ public String getViewId() { Object ref = viewId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); viewId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return The bytes for viewId. */ public com.google.protobuf.ByteString getViewIdBytes() { Object ref = viewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); viewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @param value The viewId to set. * @return This builder for chaining. */ public Builder setViewId( String value) { if (value == null) { throw new NullPointerException(); } viewId_ = value; onChanged(); return this; } /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return This builder for chaining. */ public Builder clearViewId() { viewId_ = getDefaultInstance().getViewId(); onChanged(); return this; } /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @param value The bytes for viewId to set. * @return This builder for chaining. */ public Builder setViewIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); viewId_ = value; onChanged(); return this; } private Object sessionId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The sessionId. */ public String getSessionId() { Object ref = sessionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); sessionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The bytes for sessionId. */ public com.google.protobuf.ByteString getSessionIdBytes() { Object ref = sessionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); sessionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @param value The sessionId to set. * @return This builder for chaining. */ public Builder setSessionId( String value) { if (value == null) { throw new NullPointerException(); } sessionId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return This builder for chaining. */ public Builder clearSessionId() { sessionId_ = getDefaultInstance().getSessionId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @param value The bytes for sessionId to set. * @return This builder for chaining. */ public Builder setSessionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sessionId_ = value; onChanged(); return this; } private Object clientRequestId_ = ""; /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return The clientRequestId. */ public String getClientRequestId() { Object ref = clientRequestId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); clientRequestId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return The bytes for clientRequestId. */ public com.google.protobuf.ByteString getClientRequestIdBytes() { Object ref = clientRequestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); clientRequestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @param value The clientRequestId to set. * @return This builder for chaining. */ public Builder setClientRequestId( String value) { if (value == null) { throw new NullPointerException(); } clientRequestId_ = value; onChanged(); return this; } /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return This builder for chaining. */ public Builder clearClientRequestId() { clientRequestId_ = getDefaultInstance().getClientRequestId(); onChanged(); return this; } /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @param value The bytes for clientRequestId to set. * @return This builder for chaining. */ public Builder setClientRequestIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); clientRequestId_ = value; onChanged(); return this; } private int useCase_ = 0; /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return The enum numeric value on the wire for useCase. */ @Override public int getUseCaseValue() { return useCase_; } /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @param value The enum numeric value on the wire for useCase to set. * @return This builder for chaining. */ public Builder setUseCaseValue(int value) { useCase_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return The useCase. */ @Override public UseCase getUseCase() { @SuppressWarnings("deprecation") UseCase result = UseCase.valueOf(useCase_); return result == null ? UseCase.UNRECOGNIZED : result; } /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @param value The useCase to set. * @return This builder for chaining. */ public Builder setUseCase(UseCase value) { if (value == null) { throw new NullPointerException(); } useCase_ = value.getNumber(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return This builder for chaining. */ public Builder clearUseCase() { useCase_ = 0; onChanged(); return this; } private Object searchQuery_ = ""; /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return The searchQuery. */ public String getSearchQuery() { Object ref = searchQuery_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); searchQuery_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return The bytes for searchQuery. */ public com.google.protobuf.ByteString getSearchQueryBytes() { Object ref = searchQuery_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); searchQuery_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @param value The searchQuery to set. * @return This builder for chaining. */ public Builder setSearchQuery( String value) { if (value == null) { throw new NullPointerException(); } searchQuery_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return This builder for chaining. */ public Builder clearSearchQuery() { searchQuery_ = getDefaultInstance().getSearchQuery(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @param value The bytes for searchQuery to set. * @return This builder for chaining. */ public Builder setSearchQueryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); searchQuery_ = value; onChanged(); return this; } private Paging paging_; private com.google.protobuf.SingleFieldBuilderV3< Paging, Paging.Builder, PagingOrBuilder> pagingBuilder_; /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> * @return Whether the paging field is set. */ public boolean hasPaging() { return pagingBuilder_ != null || paging_ != null; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> * @return The paging. */ public Paging getPaging() { if (pagingBuilder_ == null) { return paging_ == null ? Paging.getDefaultInstance() : paging_; } else { return pagingBuilder_.getMessage(); } } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ public Builder setPaging(Paging value) { if (pagingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } paging_ = value; onChanged(); } else { pagingBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ public Builder setPaging( Paging.Builder builderForValue) { if (pagingBuilder_ == null) { paging_ = builderForValue.build(); onChanged(); } else { pagingBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ public Builder mergePaging(Paging value) { if (pagingBuilder_ == null) { if (paging_ != null) { paging_ = Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); } else { paging_ = value; } onChanged(); } else { pagingBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ public Builder clearPaging() { if (pagingBuilder_ == null) { paging_ = null; onChanged(); } else { paging_ = null; pagingBuilder_ = null; } return this; } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ public Paging.Builder getPagingBuilder() { onChanged(); return getPagingFieldBuilder().getBuilder(); } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ public PagingOrBuilder getPagingOrBuilder() { if (pagingBuilder_ != null) { return pagingBuilder_.getMessageOrBuilder(); } else { return paging_ == null ? Paging.getDefaultInstance() : paging_; } } /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ private com.google.protobuf.SingleFieldBuilderV3< Paging, Paging.Builder, PagingOrBuilder> getPagingFieldBuilder() { if (pagingBuilder_ == null) { pagingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< Paging, Paging.Builder, PagingOrBuilder>( getPaging(), getParentForChildren(), isClean()); paging_ = null; } return pagingBuilder_; } private java.util.List<Insertion> insertion_ = java.util.Collections.emptyList(); private void ensureInsertionIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { insertion_ = new java.util.ArrayList<Insertion>(insertion_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< Insertion, Insertion.Builder, InsertionOrBuilder> insertionBuilder_; /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public java.util.List<Insertion> getInsertionList() { if (insertionBuilder_ == null) { return java.util.Collections.unmodifiableList(insertion_); } else { return insertionBuilder_.getMessageList(); } } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public int getInsertionCount() { if (insertionBuilder_ == null) { return insertion_.size(); } else { return insertionBuilder_.getCount(); } } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Insertion getInsertion(int index) { if (insertionBuilder_ == null) { return insertion_.get(index); } else { return insertionBuilder_.getMessage(index); } } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder setInsertion( int index, Insertion value) { if (insertionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInsertionIsMutable(); insertion_.set(index, value); onChanged(); } else { insertionBuilder_.setMessage(index, value); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder setInsertion( int index, Insertion.Builder builderForValue) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.set(index, builderForValue.build()); onChanged(); } else { insertionBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder addInsertion(Insertion value) { if (insertionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInsertionIsMutable(); insertion_.add(value); onChanged(); } else { insertionBuilder_.addMessage(value); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder addInsertion( int index, Insertion value) { if (insertionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInsertionIsMutable(); insertion_.add(index, value); onChanged(); } else { insertionBuilder_.addMessage(index, value); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder addInsertion( Insertion.Builder builderForValue) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.add(builderForValue.build()); onChanged(); } else { insertionBuilder_.addMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder addInsertion( int index, Insertion.Builder builderForValue) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.add(index, builderForValue.build()); onChanged(); } else { insertionBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder addAllInsertion( Iterable<? extends Insertion> values) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, insertion_); onChanged(); } else { insertionBuilder_.addAllMessages(values); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder clearInsertion() { if (insertionBuilder_ == null) { insertion_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { insertionBuilder_.clear(); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Builder removeInsertion(int index) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.remove(index); onChanged(); } else { insertionBuilder_.remove(index); } return this; } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Insertion.Builder getInsertionBuilder( int index) { return getInsertionFieldBuilder().getBuilder(index); } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public InsertionOrBuilder getInsertionOrBuilder( int index) { if (insertionBuilder_ == null) { return insertion_.get(index); } else { return insertionBuilder_.getMessageOrBuilder(index); } } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public java.util.List<? extends InsertionOrBuilder> getInsertionOrBuilderList() { if (insertionBuilder_ != null) { return insertionBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(insertion_); } } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Insertion.Builder addInsertionBuilder() { return getInsertionFieldBuilder().addBuilder( Insertion.getDefaultInstance()); } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public Insertion.Builder addInsertionBuilder( int index) { return getInsertionFieldBuilder().addBuilder( index, Insertion.getDefaultInstance()); } /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ public java.util.List<Insertion.Builder> getInsertionBuilderList() { return getInsertionFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< Insertion, Insertion.Builder, InsertionOrBuilder> getInsertionFieldBuilder() { if (insertionBuilder_ == null) { insertionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< Insertion, Insertion.Builder, InsertionOrBuilder>( insertion_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); insertion_ = null; } return insertionBuilder_; } private ai.promoted.proto.delivery.BlenderConfig blenderConfig_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.delivery.BlenderConfig, ai.promoted.proto.delivery.BlenderConfig.Builder, ai.promoted.proto.delivery.BlenderConfigOrBuilder> blenderConfigBuilder_; /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> * @return Whether the blenderConfig field is set. */ public boolean hasBlenderConfig() { return blenderConfigBuilder_ != null || blenderConfig_ != null; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> * @return The blenderConfig. */ public ai.promoted.proto.delivery.BlenderConfig getBlenderConfig() { if (blenderConfigBuilder_ == null) { return blenderConfig_ == null ? ai.promoted.proto.delivery.BlenderConfig.getDefaultInstance() : blenderConfig_; } else { return blenderConfigBuilder_.getMessage(); } } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ public Builder setBlenderConfig(ai.promoted.proto.delivery.BlenderConfig value) { if (blenderConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } blenderConfig_ = value; onChanged(); } else { blenderConfigBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ public Builder setBlenderConfig( ai.promoted.proto.delivery.BlenderConfig.Builder builderForValue) { if (blenderConfigBuilder_ == null) { blenderConfig_ = builderForValue.build(); onChanged(); } else { blenderConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ public Builder mergeBlenderConfig(ai.promoted.proto.delivery.BlenderConfig value) { if (blenderConfigBuilder_ == null) { if (blenderConfig_ != null) { blenderConfig_ = ai.promoted.proto.delivery.BlenderConfig.newBuilder(blenderConfig_).mergeFrom(value).buildPartial(); } else { blenderConfig_ = value; } onChanged(); } else { blenderConfigBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ public Builder clearBlenderConfig() { if (blenderConfigBuilder_ == null) { blenderConfig_ = null; onChanged(); } else { blenderConfig_ = null; blenderConfigBuilder_ = null; } return this; } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ public ai.promoted.proto.delivery.BlenderConfig.Builder getBlenderConfigBuilder() { onChanged(); return getBlenderConfigFieldBuilder().getBuilder(); } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ public ai.promoted.proto.delivery.BlenderConfigOrBuilder getBlenderConfigOrBuilder() { if (blenderConfigBuilder_ != null) { return blenderConfigBuilder_.getMessageOrBuilder(); } else { return blenderConfig_ == null ? ai.promoted.proto.delivery.BlenderConfig.getDefaultInstance() : blenderConfig_; } } /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.delivery.BlenderConfig, ai.promoted.proto.delivery.BlenderConfig.Builder, ai.promoted.proto.delivery.BlenderConfigOrBuilder> getBlenderConfigFieldBuilder() { if (blenderConfigBuilder_ == null) { blenderConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.delivery.BlenderConfig, ai.promoted.proto.delivery.BlenderConfig.Builder, ai.promoted.proto.delivery.BlenderConfigOrBuilder>( getBlenderConfig(), getParentForChildren(), isClean()); blenderConfig_ = null; } return blenderConfigBuilder_; } private ai.promoted.proto.common.Properties properties_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder> propertiesBuilder_; /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> * @return Whether the properties field is set. */ public boolean hasProperties() { return propertiesBuilder_ != null || properties_ != null; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> * @return The properties. */ public ai.promoted.proto.common.Properties getProperties() { if (propertiesBuilder_ == null) { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } else { return propertiesBuilder_.getMessage(); } } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder setProperties(ai.promoted.proto.common.Properties value) { if (propertiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } properties_ = value; onChanged(); } else { propertiesBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder setProperties( ai.promoted.proto.common.Properties.Builder builderForValue) { if (propertiesBuilder_ == null) { properties_ = builderForValue.build(); onChanged(); } else { propertiesBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder mergeProperties(ai.promoted.proto.common.Properties value) { if (propertiesBuilder_ == null) { if (properties_ != null) { properties_ = ai.promoted.proto.common.Properties.newBuilder(properties_).mergeFrom(value).buildPartial(); } else { properties_ = value; } onChanged(); } else { propertiesBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ public Builder clearProperties() { if (propertiesBuilder_ == null) { properties_ = null; onChanged(); } else { properties_ = null; propertiesBuilder_ = null; } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ public ai.promoted.proto.common.Properties.Builder getPropertiesBuilder() { onChanged(); return getPropertiesFieldBuilder().getBuilder(); } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ public ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder() { if (propertiesBuilder_ != null) { return propertiesBuilder_.getMessageOrBuilder(); } else { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder> getPropertiesFieldBuilder() { if (propertiesBuilder_ == null) { propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder>( getProperties(), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.Request) } // @@protoc_insertion_point(class_scope:delivery.Request) private static final Request DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Request(); } public static Request getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Request> PARSER = new com.google.protobuf.AbstractParser<Request>() { @Override public Request parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Request(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Request> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Request> getParserForType() { return PARSER; } @Override public Request getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/RequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; public interface RequestOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.Request) com.google.protobuf.MessageOrBuilder { /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ long getPlatformId(); /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ boolean hasUserInfo(); /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ ai.promoted.proto.common.UserInfo getUserInfo(); /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder(); /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ boolean hasTiming(); /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ ai.promoted.proto.common.Timing getTiming(); /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ boolean hasClientInfo(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ ai.promoted.proto.common.ClientInfo getClientInfo(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder(); /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> * @return Whether the device field is set. */ boolean hasDevice(); /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> * @return The device. */ ai.promoted.proto.common.Device getDevice(); /** * <pre> * Optional. Information about the user's device. * </pre> * * <code>.common.Device device = 18;</code> */ ai.promoted.proto.common.DeviceOrBuilder getDeviceOrBuilder(); /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return The requestId. */ String getRequestId(); /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string request_id = 6;</code> * @return The bytes for requestId. */ com.google.protobuf.ByteString getRequestIdBytes(); /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return The viewId. */ String getViewId(); /** * <pre> * Required. * </pre> * * <code>string view_id = 7;</code> * @return The bytes for viewId. */ com.google.protobuf.ByteString getViewIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The sessionId. */ String getSessionId(); /** * <pre> * Optional. * </pre> * * <code>string session_id = 8;</code> * @return The bytes for sessionId. */ com.google.protobuf.ByteString getSessionIdBytes(); /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return The clientRequestId. */ String getClientRequestId(); /** * <pre> * Optional. * An ID indicating the client's version of a request_id. This field * matters when a single Request from the client could cause multiple * request executions (e.g. backups from retries or timeouts). Each of those * request executions should have separate request_ids. * This should be a UUID. If not set on a Request, the SDKs or Promoted * servers will set it. * </pre> * * <code>string client_request_id = 14;</code> * @return The bytes for clientRequestId. */ com.google.protobuf.ByteString getClientRequestIdBytes(); /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return The enum numeric value on the wire for useCase. */ int getUseCaseValue(); /** * <pre> * Optional. * </pre> * * <code>.delivery.UseCase use_case = 9;</code> * @return The useCase. */ UseCase getUseCase(); /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return The searchQuery. */ String getSearchQuery(); /** * <pre> * Optional. * </pre> * * <code>string search_query = 10;</code> * @return The bytes for searchQuery. */ com.google.protobuf.ByteString getSearchQueryBytes(); /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> * @return Whether the paging field is set. */ boolean hasPaging(); /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> * @return The paging. */ Paging getPaging(); /** * <pre> * Optional. Set to request a specific "page" of results. * </pre> * * <code>.delivery.Paging paging = 17;</code> */ PagingOrBuilder getPagingOrBuilder(); /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ java.util.List<Insertion> getInsertionList(); /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ Insertion getInsertion(int index); /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ int getInsertionCount(); /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ java.util.List<? extends InsertionOrBuilder> getInsertionOrBuilderList(); /** * <pre> * Optional. * If set in Delivery API, Promoted will re-rank this list of Content. * This list can be used to pass in a list of Content (or Content IDs). * If set in Metrics API, Promoted will separate this list of Insertions * into separate log records. * </pre> * * <code>repeated .delivery.Insertion insertion = 11;</code> */ InsertionOrBuilder getInsertionOrBuilder( int index); /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> * @return Whether the blenderConfig field is set. */ boolean hasBlenderConfig(); /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> * @return The blenderConfig. */ ai.promoted.proto.delivery.BlenderConfig getBlenderConfig(); /** * <pre> * Optional. * </pre> * * <code>.delivery.BlenderConfig blender_config = 12;</code> */ ai.promoted.proto.delivery.BlenderConfigOrBuilder getBlenderConfigOrBuilder(); /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> * @return Whether the properties field is set. */ boolean hasProperties(); /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> * @return The properties. */ ai.promoted.proto.common.Properties getProperties(); /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 13;</code> */ ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/Response.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code delivery.Response} */ public final class Response extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:delivery.Response) ResponseOrBuilder { private static final long serialVersionUID = 0L; // Use Response.newBuilder() to construct. private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Response() { insertion_ = java.util.Collections.emptyList(); } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Response(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Response( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { insertion_ = new java.util.ArrayList<Insertion>(); mutable_bitField0_ |= 0x00000001; } insertion_.add( input.readMessage(Insertion.parser(), extensionRegistry)); break; } case 26: { PagingInfo.Builder subBuilder = null; if (pagingInfo_ != null) { subBuilder = pagingInfo_.toBuilder(); } pagingInfo_ = input.readMessage(PagingInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(pagingInfo_); pagingInfo_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { insertion_ = java.util.Collections.unmodifiableList(insertion_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Response_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Response_fieldAccessorTable .ensureFieldAccessorsInitialized( Response.class, Builder.class); } public static final int INSERTION_FIELD_NUMBER = 2; private java.util.List<Insertion> insertion_; /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ @Override public java.util.List<Insertion> getInsertionList() { return insertion_; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ @Override public java.util.List<? extends InsertionOrBuilder> getInsertionOrBuilderList() { return insertion_; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ @Override public int getInsertionCount() { return insertion_.size(); } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ @Override public Insertion getInsertion(int index) { return insertion_.get(index); } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ @Override public InsertionOrBuilder getInsertionOrBuilder( int index) { return insertion_.get(index); } public static final int PAGING_INFO_FIELD_NUMBER = 3; private PagingInfo pagingInfo_; /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> * @return Whether the pagingInfo field is set. */ @Override public boolean hasPagingInfo() { return pagingInfo_ != null; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> * @return The pagingInfo. */ @Override public PagingInfo getPagingInfo() { return pagingInfo_ == null ? PagingInfo.getDefaultInstance() : pagingInfo_; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ @Override public PagingInfoOrBuilder getPagingInfoOrBuilder() { return getPagingInfo(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < insertion_.size(); i++) { output.writeMessage(2, insertion_.get(i)); } if (pagingInfo_ != null) { output.writeMessage(3, getPagingInfo()); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < insertion_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, insertion_.get(i)); } if (pagingInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getPagingInfo()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Response)) { return super.equals(obj); } Response other = (Response) obj; if (!getInsertionList() .equals(other.getInsertionList())) return false; if (hasPagingInfo() != other.hasPagingInfo()) return false; if (hasPagingInfo()) { if (!getPagingInfo() .equals(other.getPagingInfo())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getInsertionCount() > 0) { hash = (37 * hash) + INSERTION_FIELD_NUMBER; hash = (53 * hash) + getInsertionList().hashCode(); } if (hasPagingInfo()) { hash = (37 * hash) + PAGING_INFO_FIELD_NUMBER; hash = (53 * hash) + getPagingInfo().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Response parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Response parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Response parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Response parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Response parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Response parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Response parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Response 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 Response parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Response 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 Response parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Response parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Response prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Next ID = 4. * </pre> * * Protobuf type {@code delivery.Response} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:delivery.Response) ResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Delivery.internal_static_delivery_Response_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Delivery.internal_static_delivery_Response_fieldAccessorTable .ensureFieldAccessorsInitialized( Response.class, Builder.class); } // Construct using ai.promoted.proto.delivery.Response.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getInsertionFieldBuilder(); } } @Override public Builder clear() { super.clear(); if (insertionBuilder_ == null) { insertion_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { insertionBuilder_.clear(); } if (pagingInfoBuilder_ == null) { pagingInfo_ = null; } else { pagingInfo_ = null; pagingInfoBuilder_ = null; } return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Delivery.internal_static_delivery_Response_descriptor; } @Override public Response getDefaultInstanceForType() { return Response.getDefaultInstance(); } @Override public Response build() { Response result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Response buildPartial() { Response result = new Response(this); int from_bitField0_ = bitField0_; if (insertionBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { insertion_ = java.util.Collections.unmodifiableList(insertion_); bitField0_ = (bitField0_ & ~0x00000001); } result.insertion_ = insertion_; } else { result.insertion_ = insertionBuilder_.build(); } if (pagingInfoBuilder_ == null) { result.pagingInfo_ = pagingInfo_; } else { result.pagingInfo_ = pagingInfoBuilder_.build(); } onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Response) { return mergeFrom((Response)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Response other) { if (other == Response.getDefaultInstance()) return this; if (insertionBuilder_ == null) { if (!other.insertion_.isEmpty()) { if (insertion_.isEmpty()) { insertion_ = other.insertion_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureInsertionIsMutable(); insertion_.addAll(other.insertion_); } onChanged(); } } else { if (!other.insertion_.isEmpty()) { if (insertionBuilder_.isEmpty()) { insertionBuilder_.dispose(); insertionBuilder_ = null; insertion_ = other.insertion_; bitField0_ = (bitField0_ & ~0x00000001); insertionBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getInsertionFieldBuilder() : null; } else { insertionBuilder_.addAllMessages(other.insertion_); } } } if (other.hasPagingInfo()) { mergePagingInfo(other.getPagingInfo()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Response parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Response) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<Insertion> insertion_ = java.util.Collections.emptyList(); private void ensureInsertionIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { insertion_ = new java.util.ArrayList<Insertion>(insertion_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< Insertion, Insertion.Builder, InsertionOrBuilder> insertionBuilder_; /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public java.util.List<Insertion> getInsertionList() { if (insertionBuilder_ == null) { return java.util.Collections.unmodifiableList(insertion_); } else { return insertionBuilder_.getMessageList(); } } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public int getInsertionCount() { if (insertionBuilder_ == null) { return insertion_.size(); } else { return insertionBuilder_.getCount(); } } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Insertion getInsertion(int index) { if (insertionBuilder_ == null) { return insertion_.get(index); } else { return insertionBuilder_.getMessage(index); } } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder setInsertion( int index, Insertion value) { if (insertionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInsertionIsMutable(); insertion_.set(index, value); onChanged(); } else { insertionBuilder_.setMessage(index, value); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder setInsertion( int index, Insertion.Builder builderForValue) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.set(index, builderForValue.build()); onChanged(); } else { insertionBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder addInsertion(Insertion value) { if (insertionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInsertionIsMutable(); insertion_.add(value); onChanged(); } else { insertionBuilder_.addMessage(value); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder addInsertion( int index, Insertion value) { if (insertionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInsertionIsMutable(); insertion_.add(index, value); onChanged(); } else { insertionBuilder_.addMessage(index, value); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder addInsertion( Insertion.Builder builderForValue) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.add(builderForValue.build()); onChanged(); } else { insertionBuilder_.addMessage(builderForValue.build()); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder addInsertion( int index, Insertion.Builder builderForValue) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.add(index, builderForValue.build()); onChanged(); } else { insertionBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder addAllInsertion( Iterable<? extends Insertion> values) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, insertion_); onChanged(); } else { insertionBuilder_.addAllMessages(values); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder clearInsertion() { if (insertionBuilder_ == null) { insertion_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { insertionBuilder_.clear(); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Builder removeInsertion(int index) { if (insertionBuilder_ == null) { ensureInsertionIsMutable(); insertion_.remove(index); onChanged(); } else { insertionBuilder_.remove(index); } return this; } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Insertion.Builder getInsertionBuilder( int index) { return getInsertionFieldBuilder().getBuilder(index); } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public InsertionOrBuilder getInsertionOrBuilder( int index) { if (insertionBuilder_ == null) { return insertion_.get(index); } else { return insertionBuilder_.getMessageOrBuilder(index); } } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public java.util.List<? extends InsertionOrBuilder> getInsertionOrBuilderList() { if (insertionBuilder_ != null) { return insertionBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(insertion_); } } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Insertion.Builder addInsertionBuilder() { return getInsertionFieldBuilder().addBuilder( Insertion.getDefaultInstance()); } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public Insertion.Builder addInsertionBuilder( int index) { return getInsertionFieldBuilder().addBuilder( index, Insertion.getDefaultInstance()); } /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ public java.util.List<Insertion.Builder> getInsertionBuilderList() { return getInsertionFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< Insertion, Insertion.Builder, InsertionOrBuilder> getInsertionFieldBuilder() { if (insertionBuilder_ == null) { insertionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< Insertion, Insertion.Builder, InsertionOrBuilder>( insertion_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); insertion_ = null; } return insertionBuilder_; } private PagingInfo pagingInfo_; private com.google.protobuf.SingleFieldBuilderV3< PagingInfo, PagingInfo.Builder, PagingInfoOrBuilder> pagingInfoBuilder_; /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> * @return Whether the pagingInfo field is set. */ public boolean hasPagingInfo() { return pagingInfoBuilder_ != null || pagingInfo_ != null; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> * @return The pagingInfo. */ public PagingInfo getPagingInfo() { if (pagingInfoBuilder_ == null) { return pagingInfo_ == null ? PagingInfo.getDefaultInstance() : pagingInfo_; } else { return pagingInfoBuilder_.getMessage(); } } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ public Builder setPagingInfo(PagingInfo value) { if (pagingInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } pagingInfo_ = value; onChanged(); } else { pagingInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ public Builder setPagingInfo( PagingInfo.Builder builderForValue) { if (pagingInfoBuilder_ == null) { pagingInfo_ = builderForValue.build(); onChanged(); } else { pagingInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ public Builder mergePagingInfo(PagingInfo value) { if (pagingInfoBuilder_ == null) { if (pagingInfo_ != null) { pagingInfo_ = PagingInfo.newBuilder(pagingInfo_).mergeFrom(value).buildPartial(); } else { pagingInfo_ = value; } onChanged(); } else { pagingInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ public Builder clearPagingInfo() { if (pagingInfoBuilder_ == null) { pagingInfo_ = null; onChanged(); } else { pagingInfo_ = null; pagingInfoBuilder_ = null; } return this; } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ public PagingInfo.Builder getPagingInfoBuilder() { onChanged(); return getPagingInfoFieldBuilder().getBuilder(); } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ public PagingInfoOrBuilder getPagingInfoOrBuilder() { if (pagingInfoBuilder_ != null) { return pagingInfoBuilder_.getMessageOrBuilder(); } else { return pagingInfo_ == null ? PagingInfo.getDefaultInstance() : pagingInfo_; } } /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< PagingInfo, PagingInfo.Builder, PagingInfoOrBuilder> getPagingInfoFieldBuilder() { if (pagingInfoBuilder_ == null) { pagingInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< PagingInfo, PagingInfo.Builder, PagingInfoOrBuilder>( getPagingInfo(), getParentForChildren(), isClean()); pagingInfo_ = null; } return pagingInfoBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:delivery.Response) } // @@protoc_insertion_point(class_scope:delivery.Response) private static final Response DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Response(); } public static Response getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Response> PARSER = new com.google.protobuf.AbstractParser<Response>() { @Override public Response parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Response(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Response> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Response> getParserForType() { return PARSER; } @Override public Response getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/ResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; public interface ResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:delivery.Response) com.google.protobuf.MessageOrBuilder { /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ java.util.List<Insertion> getInsertionList(); /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ Insertion getInsertion(int index); /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ int getInsertionCount(); /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ java.util.List<? extends InsertionOrBuilder> getInsertionOrBuilderList(); /** * <pre> * List of content. * </pre> * * <code>repeated .delivery.Insertion insertion = 2;</code> */ InsertionOrBuilder getInsertionOrBuilder( int index); /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> * @return Whether the pagingInfo field is set. */ boolean hasPagingInfo(); /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> * @return The pagingInfo. */ PagingInfo getPagingInfo(); /** * <pre> * Paging information of this response. Only returned on paging requests. * </pre> * * <code>.delivery.PagingInfo paging_info = 3;</code> */ PagingInfoOrBuilder getPagingInfoOrBuilder(); }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/delivery/UseCase.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/delivery/delivery.proto package ai.promoted.proto.delivery; /** * <pre> * Used to indicate the client's use case. Used on both View and Request. * Next ID = 12. * </pre> * * Protobuf enum {@code delivery.UseCase} */ public enum UseCase implements com.google.protobuf.ProtocolMessageEnum { /** * <code>UNKNOWN_USE_CASE = 0;</code> */ UNKNOWN_USE_CASE(0), /** * <pre> * Need to handle in wrapper proto. * </pre> * * <code>CUSTOM = 1;</code> */ CUSTOM(1), /** * <code>SEARCH = 2;</code> */ SEARCH(2), /** * <code>SEARCH_SUGGESTIONS = 3;</code> */ SEARCH_SUGGESTIONS(3), /** * <code>FEED = 4;</code> */ FEED(4), /** * <code>RELATED_CONTENT = 5;</code> */ RELATED_CONTENT(5), /** * <code>CLOSE_UP = 6;</code> */ CLOSE_UP(6), /** * <code>CATEGORY_CONTENT = 7;</code> */ CATEGORY_CONTENT(7), /** * <code>MY_CONTENT = 8;</code> */ MY_CONTENT(8), /** * <code>MY_SAVED_CONTENT = 9;</code> */ MY_SAVED_CONTENT(9), /** * <code>SELLER_CONTENT = 10;</code> */ SELLER_CONTENT(10), /** * <code>DISCOVER = 11;</code> */ DISCOVER(11), UNRECOGNIZED(-1), ; /** * <code>UNKNOWN_USE_CASE = 0;</code> */ public static final int UNKNOWN_USE_CASE_VALUE = 0; /** * <pre> * Need to handle in wrapper proto. * </pre> * * <code>CUSTOM = 1;</code> */ public static final int CUSTOM_VALUE = 1; /** * <code>SEARCH = 2;</code> */ public static final int SEARCH_VALUE = 2; /** * <code>SEARCH_SUGGESTIONS = 3;</code> */ public static final int SEARCH_SUGGESTIONS_VALUE = 3; /** * <code>FEED = 4;</code> */ public static final int FEED_VALUE = 4; /** * <code>RELATED_CONTENT = 5;</code> */ public static final int RELATED_CONTENT_VALUE = 5; /** * <code>CLOSE_UP = 6;</code> */ public static final int CLOSE_UP_VALUE = 6; /** * <code>CATEGORY_CONTENT = 7;</code> */ public static final int CATEGORY_CONTENT_VALUE = 7; /** * <code>MY_CONTENT = 8;</code> */ public static final int MY_CONTENT_VALUE = 8; /** * <code>MY_SAVED_CONTENT = 9;</code> */ public static final int MY_SAVED_CONTENT_VALUE = 9; /** * <code>SELLER_CONTENT = 10;</code> */ public static final int SELLER_CONTENT_VALUE = 10; /** * <code>DISCOVER = 11;</code> */ public static final int DISCOVER_VALUE = 11; public final int getNumber() { if (this == UNRECOGNIZED) { throw new IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static UseCase valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static UseCase forNumber(int value) { switch (value) { case 0: return UNKNOWN_USE_CASE; case 1: return CUSTOM; case 2: return SEARCH; case 3: return SEARCH_SUGGESTIONS; case 4: return FEED; case 5: return RELATED_CONTENT; case 6: return CLOSE_UP; case 7: return CATEGORY_CONTENT; case 8: return MY_CONTENT; case 9: return MY_SAVED_CONTENT; case 10: return SELLER_CONTENT; case 11: return DISCOVER; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<UseCase> internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< UseCase> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<UseCase>() { public UseCase findValueByNumber(int number) { return UseCase.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return Delivery.getDescriptor().getEnumTypes().get(0); } private static final UseCase[] VALUES = values(); public static UseCase valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private UseCase(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:delivery.UseCase) }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/event/Action.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/event/event.proto package ai.promoted.proto.event; /** * <pre> * Actions are user actions. Example: Click. * Actions are immutable. * Next ID = 24. * </pre> * * Protobuf type {@code event.Action} */ public final class Action extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:event.Action) ActionOrBuilder { private static final long serialVersionUID = 0L; // Use Action.newBuilder() to construct. private Action(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Action() { actionId_ = ""; impressionId_ = ""; insertionId_ = ""; requestId_ = ""; viewId_ = ""; autoViewId_ = ""; sessionId_ = ""; contentId_ = ""; name_ = ""; actionType_ = 0; customActionType_ = ""; elementId_ = ""; } @Override @SuppressWarnings({"unused"}) protected Object newInstance( UnusedPrivateParameter unused) { return new Action(); } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Action( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { platformId_ = input.readUInt64(); break; } case 18: { ai.promoted.proto.common.UserInfo.Builder subBuilder = null; if (userInfo_ != null) { subBuilder = userInfo_.toBuilder(); } userInfo_ = input.readMessage(ai.promoted.proto.common.UserInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(userInfo_); userInfo_ = subBuilder.buildPartial(); } break; } case 26: { ai.promoted.proto.common.Timing.Builder subBuilder = null; if (timing_ != null) { subBuilder = timing_.toBuilder(); } timing_ = input.readMessage(ai.promoted.proto.common.Timing.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(timing_); timing_ = subBuilder.buildPartial(); } break; } case 34: { ai.promoted.proto.common.ClientInfo.Builder subBuilder = null; if (clientInfo_ != null) { subBuilder = clientInfo_.toBuilder(); } clientInfo_ = input.readMessage(ai.promoted.proto.common.ClientInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(clientInfo_); clientInfo_ = subBuilder.buildPartial(); } break; } case 50: { String s = input.readStringRequireUtf8(); actionId_ = s; break; } case 58: { String s = input.readStringRequireUtf8(); impressionId_ = s; break; } case 66: { String s = input.readStringRequireUtf8(); insertionId_ = s; break; } case 74: { String s = input.readStringRequireUtf8(); requestId_ = s; break; } case 82: { String s = input.readStringRequireUtf8(); sessionId_ = s; break; } case 90: { String s = input.readStringRequireUtf8(); viewId_ = s; break; } case 98: { String s = input.readStringRequireUtf8(); name_ = s; break; } case 112: { int rawValue = input.readEnum(); actionType_ = rawValue; break; } case 122: { String s = input.readStringRequireUtf8(); customActionType_ = s; break; } case 138: { String s = input.readStringRequireUtf8(); elementId_ = s; break; } case 146: { NavigateAction.Builder subBuilder = null; if (actionCase_ == 18) { subBuilder = ((NavigateAction) action_).toBuilder(); } action_ = input.readMessage(NavigateAction.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((NavigateAction) action_); action_ = subBuilder.buildPartial(); } actionCase_ = 18; break; } case 162: { ai.promoted.proto.common.Properties.Builder subBuilder = null; if (properties_ != null) { subBuilder = properties_.toBuilder(); } properties_ = input.readMessage(ai.promoted.proto.common.Properties.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(properties_); properties_ = subBuilder.buildPartial(); } break; } case 170: { String s = input.readStringRequireUtf8(); contentId_ = s; break; } case 176: { hasSuperimposedViews_ = input.readBool(); break; } case 186: { String s = input.readStringRequireUtf8(); autoViewId_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Event.internal_static_event_Action_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Event.internal_static_event_Action_fieldAccessorTable .ensureFieldAccessorsInitialized( Action.class, Builder.class); } private int actionCase_ = 0; private Object action_; public enum ActionCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { NAVIGATE_ACTION(18), ACTION_NOT_SET(0); private final int value; private ActionCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static ActionCase valueOf(int value) { return forNumber(value); } public static ActionCase forNumber(int value) { switch (value) { case 18: return NAVIGATE_ACTION; case 0: return ACTION_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ActionCase getActionCase() { return ActionCase.forNumber( actionCase_); } public static final int PLATFORM_ID_FIELD_NUMBER = 1; private long platformId_; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } public static final int USER_INFO_FIELD_NUMBER = 2; private ai.promoted.proto.common.UserInfo userInfo_; /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ @Override public boolean hasUserInfo() { return userInfo_ != null; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ @Override public ai.promoted.proto.common.UserInfo getUserInfo() { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ @Override public ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder() { return getUserInfo(); } public static final int TIMING_FIELD_NUMBER = 3; private ai.promoted.proto.common.Timing timing_; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ @Override public boolean hasTiming() { return timing_ != null; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ @Override public ai.promoted.proto.common.Timing getTiming() { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ @Override public ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder() { return getTiming(); } public static final int CLIENT_INFO_FIELD_NUMBER = 4; private ai.promoted.proto.common.ClientInfo clientInfo_; /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ @Override public boolean hasClientInfo() { return clientInfo_ != null; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ @Override public ai.promoted.proto.common.ClientInfo getClientInfo() { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ @Override public ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder() { return getClientInfo(); } public static final int ACTION_ID_FIELD_NUMBER = 6; private volatile Object actionId_; /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return The actionId. */ @Override public String getActionId() { Object ref = actionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); actionId_ = s; return s; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return The bytes for actionId. */ @Override public com.google.protobuf.ByteString getActionIdBytes() { Object ref = actionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); actionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int IMPRESSION_ID_FIELD_NUMBER = 7; private volatile Object impressionId_; /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return The impressionId. */ @Override public String getImpressionId() { Object ref = impressionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); impressionId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return The bytes for impressionId. */ @Override public com.google.protobuf.ByteString getImpressionIdBytes() { Object ref = impressionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); impressionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INSERTION_ID_FIELD_NUMBER = 8; private volatile Object insertionId_; /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return The insertionId. */ @Override public String getInsertionId() { Object ref = insertionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); insertionId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return The bytes for insertionId. */ @Override public com.google.protobuf.ByteString getInsertionIdBytes() { Object ref = insertionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); insertionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REQUEST_ID_FIELD_NUMBER = 9; private volatile Object requestId_; /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return The requestId. */ @Override public String getRequestId() { Object ref = requestId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); requestId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return The bytes for requestId. */ @Override public com.google.protobuf.ByteString getRequestIdBytes() { Object ref = requestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); requestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VIEW_ID_FIELD_NUMBER = 11; private volatile Object viewId_; /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return The viewId. */ @Override public String getViewId() { Object ref = viewId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); viewId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return The bytes for viewId. */ @Override public com.google.protobuf.ByteString getViewIdBytes() { Object ref = viewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); viewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AUTO_VIEW_ID_FIELD_NUMBER = 23; private volatile Object autoViewId_; /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return The autoViewId. */ @Override public String getAutoViewId() { Object ref = autoViewId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); autoViewId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return The bytes for autoViewId. */ @Override public com.google.protobuf.ByteString getAutoViewIdBytes() { Object ref = autoViewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); autoViewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SESSION_ID_FIELD_NUMBER = 10; private volatile Object sessionId_; /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return The sessionId. */ @Override public String getSessionId() { Object ref = sessionId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); sessionId_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return The bytes for sessionId. */ @Override public com.google.protobuf.ByteString getSessionIdBytes() { Object ref = sessionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); sessionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTENT_ID_FIELD_NUMBER = 21; private volatile Object contentId_; /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return The contentId. */ @Override public String getContentId() { Object ref = contentId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); contentId_ = s; return s; } } /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return The bytes for contentId. */ @Override public com.google.protobuf.ByteString getContentIdBytes() { Object ref = contentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); contentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NAME_FIELD_NUMBER = 12; private volatile Object name_; /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return The name. */ @Override public String getName() { Object ref = name_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); name_ = s; return s; } } /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return The bytes for name. */ @Override public com.google.protobuf.ByteString getNameBytes() { Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ACTION_TYPE_FIELD_NUMBER = 14; private int actionType_; /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return The enum numeric value on the wire for actionType. */ @Override public int getActionTypeValue() { return actionType_; } /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return The actionType. */ @Override public ActionType getActionType() { @SuppressWarnings("deprecation") ActionType result = ActionType.valueOf(actionType_); return result == null ? ActionType.UNRECOGNIZED : result; } public static final int CUSTOM_ACTION_TYPE_FIELD_NUMBER = 15; private volatile Object customActionType_; /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return The customActionType. */ @Override public String getCustomActionType() { Object ref = customActionType_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); customActionType_ = s; return s; } } /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return The bytes for customActionType. */ @Override public com.google.protobuf.ByteString getCustomActionTypeBytes() { Object ref = customActionType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); customActionType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ELEMENT_ID_FIELD_NUMBER = 17; private volatile Object elementId_; /** * <code>string element_id = 17;</code> * @return The elementId. */ @Override public String getElementId() { Object ref = elementId_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); elementId_ = s; return s; } } /** * <code>string element_id = 17;</code> * @return The bytes for elementId. */ @Override public com.google.protobuf.ByteString getElementIdBytes() { Object ref = elementId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); elementId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NAVIGATE_ACTION_FIELD_NUMBER = 18; /** * <code>.event.NavigateAction navigate_action = 18;</code> * @return Whether the navigateAction field is set. */ @Override public boolean hasNavigateAction() { return actionCase_ == 18; } /** * <code>.event.NavigateAction navigate_action = 18;</code> * @return The navigateAction. */ @Override public NavigateAction getNavigateAction() { if (actionCase_ == 18) { return (NavigateAction) action_; } return NavigateAction.getDefaultInstance(); } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ @Override public NavigateActionOrBuilder getNavigateActionOrBuilder() { if (actionCase_ == 18) { return (NavigateAction) action_; } return NavigateAction.getDefaultInstance(); } public static final int HAS_SUPERIMPOSED_VIEWS_FIELD_NUMBER = 22; private boolean hasSuperimposedViews_; /** * <pre> * Optional. Indicates that this action occurred in a view that may * not be topmost in the view hierarchy. * </pre> * * <code>bool has_superimposed_views = 22;</code> * @return The hasSuperimposedViews. */ @Override public boolean getHasSuperimposedViews() { return hasSuperimposedViews_; } public static final int PROPERTIES_FIELD_NUMBER = 20; private ai.promoted.proto.common.Properties properties_; /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> * @return Whether the properties field is set. */ @Override public boolean hasProperties() { return properties_ != null; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> * @return The properties. */ @Override public ai.promoted.proto.common.Properties getProperties() { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ @Override public ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder() { return getProperties(); } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (platformId_ != 0L) { output.writeUInt64(1, platformId_); } if (userInfo_ != null) { output.writeMessage(2, getUserInfo()); } if (timing_ != null) { output.writeMessage(3, getTiming()); } if (clientInfo_ != null) { output.writeMessage(4, getClientInfo()); } if (!getActionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, actionId_); } if (!getImpressionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, impressionId_); } if (!getInsertionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, insertionId_); } if (!getRequestIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, requestId_); } if (!getSessionIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sessionId_); } if (!getViewIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, viewId_); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, name_); } if (actionType_ != ActionType.UNKNOWN_ACTION_TYPE.getNumber()) { output.writeEnum(14, actionType_); } if (!getCustomActionTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, customActionType_); } if (!getElementIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 17, elementId_); } if (actionCase_ == 18) { output.writeMessage(18, (NavigateAction) action_); } if (properties_ != null) { output.writeMessage(20, getProperties()); } if (!getContentIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, contentId_); } if (hasSuperimposedViews_ != false) { output.writeBool(22, hasSuperimposedViews_); } if (!getAutoViewIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 23, autoViewId_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (platformId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, platformId_); } if (userInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getUserInfo()); } if (timing_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTiming()); } if (clientInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getClientInfo()); } if (!getActionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, actionId_); } if (!getImpressionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, impressionId_); } if (!getInsertionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, insertionId_); } if (!getRequestIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, requestId_); } if (!getSessionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sessionId_); } if (!getViewIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, viewId_); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, name_); } if (actionType_ != ActionType.UNKNOWN_ACTION_TYPE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(14, actionType_); } if (!getCustomActionTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, customActionType_); } if (!getElementIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, elementId_); } if (actionCase_ == 18) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(18, (NavigateAction) action_); } if (properties_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(20, getProperties()); } if (!getContentIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, contentId_); } if (hasSuperimposedViews_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(22, hasSuperimposedViews_); } if (!getAutoViewIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, autoViewId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Action)) { return super.equals(obj); } Action other = (Action) obj; if (getPlatformId() != other.getPlatformId()) return false; if (hasUserInfo() != other.hasUserInfo()) return false; if (hasUserInfo()) { if (!getUserInfo() .equals(other.getUserInfo())) return false; } if (hasTiming() != other.hasTiming()) return false; if (hasTiming()) { if (!getTiming() .equals(other.getTiming())) return false; } if (hasClientInfo() != other.hasClientInfo()) return false; if (hasClientInfo()) { if (!getClientInfo() .equals(other.getClientInfo())) return false; } if (!getActionId() .equals(other.getActionId())) return false; if (!getImpressionId() .equals(other.getImpressionId())) return false; if (!getInsertionId() .equals(other.getInsertionId())) return false; if (!getRequestId() .equals(other.getRequestId())) return false; if (!getViewId() .equals(other.getViewId())) return false; if (!getAutoViewId() .equals(other.getAutoViewId())) return false; if (!getSessionId() .equals(other.getSessionId())) return false; if (!getContentId() .equals(other.getContentId())) return false; if (!getName() .equals(other.getName())) return false; if (actionType_ != other.actionType_) return false; if (!getCustomActionType() .equals(other.getCustomActionType())) return false; if (!getElementId() .equals(other.getElementId())) return false; if (getHasSuperimposedViews() != other.getHasSuperimposedViews()) return false; if (hasProperties() != other.hasProperties()) return false; if (hasProperties()) { if (!getProperties() .equals(other.getProperties())) return false; } if (!getActionCase().equals(other.getActionCase())) return false; switch (actionCase_) { case 18: if (!getNavigateAction() .equals(other.getNavigateAction())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PLATFORM_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPlatformId()); if (hasUserInfo()) { hash = (37 * hash) + USER_INFO_FIELD_NUMBER; hash = (53 * hash) + getUserInfo().hashCode(); } if (hasTiming()) { hash = (37 * hash) + TIMING_FIELD_NUMBER; hash = (53 * hash) + getTiming().hashCode(); } if (hasClientInfo()) { hash = (37 * hash) + CLIENT_INFO_FIELD_NUMBER; hash = (53 * hash) + getClientInfo().hashCode(); } hash = (37 * hash) + ACTION_ID_FIELD_NUMBER; hash = (53 * hash) + getActionId().hashCode(); hash = (37 * hash) + IMPRESSION_ID_FIELD_NUMBER; hash = (53 * hash) + getImpressionId().hashCode(); hash = (37 * hash) + INSERTION_ID_FIELD_NUMBER; hash = (53 * hash) + getInsertionId().hashCode(); hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VIEW_ID_FIELD_NUMBER; hash = (53 * hash) + getViewId().hashCode(); hash = (37 * hash) + AUTO_VIEW_ID_FIELD_NUMBER; hash = (53 * hash) + getAutoViewId().hashCode(); hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; hash = (53 * hash) + getSessionId().hashCode(); hash = (37 * hash) + CONTENT_ID_FIELD_NUMBER; hash = (53 * hash) + getContentId().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ACTION_TYPE_FIELD_NUMBER; hash = (53 * hash) + actionType_; hash = (37 * hash) + CUSTOM_ACTION_TYPE_FIELD_NUMBER; hash = (53 * hash) + getCustomActionType().hashCode(); hash = (37 * hash) + ELEMENT_ID_FIELD_NUMBER; hash = (53 * hash) + getElementId().hashCode(); hash = (37 * hash) + HAS_SUPERIMPOSED_VIEWS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasSuperimposedViews()); if (hasProperties()) { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getProperties().hashCode(); } switch (actionCase_) { case 18: hash = (37 * hash) + NAVIGATE_ACTION_FIELD_NUMBER; hash = (53 * hash) + getNavigateAction().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static Action parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Action parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Action parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Action parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Action parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static Action parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static Action parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Action 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 Action parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static Action 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 Action parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static Action parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(Action prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * <pre> * Actions are user actions. Example: Click. * Actions are immutable. * Next ID = 24. * </pre> * * Protobuf type {@code event.Action} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:event.Action) ActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Event.internal_static_event_Action_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return Event.internal_static_event_Action_fieldAccessorTable .ensureFieldAccessorsInitialized( Action.class, Builder.class); } // Construct using ai.promoted.proto.event.Action.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); platformId_ = 0L; if (userInfoBuilder_ == null) { userInfo_ = null; } else { userInfo_ = null; userInfoBuilder_ = null; } if (timingBuilder_ == null) { timing_ = null; } else { timing_ = null; timingBuilder_ = null; } if (clientInfoBuilder_ == null) { clientInfo_ = null; } else { clientInfo_ = null; clientInfoBuilder_ = null; } actionId_ = ""; impressionId_ = ""; insertionId_ = ""; requestId_ = ""; viewId_ = ""; autoViewId_ = ""; sessionId_ = ""; contentId_ = ""; name_ = ""; actionType_ = 0; customActionType_ = ""; elementId_ = ""; hasSuperimposedViews_ = false; if (propertiesBuilder_ == null) { properties_ = null; } else { properties_ = null; propertiesBuilder_ = null; } actionCase_ = 0; action_ = null; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return Event.internal_static_event_Action_descriptor; } @Override public Action getDefaultInstanceForType() { return Action.getDefaultInstance(); } @Override public Action build() { Action result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public Action buildPartial() { Action result = new Action(this); result.platformId_ = platformId_; if (userInfoBuilder_ == null) { result.userInfo_ = userInfo_; } else { result.userInfo_ = userInfoBuilder_.build(); } if (timingBuilder_ == null) { result.timing_ = timing_; } else { result.timing_ = timingBuilder_.build(); } if (clientInfoBuilder_ == null) { result.clientInfo_ = clientInfo_; } else { result.clientInfo_ = clientInfoBuilder_.build(); } result.actionId_ = actionId_; result.impressionId_ = impressionId_; result.insertionId_ = insertionId_; result.requestId_ = requestId_; result.viewId_ = viewId_; result.autoViewId_ = autoViewId_; result.sessionId_ = sessionId_; result.contentId_ = contentId_; result.name_ = name_; result.actionType_ = actionType_; result.customActionType_ = customActionType_; result.elementId_ = elementId_; if (actionCase_ == 18) { if (navigateActionBuilder_ == null) { result.action_ = action_; } else { result.action_ = navigateActionBuilder_.build(); } } result.hasSuperimposedViews_ = hasSuperimposedViews_; if (propertiesBuilder_ == null) { result.properties_ = properties_; } else { result.properties_ = propertiesBuilder_.build(); } result.actionCase_ = actionCase_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof Action) { return mergeFrom((Action)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(Action other) { if (other == Action.getDefaultInstance()) return this; if (other.getPlatformId() != 0L) { setPlatformId(other.getPlatformId()); } if (other.hasUserInfo()) { mergeUserInfo(other.getUserInfo()); } if (other.hasTiming()) { mergeTiming(other.getTiming()); } if (other.hasClientInfo()) { mergeClientInfo(other.getClientInfo()); } if (!other.getActionId().isEmpty()) { actionId_ = other.actionId_; onChanged(); } if (!other.getImpressionId().isEmpty()) { impressionId_ = other.impressionId_; onChanged(); } if (!other.getInsertionId().isEmpty()) { insertionId_ = other.insertionId_; onChanged(); } if (!other.getRequestId().isEmpty()) { requestId_ = other.requestId_; onChanged(); } if (!other.getViewId().isEmpty()) { viewId_ = other.viewId_; onChanged(); } if (!other.getAutoViewId().isEmpty()) { autoViewId_ = other.autoViewId_; onChanged(); } if (!other.getSessionId().isEmpty()) { sessionId_ = other.sessionId_; onChanged(); } if (!other.getContentId().isEmpty()) { contentId_ = other.contentId_; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.actionType_ != 0) { setActionTypeValue(other.getActionTypeValue()); } if (!other.getCustomActionType().isEmpty()) { customActionType_ = other.customActionType_; onChanged(); } if (!other.getElementId().isEmpty()) { elementId_ = other.elementId_; onChanged(); } if (other.getHasSuperimposedViews() != false) { setHasSuperimposedViews(other.getHasSuperimposedViews()); } if (other.hasProperties()) { mergeProperties(other.getProperties()); } switch (other.getActionCase()) { case NAVIGATE_ACTION: { mergeNavigateAction(other.getNavigateAction()); break; } case ACTION_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Action parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (Action) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int actionCase_ = 0; private Object action_; public ActionCase getActionCase() { return ActionCase.forNumber( actionCase_); } public Builder clearAction() { actionCase_ = 0; action_ = null; onChanged(); return this; } private long platformId_ ; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ @Override public long getPlatformId() { return platformId_; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @param value The platformId to set. * @return This builder for chaining. */ public Builder setPlatformId(long value) { platformId_ = value; onChanged(); return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return This builder for chaining. */ public Builder clearPlatformId() { platformId_ = 0L; onChanged(); return this; } private ai.promoted.proto.common.UserInfo userInfo_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder> userInfoBuilder_; /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ public boolean hasUserInfo() { return userInfoBuilder_ != null || userInfo_ != null; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ public ai.promoted.proto.common.UserInfo getUserInfo() { if (userInfoBuilder_ == null) { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } else { return userInfoBuilder_.getMessage(); } } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder setUserInfo(ai.promoted.proto.common.UserInfo value) { if (userInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } userInfo_ = value; onChanged(); } else { userInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder setUserInfo( ai.promoted.proto.common.UserInfo.Builder builderForValue) { if (userInfoBuilder_ == null) { userInfo_ = builderForValue.build(); onChanged(); } else { userInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder mergeUserInfo(ai.promoted.proto.common.UserInfo value) { if (userInfoBuilder_ == null) { if (userInfo_ != null) { userInfo_ = ai.promoted.proto.common.UserInfo.newBuilder(userInfo_).mergeFrom(value).buildPartial(); } else { userInfo_ = value; } onChanged(); } else { userInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public Builder clearUserInfo() { if (userInfoBuilder_ == null) { userInfo_ = null; onChanged(); } else { userInfo_ = null; userInfoBuilder_ = null; } return this; } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public ai.promoted.proto.common.UserInfo.Builder getUserInfoBuilder() { onChanged(); return getUserInfoFieldBuilder().getBuilder(); } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ public ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder() { if (userInfoBuilder_ != null) { return userInfoBuilder_.getMessageOrBuilder(); } else { return userInfo_ == null ? ai.promoted.proto.common.UserInfo.getDefaultInstance() : userInfo_; } } /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder> getUserInfoFieldBuilder() { if (userInfoBuilder_ == null) { userInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.UserInfo, ai.promoted.proto.common.UserInfo.Builder, ai.promoted.proto.common.UserInfoOrBuilder>( getUserInfo(), getParentForChildren(), isClean()); userInfo_ = null; } return userInfoBuilder_; } private ai.promoted.proto.common.Timing timing_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder> timingBuilder_; /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ public boolean hasTiming() { return timingBuilder_ != null || timing_ != null; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ public ai.promoted.proto.common.Timing getTiming() { if (timingBuilder_ == null) { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } else { return timingBuilder_.getMessage(); } } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder setTiming(ai.promoted.proto.common.Timing value) { if (timingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timing_ = value; onChanged(); } else { timingBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder setTiming( ai.promoted.proto.common.Timing.Builder builderForValue) { if (timingBuilder_ == null) { timing_ = builderForValue.build(); onChanged(); } else { timingBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder mergeTiming(ai.promoted.proto.common.Timing value) { if (timingBuilder_ == null) { if (timing_ != null) { timing_ = ai.promoted.proto.common.Timing.newBuilder(timing_).mergeFrom(value).buildPartial(); } else { timing_ = value; } onChanged(); } else { timingBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public Builder clearTiming() { if (timingBuilder_ == null) { timing_ = null; onChanged(); } else { timing_ = null; timingBuilder_ = null; } return this; } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public ai.promoted.proto.common.Timing.Builder getTimingBuilder() { onChanged(); return getTimingFieldBuilder().getBuilder(); } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ public ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder() { if (timingBuilder_ != null) { return timingBuilder_.getMessageOrBuilder(); } else { return timing_ == null ? ai.promoted.proto.common.Timing.getDefaultInstance() : timing_; } } /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder> getTimingFieldBuilder() { if (timingBuilder_ == null) { timingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Timing, ai.promoted.proto.common.Timing.Builder, ai.promoted.proto.common.TimingOrBuilder>( getTiming(), getParentForChildren(), isClean()); timing_ = null; } return timingBuilder_; } private ai.promoted.proto.common.ClientInfo clientInfo_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder> clientInfoBuilder_; /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ public boolean hasClientInfo() { return clientInfoBuilder_ != null || clientInfo_ != null; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ public ai.promoted.proto.common.ClientInfo getClientInfo() { if (clientInfoBuilder_ == null) { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } else { return clientInfoBuilder_.getMessage(); } } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder setClientInfo(ai.promoted.proto.common.ClientInfo value) { if (clientInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } clientInfo_ = value; onChanged(); } else { clientInfoBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder setClientInfo( ai.promoted.proto.common.ClientInfo.Builder builderForValue) { if (clientInfoBuilder_ == null) { clientInfo_ = builderForValue.build(); onChanged(); } else { clientInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder mergeClientInfo(ai.promoted.proto.common.ClientInfo value) { if (clientInfoBuilder_ == null) { if (clientInfo_ != null) { clientInfo_ = ai.promoted.proto.common.ClientInfo.newBuilder(clientInfo_).mergeFrom(value).buildPartial(); } else { clientInfo_ = value; } onChanged(); } else { clientInfoBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public Builder clearClientInfo() { if (clientInfoBuilder_ == null) { clientInfo_ = null; onChanged(); } else { clientInfo_ = null; clientInfoBuilder_ = null; } return this; } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public ai.promoted.proto.common.ClientInfo.Builder getClientInfoBuilder() { onChanged(); return getClientInfoFieldBuilder().getBuilder(); } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ public ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder() { if (clientInfoBuilder_ != null) { return clientInfoBuilder_.getMessageOrBuilder(); } else { return clientInfo_ == null ? ai.promoted.proto.common.ClientInfo.getDefaultInstance() : clientInfo_; } } /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder> getClientInfoFieldBuilder() { if (clientInfoBuilder_ == null) { clientInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.ClientInfo, ai.promoted.proto.common.ClientInfo.Builder, ai.promoted.proto.common.ClientInfoOrBuilder>( getClientInfo(), getParentForChildren(), isClean()); clientInfo_ = null; } return clientInfoBuilder_; } private Object actionId_ = ""; /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return The actionId. */ public String getActionId() { Object ref = actionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); actionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return The bytes for actionId. */ public com.google.protobuf.ByteString getActionIdBytes() { Object ref = actionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); actionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @param value The actionId to set. * @return This builder for chaining. */ public Builder setActionId( String value) { if (value == null) { throw new NullPointerException(); } actionId_ = value; onChanged(); return this; } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return This builder for chaining. */ public Builder clearActionId() { actionId_ = getDefaultInstance().getActionId(); onChanged(); return this; } /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @param value The bytes for actionId to set. * @return This builder for chaining. */ public Builder setActionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); actionId_ = value; onChanged(); return this; } private Object impressionId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return The impressionId. */ public String getImpressionId() { Object ref = impressionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); impressionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return The bytes for impressionId. */ public com.google.protobuf.ByteString getImpressionIdBytes() { Object ref = impressionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); impressionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @param value The impressionId to set. * @return This builder for chaining. */ public Builder setImpressionId( String value) { if (value == null) { throw new NullPointerException(); } impressionId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return This builder for chaining. */ public Builder clearImpressionId() { impressionId_ = getDefaultInstance().getImpressionId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @param value The bytes for impressionId to set. * @return This builder for chaining. */ public Builder setImpressionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); impressionId_ = value; onChanged(); return this; } private Object insertionId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return The insertionId. */ public String getInsertionId() { Object ref = insertionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); insertionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return The bytes for insertionId. */ public com.google.protobuf.ByteString getInsertionIdBytes() { Object ref = insertionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); insertionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @param value The insertionId to set. * @return This builder for chaining. */ public Builder setInsertionId( String value) { if (value == null) { throw new NullPointerException(); } insertionId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return This builder for chaining. */ public Builder clearInsertionId() { insertionId_ = getDefaultInstance().getInsertionId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @param value The bytes for insertionId to set. * @return This builder for chaining. */ public Builder setInsertionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); insertionId_ = value; onChanged(); return this; } private Object requestId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return The requestId. */ public String getRequestId() { Object ref = requestId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); requestId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return The bytes for requestId. */ public com.google.protobuf.ByteString getRequestIdBytes() { Object ref = requestId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); requestId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @param value The requestId to set. * @return This builder for chaining. */ public Builder setRequestId( String value) { if (value == null) { throw new NullPointerException(); } requestId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return This builder for chaining. */ public Builder clearRequestId() { requestId_ = getDefaultInstance().getRequestId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @param value The bytes for requestId to set. * @return This builder for chaining. */ public Builder setRequestIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); requestId_ = value; onChanged(); return this; } private Object viewId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return The viewId. */ public String getViewId() { Object ref = viewId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); viewId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return The bytes for viewId. */ public com.google.protobuf.ByteString getViewIdBytes() { Object ref = viewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); viewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @param value The viewId to set. * @return This builder for chaining. */ public Builder setViewId( String value) { if (value == null) { throw new NullPointerException(); } viewId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return This builder for chaining. */ public Builder clearViewId() { viewId_ = getDefaultInstance().getViewId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @param value The bytes for viewId to set. * @return This builder for chaining. */ public Builder setViewIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); viewId_ = value; onChanged(); return this; } private Object autoViewId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return The autoViewId. */ public String getAutoViewId() { Object ref = autoViewId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); autoViewId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return The bytes for autoViewId. */ public com.google.protobuf.ByteString getAutoViewIdBytes() { Object ref = autoViewId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); autoViewId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @param value The autoViewId to set. * @return This builder for chaining. */ public Builder setAutoViewId( String value) { if (value == null) { throw new NullPointerException(); } autoViewId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return This builder for chaining. */ public Builder clearAutoViewId() { autoViewId_ = getDefaultInstance().getAutoViewId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @param value The bytes for autoViewId to set. * @return This builder for chaining. */ public Builder setAutoViewIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); autoViewId_ = value; onChanged(); return this; } private Object sessionId_ = ""; /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return The sessionId. */ public String getSessionId() { Object ref = sessionId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); sessionId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return The bytes for sessionId. */ public com.google.protobuf.ByteString getSessionIdBytes() { Object ref = sessionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); sessionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @param value The sessionId to set. * @return This builder for chaining. */ public Builder setSessionId( String value) { if (value == null) { throw new NullPointerException(); } sessionId_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return This builder for chaining. */ public Builder clearSessionId() { sessionId_ = getDefaultInstance().getSessionId(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @param value The bytes for sessionId to set. * @return This builder for chaining. */ public Builder setSessionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); sessionId_ = value; onChanged(); return this; } private Object contentId_ = ""; /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return The contentId. */ public String getContentId() { Object ref = contentId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); contentId_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return The bytes for contentId. */ public com.google.protobuf.ByteString getContentIdBytes() { Object ref = contentId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); contentId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @param value The contentId to set. * @return This builder for chaining. */ public Builder setContentId( String value) { if (value == null) { throw new NullPointerException(); } contentId_ = value; onChanged(); return this; } /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return This builder for chaining. */ public Builder clearContentId() { contentId_ = getDefaultInstance().getContentId(); onChanged(); return this; } /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @param value The bytes for contentId to set. * @return This builder for chaining. */ public Builder setContentIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); contentId_ = value; onChanged(); return this; } private Object name_ = ""; /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return The name. */ public String getName() { Object ref = name_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); name_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @param value The name to set. * @return This builder for chaining. */ public Builder setName( String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private int actionType_ = 0; /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return The enum numeric value on the wire for actionType. */ @Override public int getActionTypeValue() { return actionType_; } /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @param value The enum numeric value on the wire for actionType to set. * @return This builder for chaining. */ public Builder setActionTypeValue(int value) { actionType_ = value; onChanged(); return this; } /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return The actionType. */ @Override public ActionType getActionType() { @SuppressWarnings("deprecation") ActionType result = ActionType.valueOf(actionType_); return result == null ? ActionType.UNRECOGNIZED : result; } /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @param value The actionType to set. * @return This builder for chaining. */ public Builder setActionType(ActionType value) { if (value == null) { throw new NullPointerException(); } actionType_ = value.getNumber(); onChanged(); return this; } /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return This builder for chaining. */ public Builder clearActionType() { actionType_ = 0; onChanged(); return this; } private Object customActionType_ = ""; /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return The customActionType. */ public String getCustomActionType() { Object ref = customActionType_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); customActionType_ = s; return s; } else { return (String) ref; } } /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return The bytes for customActionType. */ public com.google.protobuf.ByteString getCustomActionTypeBytes() { Object ref = customActionType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); customActionType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @param value The customActionType to set. * @return This builder for chaining. */ public Builder setCustomActionType( String value) { if (value == null) { throw new NullPointerException(); } customActionType_ = value; onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return This builder for chaining. */ public Builder clearCustomActionType() { customActionType_ = getDefaultInstance().getCustomActionType(); onChanged(); return this; } /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @param value The bytes for customActionType to set. * @return This builder for chaining. */ public Builder setCustomActionTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); customActionType_ = value; onChanged(); return this; } private Object elementId_ = ""; /** * <code>string element_id = 17;</code> * @return The elementId. */ public String getElementId() { Object ref = elementId_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); elementId_ = s; return s; } else { return (String) ref; } } /** * <code>string element_id = 17;</code> * @return The bytes for elementId. */ public com.google.protobuf.ByteString getElementIdBytes() { Object ref = elementId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); elementId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string element_id = 17;</code> * @param value The elementId to set. * @return This builder for chaining. */ public Builder setElementId( String value) { if (value == null) { throw new NullPointerException(); } elementId_ = value; onChanged(); return this; } /** * <code>string element_id = 17;</code> * @return This builder for chaining. */ public Builder clearElementId() { elementId_ = getDefaultInstance().getElementId(); onChanged(); return this; } /** * <code>string element_id = 17;</code> * @param value The bytes for elementId to set. * @return This builder for chaining. */ public Builder setElementIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); elementId_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< NavigateAction, NavigateAction.Builder, NavigateActionOrBuilder> navigateActionBuilder_; /** * <code>.event.NavigateAction navigate_action = 18;</code> * @return Whether the navigateAction field is set. */ @Override public boolean hasNavigateAction() { return actionCase_ == 18; } /** * <code>.event.NavigateAction navigate_action = 18;</code> * @return The navigateAction. */ @Override public NavigateAction getNavigateAction() { if (navigateActionBuilder_ == null) { if (actionCase_ == 18) { return (NavigateAction) action_; } return NavigateAction.getDefaultInstance(); } else { if (actionCase_ == 18) { return navigateActionBuilder_.getMessage(); } return NavigateAction.getDefaultInstance(); } } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ public Builder setNavigateAction(NavigateAction value) { if (navigateActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } action_ = value; onChanged(); } else { navigateActionBuilder_.setMessage(value); } actionCase_ = 18; return this; } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ public Builder setNavigateAction( NavigateAction.Builder builderForValue) { if (navigateActionBuilder_ == null) { action_ = builderForValue.build(); onChanged(); } else { navigateActionBuilder_.setMessage(builderForValue.build()); } actionCase_ = 18; return this; } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ public Builder mergeNavigateAction(NavigateAction value) { if (navigateActionBuilder_ == null) { if (actionCase_ == 18 && action_ != NavigateAction.getDefaultInstance()) { action_ = NavigateAction.newBuilder((NavigateAction) action_) .mergeFrom(value).buildPartial(); } else { action_ = value; } onChanged(); } else { if (actionCase_ == 18) { navigateActionBuilder_.mergeFrom(value); } navigateActionBuilder_.setMessage(value); } actionCase_ = 18; return this; } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ public Builder clearNavigateAction() { if (navigateActionBuilder_ == null) { if (actionCase_ == 18) { actionCase_ = 0; action_ = null; onChanged(); } } else { if (actionCase_ == 18) { actionCase_ = 0; action_ = null; } navigateActionBuilder_.clear(); } return this; } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ public NavigateAction.Builder getNavigateActionBuilder() { return getNavigateActionFieldBuilder().getBuilder(); } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ @Override public NavigateActionOrBuilder getNavigateActionOrBuilder() { if ((actionCase_ == 18) && (navigateActionBuilder_ != null)) { return navigateActionBuilder_.getMessageOrBuilder(); } else { if (actionCase_ == 18) { return (NavigateAction) action_; } return NavigateAction.getDefaultInstance(); } } /** * <code>.event.NavigateAction navigate_action = 18;</code> */ private com.google.protobuf.SingleFieldBuilderV3< NavigateAction, NavigateAction.Builder, NavigateActionOrBuilder> getNavigateActionFieldBuilder() { if (navigateActionBuilder_ == null) { if (!(actionCase_ == 18)) { action_ = NavigateAction.getDefaultInstance(); } navigateActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< NavigateAction, NavigateAction.Builder, NavigateActionOrBuilder>( (NavigateAction) action_, getParentForChildren(), isClean()); action_ = null; } actionCase_ = 18; onChanged();; return navigateActionBuilder_; } private boolean hasSuperimposedViews_ ; /** * <pre> * Optional. Indicates that this action occurred in a view that may * not be topmost in the view hierarchy. * </pre> * * <code>bool has_superimposed_views = 22;</code> * @return The hasSuperimposedViews. */ @Override public boolean getHasSuperimposedViews() { return hasSuperimposedViews_; } /** * <pre> * Optional. Indicates that this action occurred in a view that may * not be topmost in the view hierarchy. * </pre> * * <code>bool has_superimposed_views = 22;</code> * @param value The hasSuperimposedViews to set. * @return This builder for chaining. */ public Builder setHasSuperimposedViews(boolean value) { hasSuperimposedViews_ = value; onChanged(); return this; } /** * <pre> * Optional. Indicates that this action occurred in a view that may * not be topmost in the view hierarchy. * </pre> * * <code>bool has_superimposed_views = 22;</code> * @return This builder for chaining. */ public Builder clearHasSuperimposedViews() { hasSuperimposedViews_ = false; onChanged(); return this; } private ai.promoted.proto.common.Properties properties_; private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder> propertiesBuilder_; /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> * @return Whether the properties field is set. */ public boolean hasProperties() { return propertiesBuilder_ != null || properties_ != null; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> * @return The properties. */ public ai.promoted.proto.common.Properties getProperties() { if (propertiesBuilder_ == null) { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } else { return propertiesBuilder_.getMessage(); } } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ public Builder setProperties(ai.promoted.proto.common.Properties value) { if (propertiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } properties_ = value; onChanged(); } else { propertiesBuilder_.setMessage(value); } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ public Builder setProperties( ai.promoted.proto.common.Properties.Builder builderForValue) { if (propertiesBuilder_ == null) { properties_ = builderForValue.build(); onChanged(); } else { propertiesBuilder_.setMessage(builderForValue.build()); } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ public Builder mergeProperties(ai.promoted.proto.common.Properties value) { if (propertiesBuilder_ == null) { if (properties_ != null) { properties_ = ai.promoted.proto.common.Properties.newBuilder(properties_).mergeFrom(value).buildPartial(); } else { properties_ = value; } onChanged(); } else { propertiesBuilder_.mergeFrom(value); } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ public Builder clearProperties() { if (propertiesBuilder_ == null) { properties_ = null; onChanged(); } else { properties_ = null; propertiesBuilder_ = null; } return this; } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ public ai.promoted.proto.common.Properties.Builder getPropertiesBuilder() { onChanged(); return getPropertiesFieldBuilder().getBuilder(); } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ public ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder() { if (propertiesBuilder_ != null) { return propertiesBuilder_.getMessageOrBuilder(); } else { return properties_ == null ? ai.promoted.proto.common.Properties.getDefaultInstance() : properties_; } } /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder> getPropertiesFieldBuilder() { if (propertiesBuilder_ == null) { propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.promoted.proto.common.Properties, ai.promoted.proto.common.Properties.Builder, ai.promoted.proto.common.PropertiesOrBuilder>( getProperties(), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:event.Action) } // @@protoc_insertion_point(class_scope:event.Action) private static final Action DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new Action(); } public static Action getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Action> PARSER = new com.google.protobuf.AbstractParser<Action>() { @Override public Action parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Action(input, extensionRegistry); } }; public static com.google.protobuf.Parser<Action> parser() { return PARSER; } @Override public com.google.protobuf.Parser<Action> getParserForType() { return PARSER; } @Override public Action getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto
java-sources/ai/promoted/android-metrics-sdk/1.1.6/ai/promoted/proto/event/ActionOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/event/event.proto package ai.promoted.proto.event; public interface ActionOrBuilder extends // @@protoc_insertion_point(interface_extends:event.Action) com.google.protobuf.MessageOrBuilder { /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.platform_id. * </pre> * * <code>uint64 platform_id = 1;</code> * @return The platformId. */ long getPlatformId(); /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return Whether the userInfo field is set. */ boolean hasUserInfo(); /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> * @return The userInfo. */ ai.promoted.proto.common.UserInfo getUserInfo(); /** * <pre> * Optional. Must be set on LogRequest or here. * </pre> * * <code>.common.UserInfo user_info = 2;</code> */ ai.promoted.proto.common.UserInfoOrBuilder getUserInfoOrBuilder(); /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return Whether the timing field is set. */ boolean hasTiming(); /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> * @return The timing. */ ai.promoted.proto.common.Timing getTiming(); /** * <pre> * Optional. If not set, set by API servers. * If not set, API server uses LogRequest.timing. * </pre> * * <code>.common.Timing timing = 3;</code> */ ai.promoted.proto.common.TimingOrBuilder getTimingOrBuilder(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return Whether the clientInfo field is set. */ boolean hasClientInfo(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> * @return The clientInfo. */ ai.promoted.proto.common.ClientInfo getClientInfo(); /** * <pre> * Optional. If not set, API server uses LogRequest.client_info. * </pre> * * <code>.common.ClientInfo client_info = 4;</code> */ ai.promoted.proto.common.ClientInfoOrBuilder getClientInfoOrBuilder(); /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return The actionId. */ String getActionId(); /** * <pre> * Optional. Primary key. * SDKs usually handles this automatically. For details, see * https://github.com/promotedai/schema#setting-primary-keys * </pre> * * <code>string action_id = 6;</code> * @return The bytes for actionId. */ com.google.protobuf.ByteString getActionIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return The impressionId. */ String getImpressionId(); /** * <pre> * Optional. * </pre> * * <code>string impression_id = 7;</code> * @return The bytes for impressionId. */ com.google.protobuf.ByteString getImpressionIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return The insertionId. */ String getInsertionId(); /** * <pre> * Optional. * </pre> * * <code>string insertion_id = 8;</code> * @return The bytes for insertionId. */ com.google.protobuf.ByteString getInsertionIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return The requestId. */ String getRequestId(); /** * <pre> * Optional. * </pre> * * <code>string request_id = 9;</code> * @return The bytes for requestId. */ com.google.protobuf.ByteString getRequestIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return The viewId. */ String getViewId(); /** * <pre> * Optional. * </pre> * * <code>string view_id = 11;</code> * @return The bytes for viewId. */ com.google.protobuf.ByteString getViewIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return The autoViewId. */ String getAutoViewId(); /** * <pre> * Optional. * </pre> * * <code>string auto_view_id = 23;</code> * @return The bytes for autoViewId. */ com.google.protobuf.ByteString getAutoViewIdBytes(); /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return The sessionId. */ String getSessionId(); /** * <pre> * Optional. * </pre> * * <code>string session_id = 10;</code> * @return The bytes for sessionId. */ com.google.protobuf.ByteString getSessionIdBytes(); /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return The contentId. */ String getContentId(); /** * <pre> * Optional. content_id is used as a hint when impression_id is not set. * For more accurate results, set impression_id if available. * </pre> * * <code>string content_id = 21;</code> * @return The bytes for contentId. */ com.google.protobuf.ByteString getContentIdBytes(); /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return The name. */ String getName(); /** * <pre> * Optional. Custom name of the action that the user performed. * E.g. "Product clicked". Do not stick parameters or pii in this name. * </pre> * * <code>string name = 12;</code> * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return The enum numeric value on the wire for actionType. */ int getActionTypeValue(); /** * <pre> * Optional. The action that the user wants to perform. * </pre> * * <code>.event.ActionType action_type = 14;</code> * @return The actionType. */ ActionType getActionType(); /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return The customActionType. */ String getCustomActionType(); /** * <pre> * Optional. * </pre> * * <code>string custom_action_type = 15;</code> * @return The bytes for customActionType. */ com.google.protobuf.ByteString getCustomActionTypeBytes(); /** * <code>string element_id = 17;</code> * @return The elementId. */ String getElementId(); /** * <code>string element_id = 17;</code> * @return The bytes for elementId. */ com.google.protobuf.ByteString getElementIdBytes(); /** * <code>.event.NavigateAction navigate_action = 18;</code> * @return Whether the navigateAction field is set. */ boolean hasNavigateAction(); /** * <code>.event.NavigateAction navigate_action = 18;</code> * @return The navigateAction. */ NavigateAction getNavigateAction(); /** * <code>.event.NavigateAction navigate_action = 18;</code> */ NavigateActionOrBuilder getNavigateActionOrBuilder(); /** * <pre> * Optional. Indicates that this action occurred in a view that may * not be topmost in the view hierarchy. * </pre> * * <code>bool has_superimposed_views = 22;</code> * @return The hasSuperimposedViews. */ boolean getHasSuperimposedViews(); /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> * @return Whether the properties field is set. */ boolean hasProperties(); /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> * @return The properties. */ ai.promoted.proto.common.Properties getProperties(); /** * <pre> * Optional. Custom properties per platform. * </pre> * * <code>.common.Properties properties = 20;</code> */ ai.promoted.proto.common.PropertiesOrBuilder getPropertiesOrBuilder(); public Action.ActionCase getActionCase(); }