All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.apps.card.v1.ImageComponent Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/apps/card/v1/card.proto

// Protobuf Java Version: 3.25.3
package com.google.apps.card.v1;

/**
 *
 *
 * 
 * Represents an image.
 *
 * [Google Workspace Add-ons and Chat
 * apps](https://developers.google.com/workspace/extend):
 * 
* * Protobuf type {@code google.apps.card.v1.ImageComponent} */ public final class ImageComponent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.apps.card.v1.ImageComponent) ImageComponentOrBuilder { private static final long serialVersionUID = 0L; // Use ImageComponent.newBuilder() to construct. private ImageComponent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ImageComponent() { imageUri_ = ""; altText_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ImageComponent(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.apps.card.v1.CardProto .internal_static_google_apps_card_v1_ImageComponent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.apps.card.v1.CardProto .internal_static_google_apps_card_v1_ImageComponent_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.apps.card.v1.ImageComponent.class, com.google.apps.card.v1.ImageComponent.Builder.class); } private int bitField0_; public static final int IMAGE_URI_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object imageUri_ = ""; /** * * *
   * The image URL.
   * 
* * string image_uri = 1; * * @return The imageUri. */ @java.lang.Override public java.lang.String getImageUri() { java.lang.Object ref = imageUri_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); imageUri_ = s; return s; } } /** * * *
   * The image URL.
   * 
* * string image_uri = 1; * * @return The bytes for imageUri. */ @java.lang.Override public com.google.protobuf.ByteString getImageUriBytes() { java.lang.Object ref = imageUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); imageUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ALT_TEXT_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object altText_ = ""; /** * * *
   * The accessibility label for the image.
   * 
* * string alt_text = 2; * * @return The altText. */ @java.lang.Override public java.lang.String getAltText() { java.lang.Object ref = altText_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); altText_ = s; return s; } } /** * * *
   * The accessibility label for the image.
   * 
* * string alt_text = 2; * * @return The bytes for altText. */ @java.lang.Override public com.google.protobuf.ByteString getAltTextBytes() { java.lang.Object ref = altText_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); altText_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CROP_STYLE_FIELD_NUMBER = 3; private com.google.apps.card.v1.ImageCropStyle cropStyle_; /** * * *
   * The crop style to apply to the image.
   * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; * * @return Whether the cropStyle field is set. */ @java.lang.Override public boolean hasCropStyle() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * The crop style to apply to the image.
   * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; * * @return The cropStyle. */ @java.lang.Override public com.google.apps.card.v1.ImageCropStyle getCropStyle() { return cropStyle_ == null ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance() : cropStyle_; } /** * * *
   * The crop style to apply to the image.
   * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ @java.lang.Override public com.google.apps.card.v1.ImageCropStyleOrBuilder getCropStyleOrBuilder() { return cropStyle_ == null ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance() : cropStyle_; } public static final int BORDER_STYLE_FIELD_NUMBER = 4; private com.google.apps.card.v1.BorderStyle borderStyle_; /** * * *
   * The border style to apply to the image.
   * 
* * .google.apps.card.v1.BorderStyle border_style = 4; * * @return Whether the borderStyle field is set. */ @java.lang.Override public boolean hasBorderStyle() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * The border style to apply to the image.
   * 
* * .google.apps.card.v1.BorderStyle border_style = 4; * * @return The borderStyle. */ @java.lang.Override public com.google.apps.card.v1.BorderStyle getBorderStyle() { return borderStyle_ == null ? com.google.apps.card.v1.BorderStyle.getDefaultInstance() : borderStyle_; } /** * * *
   * The border style to apply to the image.
   * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ @java.lang.Override public com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder() { return borderStyle_ == null ? com.google.apps.card.v1.BorderStyle.getDefaultInstance() : borderStyle_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, altText_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getCropStyle()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getBorderStyle()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, altText_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCropStyle()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBorderStyle()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.apps.card.v1.ImageComponent)) { return super.equals(obj); } com.google.apps.card.v1.ImageComponent other = (com.google.apps.card.v1.ImageComponent) obj; if (!getImageUri().equals(other.getImageUri())) return false; if (!getAltText().equals(other.getAltText())) return false; if (hasCropStyle() != other.hasCropStyle()) return false; if (hasCropStyle()) { if (!getCropStyle().equals(other.getCropStyle())) return false; } if (hasBorderStyle() != other.hasBorderStyle()) return false; if (hasBorderStyle()) { if (!getBorderStyle().equals(other.getBorderStyle())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; hash = (53 * hash) + getImageUri().hashCode(); hash = (37 * hash) + ALT_TEXT_FIELD_NUMBER; hash = (53 * hash) + getAltText().hashCode(); if (hasCropStyle()) { hash = (37 * hash) + CROP_STYLE_FIELD_NUMBER; hash = (53 * hash) + getCropStyle().hashCode(); } if (hasBorderStyle()) { hash = (37 * hash) + BORDER_STYLE_FIELD_NUMBER; hash = (53 * hash) + getBorderStyle().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.apps.card.v1.ImageComponent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.apps.card.v1.ImageComponent parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.apps.card.v1.ImageComponent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.apps.card.v1.ImageComponent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.apps.card.v1.ImageComponent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.apps.card.v1.ImageComponent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.apps.card.v1.ImageComponent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.apps.card.v1.ImageComponent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.apps.card.v1.ImageComponent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.apps.card.v1.ImageComponent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.apps.card.v1.ImageComponent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.apps.card.v1.ImageComponent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.apps.card.v1.ImageComponent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Represents an image.
   *
   * [Google Workspace Add-ons and Chat
   * apps](https://developers.google.com/workspace/extend):
   * 
* * Protobuf type {@code google.apps.card.v1.ImageComponent} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.apps.card.v1.ImageComponent) com.google.apps.card.v1.ImageComponentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.apps.card.v1.CardProto .internal_static_google_apps_card_v1_ImageComponent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.apps.card.v1.CardProto .internal_static_google_apps_card_v1_ImageComponent_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.apps.card.v1.ImageComponent.class, com.google.apps.card.v1.ImageComponent.Builder.class); } // Construct using com.google.apps.card.v1.ImageComponent.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getCropStyleFieldBuilder(); getBorderStyleFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; imageUri_ = ""; altText_ = ""; cropStyle_ = null; if (cropStyleBuilder_ != null) { cropStyleBuilder_.dispose(); cropStyleBuilder_ = null; } borderStyle_ = null; if (borderStyleBuilder_ != null) { borderStyleBuilder_.dispose(); borderStyleBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.apps.card.v1.CardProto .internal_static_google_apps_card_v1_ImageComponent_descriptor; } @java.lang.Override public com.google.apps.card.v1.ImageComponent getDefaultInstanceForType() { return com.google.apps.card.v1.ImageComponent.getDefaultInstance(); } @java.lang.Override public com.google.apps.card.v1.ImageComponent build() { com.google.apps.card.v1.ImageComponent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.apps.card.v1.ImageComponent buildPartial() { com.google.apps.card.v1.ImageComponent result = new com.google.apps.card.v1.ImageComponent(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.apps.card.v1.ImageComponent result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.imageUri_ = imageUri_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.altText_ = altText_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.cropStyle_ = cropStyleBuilder_ == null ? cropStyle_ : cropStyleBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.borderStyle_ = borderStyleBuilder_ == null ? borderStyle_ : borderStyleBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.apps.card.v1.ImageComponent) { return mergeFrom((com.google.apps.card.v1.ImageComponent) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.apps.card.v1.ImageComponent other) { if (other == com.google.apps.card.v1.ImageComponent.getDefaultInstance()) return this; if (!other.getImageUri().isEmpty()) { imageUri_ = other.imageUri_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getAltText().isEmpty()) { altText_ = other.altText_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasCropStyle()) { mergeCropStyle(other.getCropStyle()); } if (other.hasBorderStyle()) { mergeBorderStyle(other.getBorderStyle()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { imageUri_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { altText_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage(getCropStyleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage(getBorderStyleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object imageUri_ = ""; /** * * *
     * The image URL.
     * 
* * string image_uri = 1; * * @return The imageUri. */ public java.lang.String getImageUri() { java.lang.Object ref = imageUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); imageUri_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The image URL.
     * 
* * string image_uri = 1; * * @return The bytes for imageUri. */ public com.google.protobuf.ByteString getImageUriBytes() { java.lang.Object ref = imageUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); imageUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The image URL.
     * 
* * string image_uri = 1; * * @param value The imageUri to set. * @return This builder for chaining. */ public Builder setImageUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } imageUri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The image URL.
     * 
* * string image_uri = 1; * * @return This builder for chaining. */ public Builder clearImageUri() { imageUri_ = getDefaultInstance().getImageUri(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * The image URL.
     * 
* * string image_uri = 1; * * @param value The bytes for imageUri to set. * @return This builder for chaining. */ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); imageUri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object altText_ = ""; /** * * *
     * The accessibility label for the image.
     * 
* * string alt_text = 2; * * @return The altText. */ public java.lang.String getAltText() { java.lang.Object ref = altText_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); altText_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The accessibility label for the image.
     * 
* * string alt_text = 2; * * @return The bytes for altText. */ public com.google.protobuf.ByteString getAltTextBytes() { java.lang.Object ref = altText_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); altText_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The accessibility label for the image.
     * 
* * string alt_text = 2; * * @param value The altText to set. * @return This builder for chaining. */ public Builder setAltText(java.lang.String value) { if (value == null) { throw new NullPointerException(); } altText_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The accessibility label for the image.
     * 
* * string alt_text = 2; * * @return This builder for chaining. */ public Builder clearAltText() { altText_ = getDefaultInstance().getAltText(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * The accessibility label for the image.
     * 
* * string alt_text = 2; * * @param value The bytes for altText to set. * @return This builder for chaining. */ public Builder setAltTextBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); altText_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.apps.card.v1.ImageCropStyle cropStyle_; private com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.ImageCropStyle, com.google.apps.card.v1.ImageCropStyle.Builder, com.google.apps.card.v1.ImageCropStyleOrBuilder> cropStyleBuilder_; /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; * * @return Whether the cropStyle field is set. */ public boolean hasCropStyle() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; * * @return The cropStyle. */ public com.google.apps.card.v1.ImageCropStyle getCropStyle() { if (cropStyleBuilder_ == null) { return cropStyle_ == null ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance() : cropStyle_; } else { return cropStyleBuilder_.getMessage(); } } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ public Builder setCropStyle(com.google.apps.card.v1.ImageCropStyle value) { if (cropStyleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } cropStyle_ = value; } else { cropStyleBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ public Builder setCropStyle(com.google.apps.card.v1.ImageCropStyle.Builder builderForValue) { if (cropStyleBuilder_ == null) { cropStyle_ = builderForValue.build(); } else { cropStyleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ public Builder mergeCropStyle(com.google.apps.card.v1.ImageCropStyle value) { if (cropStyleBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && cropStyle_ != null && cropStyle_ != com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()) { getCropStyleBuilder().mergeFrom(value); } else { cropStyle_ = value; } } else { cropStyleBuilder_.mergeFrom(value); } if (cropStyle_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ public Builder clearCropStyle() { bitField0_ = (bitField0_ & ~0x00000004); cropStyle_ = null; if (cropStyleBuilder_ != null) { cropStyleBuilder_.dispose(); cropStyleBuilder_ = null; } onChanged(); return this; } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ public com.google.apps.card.v1.ImageCropStyle.Builder getCropStyleBuilder() { bitField0_ |= 0x00000004; onChanged(); return getCropStyleFieldBuilder().getBuilder(); } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ public com.google.apps.card.v1.ImageCropStyleOrBuilder getCropStyleOrBuilder() { if (cropStyleBuilder_ != null) { return cropStyleBuilder_.getMessageOrBuilder(); } else { return cropStyle_ == null ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance() : cropStyle_; } } /** * * *
     * The crop style to apply to the image.
     * 
* * .google.apps.card.v1.ImageCropStyle crop_style = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.ImageCropStyle, com.google.apps.card.v1.ImageCropStyle.Builder, com.google.apps.card.v1.ImageCropStyleOrBuilder> getCropStyleFieldBuilder() { if (cropStyleBuilder_ == null) { cropStyleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.ImageCropStyle, com.google.apps.card.v1.ImageCropStyle.Builder, com.google.apps.card.v1.ImageCropStyleOrBuilder>( getCropStyle(), getParentForChildren(), isClean()); cropStyle_ = null; } return cropStyleBuilder_; } private com.google.apps.card.v1.BorderStyle borderStyle_; private com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.BorderStyle, com.google.apps.card.v1.BorderStyle.Builder, com.google.apps.card.v1.BorderStyleOrBuilder> borderStyleBuilder_; /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; * * @return Whether the borderStyle field is set. */ public boolean hasBorderStyle() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; * * @return The borderStyle. */ public com.google.apps.card.v1.BorderStyle getBorderStyle() { if (borderStyleBuilder_ == null) { return borderStyle_ == null ? com.google.apps.card.v1.BorderStyle.getDefaultInstance() : borderStyle_; } else { return borderStyleBuilder_.getMessage(); } } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ public Builder setBorderStyle(com.google.apps.card.v1.BorderStyle value) { if (borderStyleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } borderStyle_ = value; } else { borderStyleBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ public Builder setBorderStyle(com.google.apps.card.v1.BorderStyle.Builder builderForValue) { if (borderStyleBuilder_ == null) { borderStyle_ = builderForValue.build(); } else { borderStyleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ public Builder mergeBorderStyle(com.google.apps.card.v1.BorderStyle value) { if (borderStyleBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && borderStyle_ != null && borderStyle_ != com.google.apps.card.v1.BorderStyle.getDefaultInstance()) { getBorderStyleBuilder().mergeFrom(value); } else { borderStyle_ = value; } } else { borderStyleBuilder_.mergeFrom(value); } if (borderStyle_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ public Builder clearBorderStyle() { bitField0_ = (bitField0_ & ~0x00000008); borderStyle_ = null; if (borderStyleBuilder_ != null) { borderStyleBuilder_.dispose(); borderStyleBuilder_ = null; } onChanged(); return this; } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ public com.google.apps.card.v1.BorderStyle.Builder getBorderStyleBuilder() { bitField0_ |= 0x00000008; onChanged(); return getBorderStyleFieldBuilder().getBuilder(); } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ public com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder() { if (borderStyleBuilder_ != null) { return borderStyleBuilder_.getMessageOrBuilder(); } else { return borderStyle_ == null ? com.google.apps.card.v1.BorderStyle.getDefaultInstance() : borderStyle_; } } /** * * *
     * The border style to apply to the image.
     * 
* * .google.apps.card.v1.BorderStyle border_style = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.BorderStyle, com.google.apps.card.v1.BorderStyle.Builder, com.google.apps.card.v1.BorderStyleOrBuilder> getBorderStyleFieldBuilder() { if (borderStyleBuilder_ == null) { borderStyleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.BorderStyle, com.google.apps.card.v1.BorderStyle.Builder, com.google.apps.card.v1.BorderStyleOrBuilder>( getBorderStyle(), getParentForChildren(), isClean()); borderStyle_ = null; } return borderStyleBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.apps.card.v1.ImageComponent) } // @@protoc_insertion_point(class_scope:google.apps.card.v1.ImageComponent) private static final com.google.apps.card.v1.ImageComponent DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.apps.card.v1.ImageComponent(); } public static com.google.apps.card.v1.ImageComponent getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ImageComponent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.apps.card.v1.ImageComponent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy