Class WidgetMarkup.Image.Builder (0.42.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version latestkeyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  WidgetMarkup . Image . Builder   extends   GeneratedMessageV3 . Builder<WidgetMarkup . Image . Builder >  implements   WidgetMarkup . ImageOrBuilder  
   An image that's specified by a URL and can have an onclick action.
 Protobuf type google.chat.v1.WidgetMarkup.Image
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder() 
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int) 
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int) 
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString) 
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int) 
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int) 
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder) 
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Methods
   
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  Methods
   
  
    
public   WidgetMarkup . Image . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image   build ()  
  
  
    
public   WidgetMarkup . Image   buildPartial ()  
  
  
    
public   WidgetMarkup . Image . Builder   clear ()  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   clearAspectRatio ()  
   The aspect ratio of this image (width and height). This field lets you
 reserve the right height for the image while waiting for it to load.
 It's not meant to override the built-in aspect ratio of the image.
 If unset, the server fills it by prefetching the image.
 double aspect_ratio = 3;
    
public   WidgetMarkup . Image . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   clearImageUrl ()  
   The URL of the image.
 string image_url = 1;
    
public   WidgetMarkup . Image . Builder   clearOnClick ()  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   WidgetMarkup . Image . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   clone ()  
  
  Overrides 
  
  
    
public   double   getAspectRatio ()  
   The aspect ratio of this image (width and height). This field lets you
 reserve the right height for the image while waiting for it to load.
 It's not meant to override the built-in aspect ratio of the image.
 If unset, the server fills it by prefetching the image.
 double aspect_ratio = 3;
    
      
        Returns  
      
        Type Description  
      
        double The aspectRatio.
 
     
  
  
    
public   WidgetMarkup . Image   getDefaultInstanceForType ()  
  
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  
  Overrides 
  
  
    
public   String   getImageUrl ()  
   The URL of the image.
 string image_url = 1;
    
      
        Returns  
      
        Type Description  
      
        String The imageUrl.
 
     
  
  
    
public   ByteString   getImageUrlBytes ()  
   The URL of the image.
 string image_url = 1;
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for imageUrl.
 
     
  
  
    
public   WidgetMarkup . OnClick   getOnClick ()  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   WidgetMarkup . OnClick . Builder   getOnClickBuilder ()  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   WidgetMarkup . OnClickOrBuilder   getOnClickOrBuilder ()  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   boolean   hasOnClick ()  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the onClick field is set.
 
     
  
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   mergeFrom ( WidgetMarkup . Image   other )  
  
  
  
    
public   WidgetMarkup . Image . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  Overrides 
  
  
  
    
public   WidgetMarkup . Image . Builder   mergeFrom ( Message   other )  
  
    
      
        Parameter  
      
        Name Description  
      
        otherMessage  
     
  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   mergeOnClick ( WidgetMarkup . OnClick   value )  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   final   WidgetMarkup . Image . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   setAspectRatio ( double   value )  
   The aspect ratio of this image (width and height). This field lets you
 reserve the right height for the image while waiting for it to load.
 It's not meant to override the built-in aspect ratio of the image.
 If unset, the server fills it by prefetching the image.
 double aspect_ratio = 3;
    
      
        Parameter  
      
        Name Description  
      
        valuedouble The aspectRatio to set.
 
     
  
  
  
    
public   WidgetMarkup . Image . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  
    
public   WidgetMarkup . Image . Builder   setImageUrl ( String   value )  
   The URL of the image.
 string image_url = 1;
    
      
        Parameter  
      
        Name Description  
      
        valueString The imageUrl to set.
 
     
  
  
  
    
public   WidgetMarkup . Image . Builder   setImageUrlBytes ( ByteString   value )  
   The URL of the image.
 string image_url = 1;
    
      
        Parameter  
      
        Name Description  
      
        valueByteString The bytes for imageUrl to set.
 
     
  
  
  
    
public   WidgetMarkup . Image . Builder   setOnClick ( WidgetMarkup . OnClick   value )  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   WidgetMarkup . Image . Builder   setOnClick ( WidgetMarkup . OnClick . Builder   builderForValue )  
   The onclick action.
 .google.chat.v1.WidgetMarkup.OnClick on_click = 2;
    
public   WidgetMarkup . Image . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  
  
  Overrides 
  
  
    
public   final   WidgetMarkup . Image . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  Overrides 
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-28 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-28 UTC."],[],[]]