GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTSVehicleAttributeKeyValuePair
Object that contains a vehicle attribute key/value pair.
-
Declaration
Swift
var key: String { get }
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull key;
-
Declaration
Swift
var value: String { get }
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull value;
-
Initialization of the object.
Declaration
Swift
init(key: String, value: String)
Objective-C
- (nonnull instancetype)initWithKey:(nonnull NSString *)key
value:(nonnull NSString *)value;
Parameters
key
|
The key, should not be nil.
|
value
|
The value, should not be nil.
|
-
Declaration
Objective-C
- (nonnull instancetype)init;
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-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMTSVehicleAttributeKeyValuePair\u003c/code\u003e is an object representing a key-value pair for vehicle attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekey\u003c/code\u003e property is a read-only string representing the attribute's key.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evalue\u003c/code\u003e property is a read-only string representing the attribute's value.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einitWithKey:value:\u003c/code\u003e method is used to initialize the object with a key and a value, both of which are required and non-nil strings.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einit\u003c/code\u003e method is unavailable and will return \u003ccode\u003enil\u003c/code\u003e, instructing the use of \u003ccode\u003einitWithKey:value:\u003c/code\u003e instead.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTSVehicleAttributeKeyValuePair\n================================\n\n @interface GMTSVehicleAttributeKeyValuePair : ../Classes/GMTCImmutableData.html\n\nObject that contains a vehicle attribute key/value pair.\n- `\n ``\n ``\n `\n\n ### [key](#/c:objc(cs)GMTSVehicleAttributeKeyValuePair(py)key)\n\n `\n ` \n The key of this pair. \n\n #### Declaration\n\n Swift \n\n var key: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull key;\n\n- `\n ``\n ``\n `\n\n ### [value](#/c:objc(cs)GMTSVehicleAttributeKeyValuePair(py)value)\n\n `\n ` \n The value of this pair. \n\n #### Declaration\n\n Swift \n\n var value: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull value;\n\n- `\n ``\n ``\n `\n\n ### [-initWithKey:value:](#/c:objc(cs)GMTSVehicleAttributeKeyValuePair(im)initWithKey:value:)\n\n `\n ` \n Initialization of the object. \n\n #### Declaration\n\n Swift \n\n init(key: String, value: String)\n\n Objective-C \n\n - (nonnull instancetype)initWithKey:(nonnull NSString *)key\n value:(nonnull NSString *)value;\n\n #### Parameters\n\n |---------------|-------------------------------|\n | ` `*key*` ` | The key, should not be nil. |\n | ` `*value*` ` | The value, should not be nil. |\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTSVehicleAttributeKeyValuePair(im)init)\n\n `\n ` \n Unavailable \n Will return nil.\n Use [-initWithKey:value:](../Classes/GMTSVehicleAttributeKeyValuePair.html#/c:objc(cs)GMTSVehicleAttributeKeyValuePair(im)initWithKey:value:) instead. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]