1 |
efrain |
1 |
/*
|
|
|
2 |
* Copyright 2020 Google LLC
|
|
|
3 |
*
|
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
|
6 |
* You may obtain a copy of the License at
|
|
|
7 |
*
|
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
9 |
*
|
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
13 |
* See the License for the specific language governing permissions and
|
|
|
14 |
* limitations under the License.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
#import <Foundation/Foundation.h>
|
|
|
18 |
|
|
|
19 |
#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTargets.h"
|
|
|
20 |
|
|
|
21 |
NS_ASSUME_NONNULL_BEGIN
|
|
|
22 |
|
|
|
23 |
/** This class enables the finding of events by matching events with the properties of this class.
|
|
|
24 |
*/
|
|
|
25 |
@interface GDTCORStorageEventSelector : NSObject
|
|
|
26 |
|
|
|
27 |
/** The target to find events for. Required. */
|
|
|
28 |
@property(readonly, nonatomic) GDTCORTarget selectedTarget;
|
|
|
29 |
|
|
|
30 |
/** Finds a specific event. */
|
|
|
31 |
@property(nullable, readonly, nonatomic) NSSet<NSString *> *selectedEventIDs;
|
|
|
32 |
|
|
|
33 |
/** Finds all events of a mappingID. */
|
|
|
34 |
@property(nullable, readonly, nonatomic) NSSet<NSString *> *selectedMappingIDs;
|
|
|
35 |
|
|
|
36 |
/** Finds all events matching the qosTiers in this list. */
|
|
|
37 |
@property(nullable, readonly, nonatomic) NSSet<NSNumber *> *selectedQosTiers;
|
|
|
38 |
|
|
|
39 |
/** Initializes an event selector that will find all events for the given target.
|
|
|
40 |
*
|
|
|
41 |
* @param target The selected target.
|
|
|
42 |
* @return An immutable event selector instance.
|
|
|
43 |
*/
|
|
|
44 |
+ (instancetype)eventSelectorForTarget:(GDTCORTarget)target;
|
|
|
45 |
|
|
|
46 |
/** Instantiates an event selector.
|
|
|
47 |
*
|
|
|
48 |
* @param target The selected target.
|
|
|
49 |
* @param eventIDs Optional param to find an event matching this eventID.
|
|
|
50 |
* @param mappingIDs Optional param to find events matching this mappingID.
|
|
|
51 |
* @param qosTiers Optional param to find events matching the given QoS tiers.
|
|
|
52 |
* @return An immutable event selector instance.
|
|
|
53 |
*/
|
|
|
54 |
- (instancetype)initWithTarget:(GDTCORTarget)target
|
|
|
55 |
eventIDs:(nullable NSSet<NSString *> *)eventIDs
|
|
|
56 |
mappingIDs:(nullable NSSet<NSString *> *)mappingIDs
|
|
|
57 |
qosTiers:(nullable NSSet<NSNumber *> *)qosTiers;
|
|
|
58 |
|
|
|
59 |
@end
|
|
|
60 |
|
|
|
61 |
NS_ASSUME_NONNULL_END
|