public static class

DataTypeCreateRequest.Builder

extends Object
java.lang.Object
   ↳ com.google.android.gms.fitness.request.DataTypeCreateRequest.Builder

Class Overview

Builder used to create new DataTypeInsertRequests.

Summary

Public Constructors
DataTypeCreateRequest.Builder()
Public Methods
DataTypeCreateRequest.Builder addField(String name, int format)
Adds a new field with the specified name and format to the new data type.
DataTypeCreateRequest.Builder addField(Field field)
Adds the specified field to the new data type.
DataTypeCreateRequest build()
Finishes building and returns the request.
DataTypeCreateRequest.Builder setName(String name)
Set the name for the new data type.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DataTypeCreateRequest.Builder ()

Public Methods

public DataTypeCreateRequest.Builder addField (String name, int format)

Adds a new field with the specified name and format to the new data type.

Parameters
name String
format int
Returns
DataTypeCreateRequest.Builder

public DataTypeCreateRequest.Builder addField (Field field)

Adds the specified field to the new data type.

Parameters
field Field
Returns
DataTypeCreateRequest.Builder

public DataTypeCreateRequest build ()

Finishes building and returns the request.

Returns
DataTypeCreateRequest
Throws
IllegalStateException if name or data fields are not specified.

public DataTypeCreateRequest.Builder setName (String name)

Set the name for the new data type. For private data types the name must have a format packageName + "." + typeName, where packageName is the application package name and typeName is a unique identifier of the DataType withing package.

Parameters
name String
Returns
DataTypeCreateRequest.Builder