Reference documentation and code samples for the Cloud Bigtable V2 Client class Type.
Typerepresents the type of data that is written to, read from, or stored
in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
familiarity and consistency across products and features.
For compatibility with Bigtable's existing untyped APIs, eachTypeincludes
anEncodingwhich describes how to convert to or from the underlying data.
Each encoding can operate in one of two modes:
Sorted: In this mode, Bigtable guarantees thatEncode(X) <= Encode(Y)if and only ifX <= Y. This is useful anywhere sort order is important,
for example when encoding keys.
Distinct: In this mode, Bigtable guarantees that ifX != YthenEncode(X) != Encode(Y). However, the converse is not guaranteed. For
example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
are valid encodings of the same JSON value.
The API clearly documents which mode is used wherever an encoding can be
configured. Each encoding also documents which values are supported in which
modes. For example, when encoding INT64 as a numeric STRING, negative numbers
cannot be encoded in sorted mode. This is becauseINT64(1) > INT64(-1), butSTRING("-00001") > STRING("00001").
Generated from protobuf messagegoogle.bigtable.admin.v2.Type
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Bigtable V2 Client - Class Type (2.17.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.1 (latest)](/php/docs/reference/cloud-bigtable/latest/Admin.V2.Type)\n- [2.17.0](/php/docs/reference/cloud-bigtable/2.17.0/Admin.V2.Type)\n- [2.16.0](/php/docs/reference/cloud-bigtable/2.16.0/Admin.V2.Type)\n- [2.15.0](/php/docs/reference/cloud-bigtable/2.15.0/Admin.V2.Type)\n- [2.14.0](/php/docs/reference/cloud-bigtable/2.14.0/Admin.V2.Type)\n- [2.13.0](/php/docs/reference/cloud-bigtable/2.13.0/Admin.V2.Type)\n- [2.12.0](/php/docs/reference/cloud-bigtable/2.12.0/Admin.V2.Type)\n- [2.11.1](/php/docs/reference/cloud-bigtable/2.11.1/Admin.V2.Type)\n- [2.9.1](/php/docs/reference/cloud-bigtable/2.9.1/Admin.V2.Type)\n- [2.8.0](/php/docs/reference/cloud-bigtable/2.8.0/Admin.V2.Type)\n- [2.7.0](/php/docs/reference/cloud-bigtable/2.7.0/Admin.V2.Type)\n- [2.6.3](/php/docs/reference/cloud-bigtable/2.6.3/Admin.V2.Type)\n- [2.5.0](/php/docs/reference/cloud-bigtable/2.5.0/Admin.V2.Type)\n- [2.4.0](/php/docs/reference/cloud-bigtable/2.4.0/Admin.V2.Type)\n- [2.3.0](/php/docs/reference/cloud-bigtable/2.3.0/Admin.V2.Type)\n- [2.2.1](/php/docs/reference/cloud-bigtable/2.2.1/Admin.V2.Type)\n- [2.1.0](/php/docs/reference/cloud-bigtable/2.1.0/Admin.V2.Type)\n- [2.0.1](/php/docs/reference/cloud-bigtable/2.0.1/Admin.V2.Type)\n- [1.32.1](/php/docs/reference/cloud-bigtable/1.32.1/Admin.V2.Type)\n- [1.31.1](/php/docs/reference/cloud-bigtable/1.31.1/Admin.V2.Type)\n- [1.30.0](/php/docs/reference/cloud-bigtable/1.30.0/Admin.V2.Type)\n- [1.29.2](/php/docs/reference/cloud-bigtable/1.29.2/Admin.V2.Type)\n- [1.28.3](/php/docs/reference/cloud-bigtable/1.28.3/Admin.V2.Type)\n- [1.27.0](/php/docs/reference/cloud-bigtable/1.27.0/Admin.V2.Type)\n- [1.26.2](/php/docs/reference/cloud-bigtable/1.26.2/Admin.V2.Type)\n- [1.25.0](/php/docs/reference/cloud-bigtable/1.25.0/Admin.V2.Type)\n- [1.24.1](/php/docs/reference/cloud-bigtable/1.24.1/Admin.V2.Type)\n- [1.23.0](/php/docs/reference/cloud-bigtable/1.23.0/Admin.V2.Type)\n- [1.22.2](/php/docs/reference/cloud-bigtable/1.22.2/Admin.V2.Type)\n- [1.21.1](/php/docs/reference/cloud-bigtable/1.21.1/Admin.V2.Type)\n- [1.20.3](/php/docs/reference/cloud-bigtable/1.20.3/Admin.V2.Type) \nReference documentation and code samples for the Cloud Bigtable V2 Client class Type.\n\n`Type` represents the type of data that is written to, read from, or stored\nin Bigtable. It is heavily based on the GoogleSQL standard to help maintain\nfamiliarity and consistency across products and features.\n\nFor compatibility with Bigtable's existing untyped APIs, each `Type` includes\nan `Encoding` which describes how to convert to or from the underlying data.\nEach encoding can operate in one of two modes:\n\n- Sorted: In this mode, Bigtable guarantees that `Encode(X) \u003c= Encode(Y)` if and only if `X \u003c= Y`. This is useful anywhere sort order is important, for example when encoding keys.\n- Distinct: In this mode, Bigtable guarantees that if `X != Y` then `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For example, both \"{'foo': '1', 'bar': '2'}\" and \"{'bar': '2', 'foo': '1'}\" are valid encodings of the same JSON value. The API clearly documents which mode is used wherever an encoding can be configured. Each encoding also documents which values are supported in which modes. For example, when encoding INT64 as a numeric STRING, negative numbers cannot be encoded in sorted mode. This is because `INT64(1) \u003e INT64(-1)`, but `STRING(\"-00001\") \u003e STRING(\"00001\")`.\n\nGenerated from protobuf message `google.bigtable.admin.v2.Type`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Bigtable \\\\ Admin \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getBytesType\n\nBytes\n\n### hasBytesType\n\n### setBytesType\n\nBytes\n\n### getStringType\n\nString\n\n### hasStringType\n\n### setStringType\n\nString\n\n### getInt64Type\n\nInt64\n\n### hasInt64Type\n\n### setInt64Type\n\nInt64\n\n### getFloat32Type\n\nFloat32\n\n### hasFloat32Type\n\n### setFloat32Type\n\nFloat32\n\n### getFloat64Type\n\nFloat64\n\n### hasFloat64Type\n\n### setFloat64Type\n\nFloat64\n\n### getBoolType\n\nBool\n\n### hasBoolType\n\n### setBoolType\n\nBool\n\n### getTimestampType\n\nTimestamp\n\n### hasTimestampType\n\n### setTimestampType\n\nTimestamp\n\n### getDateType\n\nDate\n\n### hasDateType\n\n### setDateType\n\nDate\n\n### getAggregateType\n\nAggregate\n\n### hasAggregateType\n\n### setAggregateType\n\nAggregate\n\n### getStructType\n\nStruct\n\n### hasStructType\n\n### setStructType\n\nStruct\n\n### getArrayType\n\nArray\n\n### hasArrayType\n\n### setArrayType\n\nArray\n\n### getMapType\n\nMap\n\n### hasMapType\n\n### setMapType\n\nMap\n\n### getProtoType\n\nProto\n\n### hasProtoType\n\n### setProtoType\n\nProto\n\n### getEnumType\n\nEnum\n\n### hasEnumType\n\n### setEnumType\n\nEnum\n\n### getKind"]]