compile group: 'androidx.wear.protolayout', name: 'protolayout-proto', version: '1.2.0'
Artifact androidx.wear.protolayout:protolayout-proto:1.2.0 it located at Google repository (https://maven.google.com/)
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: color.proto
package androidx.wear.protolayout.proto;
public final class ColorProto {
private ColorProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface ColorPropOrBuilder extends
// @@protoc_insertion_point(interface_extends:androidx.wear.protolayout.proto.ColorProp)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return Whether the argb field is set.
*/
boolean hasArgb();
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return The argb.
*/
int getArgb();
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
* @return Whether the dynamicValue field is set.
*/
boolean hasDynamicValue();
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
* @return The dynamicValue.
*/
androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor getDynamicValue();
public androidx.wear.protolayout.proto.ColorProto.ColorProp.OptionalArgbCase getOptionalArgbCase();
}
/**
* <pre>
* A property defining a color.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.ColorProp}
*/
public static final class ColorProp extends
com.google.protobuf.GeneratedMessageLite<
ColorProp, ColorProp.Builder> implements
// @@protoc_insertion_point(message_implements:androidx.wear.protolayout.proto.ColorProp)
ColorPropOrBuilder {
private ColorProp() {
}
private int optionalArgbCase_ = 0;
private java.lang.Object optionalArgb_;
public enum OptionalArgbCase {
ARGB(1),
OPTIONALARGB_NOT_SET(0);
private final int value;
private OptionalArgbCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OptionalArgbCase valueOf(int value) {
return forNumber(value);
}
public static OptionalArgbCase forNumber(int value) {
switch (value) {
case 1: return ARGB;
case 0: return OPTIONALARGB_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public OptionalArgbCase
getOptionalArgbCase() {
return OptionalArgbCase.forNumber(
optionalArgbCase_);
}
private void clearOptionalArgb() {
optionalArgbCase_ = 0;
optionalArgb_ = null;
}
public static final int ARGB_FIELD_NUMBER = 1;
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return Whether the argb field is set.
*/
@java.lang.Override
public boolean hasArgb() {
return optionalArgbCase_ == 1;
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return The argb.
*/
@java.lang.Override
public int getArgb() {
if (optionalArgbCase_ == 1) {
return (java.lang.Integer) optionalArgb_;
}
return 0;
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @param value The argb to set.
*/
private void setArgb(int value) {
optionalArgbCase_ = 1;
optionalArgb_ = value;
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
*/
private void clearArgb() {
if (optionalArgbCase_ == 1) {
optionalArgbCase_ = 0;
optionalArgb_ = null;
}
}
public static final int DYNAMIC_VALUE_FIELD_NUMBER = 2;
private androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor dynamicValue_;
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
@java.lang.Override
public boolean hasDynamicValue() {
return dynamicValue_ != null;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor getDynamicValue() {
return dynamicValue_ == null ? androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor.getDefaultInstance() : dynamicValue_;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
private void setDynamicValue(androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor value) {
value.getClass();
dynamicValue_ = value;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeDynamicValue(androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor value) {
value.getClass();
if (dynamicValue_ != null &&
dynamicValue_ != androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor.getDefaultInstance()) {
dynamicValue_ =
androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor.newBuilder(dynamicValue_).mergeFrom(value).buildPartial();
} else {
dynamicValue_ = value;
}
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
private void clearDynamicValue() { dynamicValue_ = null;
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(androidx.wear.protolayout.proto.ColorProto.ColorProp prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* <pre>
* A property defining a color.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.ColorProp}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
androidx.wear.protolayout.proto.ColorProto.ColorProp, Builder> implements
// @@protoc_insertion_point(builder_implements:androidx.wear.protolayout.proto.ColorProp)
androidx.wear.protolayout.proto.ColorProto.ColorPropOrBuilder {
// Construct using androidx.wear.protolayout.proto.ColorProto.ColorProp.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public OptionalArgbCase
getOptionalArgbCase() {
return instance.getOptionalArgbCase();
}
public Builder clearOptionalArgb() {
copyOnWrite();
instance.clearOptionalArgb();
return this;
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return Whether the argb field is set.
*/
@java.lang.Override
public boolean hasArgb() {
return instance.hasArgb();
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return The argb.
*/
@java.lang.Override
public int getArgb() {
return instance.getArgb();
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @param value The argb to set.
* @return This builder for chaining.
*/
public Builder setArgb(int value) {
copyOnWrite();
instance.setArgb(value);
return this;
}
/**
* <pre>
* The static color value, in ARGB format. If a dynamic value is also set
* and the renderer supports dynamic values for the corresponding field,
* this static value will be ignored. If the static value is not specified,
* zero (equivalent to {@link Color#TRANSPARENT}) will be used instead.
* </pre>
*
* <code>uint32 argb = 1;</code>
* @return This builder for chaining.
*/
public Builder clearArgb() {
copyOnWrite();
instance.clearArgb();
return this;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
@java.lang.Override
public boolean hasDynamicValue() {
return instance.hasDynamicValue();
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor getDynamicValue() {
return instance.getDynamicValue();
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
public Builder setDynamicValue(androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor value) {
copyOnWrite();
instance.setDynamicValue(value);
return this;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
public Builder setDynamicValue(
androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor.Builder builderForValue) {
copyOnWrite();
instance.setDynamicValue(builderForValue.build());
return this;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
public Builder mergeDynamicValue(androidx.wear.protolayout.expression.proto.DynamicProto.DynamicColor value) {
copyOnWrite();
instance.mergeDynamicValue(value);
return this;
}
/**
* <pre>
* The dynamic value. Note that when setting this value, the static value is
* still required to be set to support older renderers that only read the
* static value. If {@code dynamicValue} has an invalid result, the provided
* static value will be used instead.
* </pre>
*
* <code>.androidx.wear.protolayout.expression.proto.DynamicColor dynamic_value = 2;</code>
*/
public Builder clearDynamicValue() { copyOnWrite();
instance.clearDynamicValue();
return this;
}
// @@protoc_insertion_point(builder_scope:androidx.wear.protolayout.proto.ColorProp)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new androidx.wear.protolayout.proto.ColorProto.ColorProp();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"optionalArgb_",
"optionalArgbCase_",
"dynamicValue_",
};
java.lang.String info =
"\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001>\u0000\u0002\t" +
"";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser<androidx.wear.protolayout.proto.ColorProto.ColorProp> parser = PARSER;
if (parser == null) {
synchronized (androidx.wear.protolayout.proto.ColorProto.ColorProp.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser<androidx.wear.protolayout.proto.ColorProto.ColorProp>(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:androidx.wear.protolayout.proto.ColorProp)
private static final androidx.wear.protolayout.proto.ColorProto.ColorProp DEFAULT_INSTANCE;
static {
ColorProp defaultInstance = new ColorProp();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ColorProp.class, defaultInstance);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorProp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<ColorProp> PARSER;
public static com.google.protobuf.Parser<ColorProp> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface ColorStopOrBuilder extends
// @@protoc_insertion_point(interface_extends:androidx.wear.protolayout.proto.ColorStop)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
* @return Whether the color field is set.
*/
boolean hasColor();
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
* @return The color.
*/
androidx.wear.protolayout.proto.ColorProto.ColorProp getColor();
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
* @return Whether the offset field is set.
*/
boolean hasOffset();
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
* @return The offset.
*/
androidx.wear.protolayout.proto.TypesProto.FloatProp getOffset();
public androidx.wear.protolayout.proto.ColorProto.ColorStop.OptionalOffsetCase getOptionalOffsetCase();
}
/**
* <pre>
* A color and an offset, determining a color position in a gradient.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.ColorStop}
*/
public static final class ColorStop extends
com.google.protobuf.GeneratedMessageLite<
ColorStop, ColorStop.Builder> implements
// @@protoc_insertion_point(message_implements:androidx.wear.protolayout.proto.ColorStop)
ColorStopOrBuilder {
private ColorStop() {
}
private int optionalOffsetCase_ = 0;
private java.lang.Object optionalOffset_;
public enum OptionalOffsetCase {
OFFSET(2),
OPTIONALOFFSET_NOT_SET(0);
private final int value;
private OptionalOffsetCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OptionalOffsetCase valueOf(int value) {
return forNumber(value);
}
public static OptionalOffsetCase forNumber(int value) {
switch (value) {
case 2: return OFFSET;
case 0: return OPTIONALOFFSET_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public OptionalOffsetCase
getOptionalOffsetCase() {
return OptionalOffsetCase.forNumber(
optionalOffsetCase_);
}
private void clearOptionalOffset() {
optionalOffsetCase_ = 0;
optionalOffset_ = null;
}
public static final int COLOR_FIELD_NUMBER = 1;
private androidx.wear.protolayout.proto.ColorProto.ColorProp color_;
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
@java.lang.Override
public boolean hasColor() {
return color_ != null;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.ColorProto.ColorProp getColor() {
return color_ == null ? androidx.wear.protolayout.proto.ColorProto.ColorProp.getDefaultInstance() : color_;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
private void setColor(androidx.wear.protolayout.proto.ColorProto.ColorProp value) {
value.getClass();
color_ = value;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeColor(androidx.wear.protolayout.proto.ColorProto.ColorProp value) {
value.getClass();
if (color_ != null &&
color_ != androidx.wear.protolayout.proto.ColorProto.ColorProp.getDefaultInstance()) {
color_ =
androidx.wear.protolayout.proto.ColorProto.ColorProp.newBuilder(color_).mergeFrom(value).buildPartial();
} else {
color_ = value;
}
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
private void clearColor() { color_ = null;
}
public static final int OFFSET_FIELD_NUMBER = 2;
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
@java.lang.Override
public boolean hasOffset() {
return optionalOffsetCase_ == 2;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.TypesProto.FloatProp getOffset() {
if (optionalOffsetCase_ == 2) {
return (androidx.wear.protolayout.proto.TypesProto.FloatProp) optionalOffset_;
}
return androidx.wear.protolayout.proto.TypesProto.FloatProp.getDefaultInstance();
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
private void setOffset(androidx.wear.protolayout.proto.TypesProto.FloatProp value) {
value.getClass();
optionalOffset_ = value;
optionalOffsetCase_ = 2;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
private void mergeOffset(androidx.wear.protolayout.proto.TypesProto.FloatProp value) {
value.getClass();
if (optionalOffsetCase_ == 2 &&
optionalOffset_ != androidx.wear.protolayout.proto.TypesProto.FloatProp.getDefaultInstance()) {
optionalOffset_ = androidx.wear.protolayout.proto.TypesProto.FloatProp.newBuilder((androidx.wear.protolayout.proto.TypesProto.FloatProp) optionalOffset_)
.mergeFrom(value).buildPartial();
} else {
optionalOffset_ = value;
}
optionalOffsetCase_ = 2;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
private void clearOffset() {
if (optionalOffsetCase_ == 2) {
optionalOffsetCase_ = 0;
optionalOffset_ = null;
}
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(androidx.wear.protolayout.proto.ColorProto.ColorStop prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* <pre>
* A color and an offset, determining a color position in a gradient.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.ColorStop}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
androidx.wear.protolayout.proto.ColorProto.ColorStop, Builder> implements
// @@protoc_insertion_point(builder_implements:androidx.wear.protolayout.proto.ColorStop)
androidx.wear.protolayout.proto.ColorProto.ColorStopOrBuilder {
// Construct using androidx.wear.protolayout.proto.ColorProto.ColorStop.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public OptionalOffsetCase
getOptionalOffsetCase() {
return instance.getOptionalOffsetCase();
}
public Builder clearOptionalOffset() {
copyOnWrite();
instance.clearOptionalOffset();
return this;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
@java.lang.Override
public boolean hasColor() {
return instance.hasColor();
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.ColorProto.ColorProp getColor() {
return instance.getColor();
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
public Builder setColor(androidx.wear.protolayout.proto.ColorProto.ColorProp value) {
copyOnWrite();
instance.setColor(value);
return this;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
public Builder setColor(
androidx.wear.protolayout.proto.ColorProto.ColorProp.Builder builderForValue) {
copyOnWrite();
instance.setColor(builderForValue.build());
return this;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
public Builder mergeColor(androidx.wear.protolayout.proto.ColorProto.ColorProp value) {
copyOnWrite();
instance.mergeColor(value);
return this;
}
/**
* <pre>
* The color for this stop. Only opaque colors are supported. Any transparent
* colors will have their alpha component set to 0xFF (opaque).
* </pre>
*
* <code>.androidx.wear.protolayout.proto.ColorProp color = 1;</code>
*/
public Builder clearColor() { copyOnWrite();
instance.clearColor();
return this;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
@java.lang.Override
public boolean hasOffset() {
return instance.hasOffset();
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.TypesProto.FloatProp getOffset() {
return instance.getOffset();
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
public Builder setOffset(androidx.wear.protolayout.proto.TypesProto.FloatProp value) {
copyOnWrite();
instance.setOffset(value);
return this;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
public Builder setOffset(
androidx.wear.protolayout.proto.TypesProto.FloatProp.Builder builderForValue) {
copyOnWrite();
instance.setOffset(builderForValue.build());
return this;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
public Builder mergeOffset(androidx.wear.protolayout.proto.TypesProto.FloatProp value) {
copyOnWrite();
instance.mergeOffset(value);
return this;
}
/**
* <pre>
* The relative offset for this color, between 0 and 1. This determines
* where the color is positioned relative to a gradient space.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.FloatProp offset = 2;</code>
*/
public Builder clearOffset() {
copyOnWrite();
instance.clearOffset();
return this;
}
// @@protoc_insertion_point(builder_scope:androidx.wear.protolayout.proto.ColorStop)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new androidx.wear.protolayout.proto.ColorProto.ColorStop();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"optionalOffset_",
"optionalOffsetCase_",
"color_",
androidx.wear.protolayout.proto.TypesProto.FloatProp.class,
};
java.lang.String info =
"\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002<\u0000" +
"";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser<androidx.wear.protolayout.proto.ColorProto.ColorStop> parser = PARSER;
if (parser == null) {
synchronized (androidx.wear.protolayout.proto.ColorProto.ColorStop.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser<androidx.wear.protolayout.proto.ColorProto.ColorStop>(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:androidx.wear.protolayout.proto.ColorStop)
private static final androidx.wear.protolayout.proto.ColorProto.ColorStop DEFAULT_INSTANCE;
static {
ColorStop defaultInstance = new ColorStop();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ColorStop.class, defaultInstance);
}
public static androidx.wear.protolayout.proto.ColorProto.ColorStop getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<ColorStop> PARSER;
public static com.google.protobuf.Parser<ColorStop> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface SweepGradientOrBuilder extends
// @@protoc_insertion_point(interface_extends:androidx.wear.protolayout.proto.SweepGradient)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
java.util.List<androidx.wear.protolayout.proto.ColorProto.ColorStop>
getColorStopsList();
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
androidx.wear.protolayout.proto.ColorProto.ColorStop getColorStops(int index);
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
int getColorStopsCount();
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
* @return Whether the startAngle field is set.
*/
boolean hasStartAngle();
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
* @return The startAngle.
*/
androidx.wear.protolayout.proto.DimensionProto.DegreesProp getStartAngle();
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
* @return Whether the endAngle field is set.
*/
boolean hasEndAngle();
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
* @return The endAngle.
*/
androidx.wear.protolayout.proto.DimensionProto.DegreesProp getEndAngle();
}
/**
* <pre>
* A sweep gradient with the given colors dispersed around its center with
* offsets defined in each color stop. The sweep begins at the parent's base
* angle plus the given angular shift and continues clockwise until it reaches
* the starting position again.
*
* The gradient center corresponds to center of the parent element.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.SweepGradient}
*/
public static final class SweepGradient extends
com.google.protobuf.GeneratedMessageLite<
SweepGradient, SweepGradient.Builder> implements
// @@protoc_insertion_point(message_implements:androidx.wear.protolayout.proto.SweepGradient)
SweepGradientOrBuilder {
private SweepGradient() {
colorStops_ = emptyProtobufList();
}
public static final int COLOR_STOPS_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.ProtobufList<androidx.wear.protolayout.proto.ColorProto.ColorStop> colorStops_;
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
@java.lang.Override
public java.util.List<androidx.wear.protolayout.proto.ColorProto.ColorStop> getColorStopsList() {
return colorStops_;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public java.util.List<? extends androidx.wear.protolayout.proto.ColorProto.ColorStopOrBuilder>
getColorStopsOrBuilderList() {
return colorStops_;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
@java.lang.Override
public int getColorStopsCount() {
return colorStops_.size();
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.ColorProto.ColorStop getColorStops(int index) {
return colorStops_.get(index);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public androidx.wear.protolayout.proto.ColorProto.ColorStopOrBuilder getColorStopsOrBuilder(
int index) {
return colorStops_.get(index);
}
private void ensureColorStopsIsMutable() {
com.google.protobuf.Internal.ProtobufList<androidx.wear.protolayout.proto.ColorProto.ColorStop> tmp = colorStops_;
if (!tmp.isModifiable()) {
colorStops_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
}
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
private void setColorStops(
int index, androidx.wear.protolayout.proto.ColorProto.ColorStop value) {
value.getClass();
ensureColorStopsIsMutable();
colorStops_.set(index, value);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
private void addColorStops(androidx.wear.protolayout.proto.ColorProto.ColorStop value) {
value.getClass();
ensureColorStopsIsMutable();
colorStops_.add(value);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
private void addColorStops(
int index, androidx.wear.protolayout.proto.ColorProto.ColorStop value) {
value.getClass();
ensureColorStopsIsMutable();
colorStops_.add(index, value);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
private void addAllColorStops(
java.lang.Iterable<? extends androidx.wear.protolayout.proto.ColorProto.ColorStop> values) {
ensureColorStopsIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, colorStops_);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
private void clearColorStops() {
colorStops_ = emptyProtobufList();
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
private void removeColorStops(int index) {
ensureColorStopsIsMutable();
colorStops_.remove(index);
}
public static final int START_ANGLE_FIELD_NUMBER = 2;
private androidx.wear.protolayout.proto.DimensionProto.DegreesProp startAngle_;
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
@java.lang.Override
public boolean hasStartAngle() {
return startAngle_ != null;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.DimensionProto.DegreesProp getStartAngle() {
return startAngle_ == null ? androidx.wear.protolayout.proto.DimensionProto.DegreesProp.getDefaultInstance() : startAngle_;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
private void setStartAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
value.getClass();
startAngle_ = value;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeStartAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
value.getClass();
if (startAngle_ != null &&
startAngle_ != androidx.wear.protolayout.proto.DimensionProto.DegreesProp.getDefaultInstance()) {
startAngle_ =
androidx.wear.protolayout.proto.DimensionProto.DegreesProp.newBuilder(startAngle_).mergeFrom(value).buildPartial();
} else {
startAngle_ = value;
}
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
private void clearStartAngle() { startAngle_ = null;
}
public static final int END_ANGLE_FIELD_NUMBER = 3;
private androidx.wear.protolayout.proto.DimensionProto.DegreesProp endAngle_;
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
@java.lang.Override
public boolean hasEndAngle() {
return endAngle_ != null;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.DimensionProto.DegreesProp getEndAngle() {
return endAngle_ == null ? androidx.wear.protolayout.proto.DimensionProto.DegreesProp.getDefaultInstance() : endAngle_;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
private void setEndAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
value.getClass();
endAngle_ = value;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeEndAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
value.getClass();
if (endAngle_ != null &&
endAngle_ != androidx.wear.protolayout.proto.DimensionProto.DegreesProp.getDefaultInstance()) {
endAngle_ =
androidx.wear.protolayout.proto.DimensionProto.DegreesProp.newBuilder(endAngle_).mergeFrom(value).buildPartial();
} else {
endAngle_ = value;
}
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
private void clearEndAngle() { endAngle_ = null;
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(androidx.wear.protolayout.proto.ColorProto.SweepGradient prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* <pre>
* A sweep gradient with the given colors dispersed around its center with
* offsets defined in each color stop. The sweep begins at the parent's base
* angle plus the given angular shift and continues clockwise until it reaches
* the starting position again.
*
* The gradient center corresponds to center of the parent element.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.SweepGradient}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
androidx.wear.protolayout.proto.ColorProto.SweepGradient, Builder> implements
// @@protoc_insertion_point(builder_implements:androidx.wear.protolayout.proto.SweepGradient)
androidx.wear.protolayout.proto.ColorProto.SweepGradientOrBuilder {
// Construct using androidx.wear.protolayout.proto.ColorProto.SweepGradient.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
@java.lang.Override
public java.util.List<androidx.wear.protolayout.proto.ColorProto.ColorStop> getColorStopsList() {
return java.util.Collections.unmodifiableList(
instance.getColorStopsList());
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
@java.lang.Override
public int getColorStopsCount() {
return instance.getColorStopsCount();
}/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.ColorProto.ColorStop getColorStops(int index) {
return instance.getColorStops(index);
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder setColorStops(
int index, androidx.wear.protolayout.proto.ColorProto.ColorStop value) {
copyOnWrite();
instance.setColorStops(index, value);
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder setColorStops(
int index, androidx.wear.protolayout.proto.ColorProto.ColorStop.Builder builderForValue) {
copyOnWrite();
instance.setColorStops(index,
builderForValue.build());
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder addColorStops(androidx.wear.protolayout.proto.ColorProto.ColorStop value) {
copyOnWrite();
instance.addColorStops(value);
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder addColorStops(
int index, androidx.wear.protolayout.proto.ColorProto.ColorStop value) {
copyOnWrite();
instance.addColorStops(index, value);
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder addColorStops(
androidx.wear.protolayout.proto.ColorProto.ColorStop.Builder builderForValue) {
copyOnWrite();
instance.addColorStops(builderForValue.build());
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder addColorStops(
int index, androidx.wear.protolayout.proto.ColorProto.ColorStop.Builder builderForValue) {
copyOnWrite();
instance.addColorStops(index,
builderForValue.build());
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder addAllColorStops(
java.lang.Iterable<? extends androidx.wear.protolayout.proto.ColorProto.ColorStop> values) {
copyOnWrite();
instance.addAllColorStops(values);
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder clearColorStops() {
copyOnWrite();
instance.clearColorStops();
return this;
}
/**
* <pre>
* The color stops defining how the colors are distributed around the gradient
* center. The color sequence starts at the start angle and spans 360
* degrees clockwise, finishing at the same angle.
*
* A color stop is a pair of a color and its offset in the gradient.
* The offset is the relative position of the color, beginning with 0 from the
* start angle and ending with 1.0 at the end angle, spanning clockwise.
*
* There must be at least 2 colors and at most 10 colors.
*
* If offset values are not set, the colors are evenly distributed in the
* gradient.
* </pre>
*
* <code>repeated .androidx.wear.protolayout.proto.ColorStop color_stops = 1;</code>
*/
public Builder removeColorStops(int index) {
copyOnWrite();
instance.removeColorStops(index);
return this;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
@java.lang.Override
public boolean hasStartAngle() {
return instance.hasStartAngle();
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.DimensionProto.DegreesProp getStartAngle() {
return instance.getStartAngle();
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
public Builder setStartAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
copyOnWrite();
instance.setStartAngle(value);
return this;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
public Builder setStartAngle(
androidx.wear.protolayout.proto.DimensionProto.DegreesProp.Builder builderForValue) {
copyOnWrite();
instance.setStartAngle(builderForValue.build());
return this;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
public Builder mergeStartAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
copyOnWrite();
instance.mergeStartAngle(value);
return this;
}
/**
* <pre>
* The start angle of the gradient relative to the element's base angle. If
* not set, defaults to zero.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp start_angle = 2;</code>
*/
public Builder clearStartAngle() { copyOnWrite();
instance.clearStartAngle();
return this;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
@java.lang.Override
public boolean hasEndAngle() {
return instance.hasEndAngle();
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.DimensionProto.DegreesProp getEndAngle() {
return instance.getEndAngle();
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
public Builder setEndAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
copyOnWrite();
instance.setEndAngle(value);
return this;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
public Builder setEndAngle(
androidx.wear.protolayout.proto.DimensionProto.DegreesProp.Builder builderForValue) {
copyOnWrite();
instance.setEndAngle(builderForValue.build());
return this;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
public Builder mergeEndAngle(androidx.wear.protolayout.proto.DimensionProto.DegreesProp value) {
copyOnWrite();
instance.mergeEndAngle(value);
return this;
}
/**
* <pre>
* The end angle of the gradient, relative to the element's base angle. If not
* set, defaults to 360 degrees.
*
* For ArcLine, the base angle is the angle where the line starts. The value
* represents a relative position in the line's length span. Values greater
* than 360 degrees correspond to upper layers of the arc line as it wraps
* over itself.
* </pre>
*
* <code>.androidx.wear.protolayout.proto.DegreesProp end_angle = 3;</code>
*/
public Builder clearEndAngle() { copyOnWrite();
instance.clearEndAngle();
return this;
}
// @@protoc_insertion_point(builder_scope:androidx.wear.protolayout.proto.SweepGradient)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new androidx.wear.protolayout.proto.ColorProto.SweepGradient();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"colorStops_",
androidx.wear.protolayout.proto.ColorProto.ColorStop.class,
"startAngle_",
"endAngle_",
};
java.lang.String info =
"\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u001b\u0002\t" +
"\u0003\t";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser<androidx.wear.protolayout.proto.ColorProto.SweepGradient> parser = PARSER;
if (parser == null) {
synchronized (androidx.wear.protolayout.proto.ColorProto.SweepGradient.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser<androidx.wear.protolayout.proto.ColorProto.SweepGradient>(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:androidx.wear.protolayout.proto.SweepGradient)
private static final androidx.wear.protolayout.proto.ColorProto.SweepGradient DEFAULT_INSTANCE;
static {
SweepGradient defaultInstance = new SweepGradient();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
SweepGradient.class, defaultInstance);
}
public static androidx.wear.protolayout.proto.ColorProto.SweepGradient getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<SweepGradient> PARSER;
public static com.google.protobuf.Parser<SweepGradient> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface BrushOrBuilder extends
// @@protoc_insertion_point(interface_extends:androidx.wear.protolayout.proto.Brush)
com.google.protobuf.MessageLiteOrBuilder {
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
* @return Whether the sweepGradient field is set.
*/
boolean hasSweepGradient();
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
* @return The sweepGradient.
*/
androidx.wear.protolayout.proto.ColorProto.SweepGradient getSweepGradient();
public androidx.wear.protolayout.proto.ColorProto.Brush.InnerCase getInnerCase();
}
/**
* <pre>
* A Brush describes how something is drawn on screen.
* It determines the color(s) that are drawn in the drawing area.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.Brush}
*/
public static final class Brush extends
com.google.protobuf.GeneratedMessageLite<
Brush, Brush.Builder> implements
// @@protoc_insertion_point(message_implements:androidx.wear.protolayout.proto.Brush)
BrushOrBuilder {
private Brush() {
}
private int innerCase_ = 0;
private java.lang.Object inner_;
public enum InnerCase {
SWEEP_GRADIENT(1),
INNER_NOT_SET(0);
private final int value;
private InnerCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static InnerCase valueOf(int value) {
return forNumber(value);
}
public static InnerCase forNumber(int value) {
switch (value) {
case 1: return SWEEP_GRADIENT;
case 0: return INNER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public InnerCase
getInnerCase() {
return InnerCase.forNumber(
innerCase_);
}
private void clearInner() {
innerCase_ = 0;
inner_ = null;
}
public static final int SWEEP_GRADIENT_FIELD_NUMBER = 1;
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
@java.lang.Override
public boolean hasSweepGradient() {
return innerCase_ == 1;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.ColorProto.SweepGradient getSweepGradient() {
if (innerCase_ == 1) {
return (androidx.wear.protolayout.proto.ColorProto.SweepGradient) inner_;
}
return androidx.wear.protolayout.proto.ColorProto.SweepGradient.getDefaultInstance();
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
private void setSweepGradient(androidx.wear.protolayout.proto.ColorProto.SweepGradient value) {
value.getClass();
inner_ = value;
innerCase_ = 1;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
private void mergeSweepGradient(androidx.wear.protolayout.proto.ColorProto.SweepGradient value) {
value.getClass();
if (innerCase_ == 1 &&
inner_ != androidx.wear.protolayout.proto.ColorProto.SweepGradient.getDefaultInstance()) {
inner_ = androidx.wear.protolayout.proto.ColorProto.SweepGradient.newBuilder((androidx.wear.protolayout.proto.ColorProto.SweepGradient) inner_)
.mergeFrom(value).buildPartial();
} else {
inner_ = value;
}
innerCase_ = 1;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
private void clearSweepGradient() {
if (innerCase_ == 1) {
innerCase_ = 0;
inner_ = null;
}
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(androidx.wear.protolayout.proto.ColorProto.Brush prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* <pre>
* A Brush describes how something is drawn on screen.
* It determines the color(s) that are drawn in the drawing area.
* </pre>
*
* Protobuf type {@code androidx.wear.protolayout.proto.Brush}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
androidx.wear.protolayout.proto.ColorProto.Brush, Builder> implements
// @@protoc_insertion_point(builder_implements:androidx.wear.protolayout.proto.Brush)
androidx.wear.protolayout.proto.ColorProto.BrushOrBuilder {
// Construct using androidx.wear.protolayout.proto.ColorProto.Brush.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public InnerCase
getInnerCase() {
return instance.getInnerCase();
}
public Builder clearInner() {
copyOnWrite();
instance.clearInner();
return this;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
@java.lang.Override
public boolean hasSweepGradient() {
return instance.hasSweepGradient();
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
@java.lang.Override
public androidx.wear.protolayout.proto.ColorProto.SweepGradient getSweepGradient() {
return instance.getSweepGradient();
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
public Builder setSweepGradient(androidx.wear.protolayout.proto.ColorProto.SweepGradient value) {
copyOnWrite();
instance.setSweepGradient(value);
return this;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
public Builder setSweepGradient(
androidx.wear.protolayout.proto.ColorProto.SweepGradient.Builder builderForValue) {
copyOnWrite();
instance.setSweepGradient(builderForValue.build());
return this;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
public Builder mergeSweepGradient(androidx.wear.protolayout.proto.ColorProto.SweepGradient value) {
copyOnWrite();
instance.mergeSweepGradient(value);
return this;
}
/**
* <code>.androidx.wear.protolayout.proto.SweepGradient sweep_gradient = 1;</code>
*/
public Builder clearSweepGradient() {
copyOnWrite();
instance.clearSweepGradient();
return this;
}
// @@protoc_insertion_point(builder_scope:androidx.wear.protolayout.proto.Brush)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new androidx.wear.protolayout.proto.ColorProto.Brush();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"inner_",
"innerCase_",
androidx.wear.protolayout.proto.ColorProto.SweepGradient.class,
};
java.lang.String info =
"\u0000\u0001\u0001\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001<\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser<androidx.wear.protolayout.proto.ColorProto.Brush> parser = PARSER;
if (parser == null) {
synchronized (androidx.wear.protolayout.proto.ColorProto.Brush.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser<androidx.wear.protolayout.proto.ColorProto.Brush>(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:androidx.wear.protolayout.proto.Brush)
private static final androidx.wear.protolayout.proto.ColorProto.Brush DEFAULT_INSTANCE;
static {
Brush defaultInstance = new Brush();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
Brush.class, defaultInstance);
}
public static androidx.wear.protolayout.proto.ColorProto.Brush getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<Brush> PARSER;
public static com.google.protobuf.Parser<Brush> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
static {
}
// @@protoc_insertion_point(outer_class_scope)
}