public final class

ResourceProto.Resources.Builder

extends <any>

implements ResourceProto.ResourcesOrBuilder

 java.lang.Object

↳<any>

↳androidx.wear.protolayout.proto.ResourceProto.Resources.Builder

Overview

 The resources for a layout.
 
Protobuf type androidx.wear.protolayout.proto.Resources

Summary

Methods
public ResourceProto.Resources.BuilderclearIdToImage()

public ResourceProto.Resources.BuilderclearVersion()

 The version of this Resources instance.

public booleancontainsIdToImage(java.lang.String key)

 A map of resource_ids to images, which can be used by layouts.

public java.util.Map<java.lang.String, ResourceProto.ImageResource>getIdToImage()

Use ResourceProto.Resources.Builder.getIdToImageMap() instead.

public intgetIdToImageCount()

public java.util.Map<java.lang.String, ResourceProto.ImageResource>getIdToImageMap()

 A map of resource_ids to images, which can be used by layouts.

public ResourceProto.ImageResourcegetIdToImageOrDefault(java.lang.String key, ResourceProto.ImageResource defaultValue)

 A map of resource_ids to images, which can be used by layouts.

public ResourceProto.ImageResourcegetIdToImageOrThrow(java.lang.String key)

 A map of resource_ids to images, which can be used by layouts.

public java.lang.StringgetVersion()

 The version of this Resources instance.

public com.google.protobuf.ByteStringgetVersionBytes()

 The version of this Resources instance.

public ResourceProto.Resources.BuilderputAllIdToImage(java.util.Map<java.lang.String, ResourceProto.ImageResource> values)

 A map of resource_ids to images, which can be used by layouts.

public ResourceProto.Resources.BuilderputIdToImage(java.lang.String key, ResourceProto.ImageResource value)

 A map of resource_ids to images, which can be used by layouts.

public ResourceProto.Resources.BuilderremoveIdToImage(java.lang.String key)

 A map of resource_ids to images, which can be used by layouts.

public ResourceProto.Resources.BuildersetVersion(java.lang.String value)

 The version of this Resources instance.

public ResourceProto.Resources.BuildersetVersionBytes(com.google.protobuf.ByteString value)

 The version of this Resources instance.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public java.lang.String getVersion()

 The version of this Resources instance.

 Each layout specifies the version of resources it requires. After fetching
 a layout, the renderer will use the resources version specified by the
 layout to separately fetch the resources.

 This value must match the version of the resources required by the layout
 for the layout to render successfully, and must match the resource version
 specified in ResourcesRequest which triggered this request.
 
string version = 1;

Returns:

The version.

public com.google.protobuf.ByteString getVersionBytes()

 The version of this Resources instance.

 Each layout specifies the version of resources it requires. After fetching
 a layout, the renderer will use the resources version specified by the
 layout to separately fetch the resources.

 This value must match the version of the resources required by the layout
 for the layout to render successfully, and must match the resource version
 specified in ResourcesRequest which triggered this request.
 
string version = 1;

Returns:

The bytes for version.

public ResourceProto.Resources.Builder setVersion(java.lang.String value)

 The version of this Resources instance.

 Each layout specifies the version of resources it requires. After fetching
 a layout, the renderer will use the resources version specified by the
 layout to separately fetch the resources.

 This value must match the version of the resources required by the layout
 for the layout to render successfully, and must match the resource version
 specified in ResourcesRequest which triggered this request.
 
string version = 1;

Parameters:

value: The version to set.

Returns:

This builder for chaining.

public ResourceProto.Resources.Builder clearVersion()

 The version of this Resources instance.

 Each layout specifies the version of resources it requires. After fetching
 a layout, the renderer will use the resources version specified by the
 layout to separately fetch the resources.

 This value must match the version of the resources required by the layout
 for the layout to render successfully, and must match the resource version
 specified in ResourcesRequest which triggered this request.
 
string version = 1;

Returns:

This builder for chaining.

public ResourceProto.Resources.Builder setVersionBytes(com.google.protobuf.ByteString value)

 The version of this Resources instance.

 Each layout specifies the version of resources it requires. After fetching
 a layout, the renderer will use the resources version specified by the
 layout to separately fetch the resources.

 This value must match the version of the resources required by the layout
 for the layout to render successfully, and must match the resource version
 specified in ResourcesRequest which triggered this request.
 
string version = 1;

Parameters:

value: The bytes for version to set.

Returns:

This builder for chaining.

public int getIdToImageCount()

public boolean containsIdToImage(java.lang.String key)

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;

public ResourceProto.Resources.Builder clearIdToImage()

public ResourceProto.Resources.Builder removeIdToImage(java.lang.String key)

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;

public java.util.Map<java.lang.String, ResourceProto.ImageResource> getIdToImage()

Use ResourceProto.Resources.Builder.getIdToImageMap() instead.

public java.util.Map<java.lang.String, ResourceProto.ImageResource> getIdToImageMap()

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;

public ResourceProto.ImageResource getIdToImageOrDefault(java.lang.String key, ResourceProto.ImageResource defaultValue)

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;

public ResourceProto.ImageResource getIdToImageOrThrow(java.lang.String key)

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;

public ResourceProto.Resources.Builder putIdToImage(java.lang.String key, ResourceProto.ImageResource value)

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;

public ResourceProto.Resources.Builder putAllIdToImage(java.util.Map<java.lang.String, ResourceProto.ImageResource> values)

 A map of resource_ids to images, which can be used by layouts.
 
map<string, .androidx.wear.protolayout.proto.ImageResource> id_to_image = 2;