GDTCORStorageEventSelector.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #import <Foundation/Foundation.h>
  17. #import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTargets.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** This class enables the finding of events by matching events with the properties of this class.
  20. */
  21. @interface GDTCORStorageEventSelector : NSObject
  22. /** The target to find events for. Required. */
  23. @property(readonly, nonatomic) GDTCORTarget selectedTarget;
  24. /** Finds a specific event. */
  25. @property(nullable, readonly, nonatomic) NSSet<NSString *> *selectedEventIDs;
  26. /** Finds all events of a mappingID. */
  27. @property(nullable, readonly, nonatomic) NSSet<NSString *> *selectedMappingIDs;
  28. /** Finds all events matching the qosTiers in this list. */
  29. @property(nullable, readonly, nonatomic) NSSet<NSNumber *> *selectedQosTiers;
  30. /** Initializes an event selector that will find all events for the given target.
  31. *
  32. * @param target The selected target.
  33. * @return An immutable event selector instance.
  34. */
  35. + (instancetype)eventSelectorForTarget:(GDTCORTarget)target;
  36. /** Instantiates an event selector.
  37. *
  38. * @param target The selected target.
  39. * @param eventIDs Optional param to find an event matching this eventID.
  40. * @param mappingIDs Optional param to find events matching this mappingID.
  41. * @param qosTiers Optional param to find events matching the given QoS tiers.
  42. * @return An immutable event selector instance.
  43. */
  44. - (instancetype)initWithTarget:(GDTCORTarget)target
  45. eventIDs:(nullable NSSet<NSString *> *)eventIDs
  46. mappingIDs:(nullable NSSet<NSString *> *)mappingIDs
  47. qosTiers:(nullable NSSet<NSNumber *> *)qosTiers;
  48. @end
  49. NS_ASSUME_NONNULL_END