// Generated by the protocol buffer compiler.  DO NOT EDIT!
// clang-format off
// source: keyapis/subscription/v1/keyapis_subscription_privilege_v1.proto

// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
 #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif

#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
 #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
#else
 #import "GPBProtocolBuffers_RuntimeSupport.h"
#endif

#if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif

#import <stdatomic.h>

#import "keyapis/subscription/v1/KeyapisSubscriptionPrivilegeV1.pbobjc.h"
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
// @@protoc_insertion_point(imports)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wdirect-ivar-access"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"

#pragma mark - Objective-C Class declarations
// Forward declarations of Objective-C classes that we can use as
// static values in struct initializers.
// We don't use [Foo class] because it is not a static value.
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1Privilege);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegeFilter);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegePaging);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid);

#pragma mark - KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root

@implementation KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root

+ (GPBExtensionRegistry*)extensionRegistry {
  // This is called by +initialize so there is no need to worry
  // about thread safety and initialization of registry.
  static GPBExtensionRegistry* registry = nil;
  if (!registry) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    registry = [[GPBExtensionRegistry alloc] init];
    // Merge in the imports (direct or indirect) that defined extensions.
    [registry addExtensions:[GAPIAnnotationsRoot extensionRegistry]];
    [registry addExtensions:[GAPIFieldBehaviorRoot extensionRegistry]];
  }
  return registry;
}

@end

static GPBFileDescription KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription = {
  .package = "keyapis.subscription.v1",
  .prefix = "KEYAPISSUBSCRIPTIONV1",
  .syntax = GPBFileSyntaxProto3
};

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1Privilege_Type

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1Privilege_Type_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "TypeUnknown\000IntercomUse\000IntercomOpen\000Int"
        "ercomCodeUse\000IntercomRfidUse\000IntercomEve"
        "ntUse\000IntercomCameraUse\000IntercomCameraAr"
        "chive\000IntercomCallredirectApp\000IntercomCa"
        "llredirectPstn\000IntercomCallredirectSip\000B"
        "arrierUse\000BarrierOpen\000BarrierCodeUse\000Bar"
        "rierEventUse\000BarrierCameraUse\000BarrierCam"
        "eraArchive\000FrUse\000TelemetryUse\000CameraUse\000"
        "CameraArchive\000IntercomCmsPhonesUse\000Camer"
        "aEventUse\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1Privilege_Type_TypeUnknown,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomOpen,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCodeUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomRfidUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomEventUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCameraUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCameraArchive,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCallredirectApp,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCallredirectPstn,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCallredirectSip,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierOpen,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierCodeUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierEventUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierCameraUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierCameraArchive,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_FrUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_TelemetryUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_CameraUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_CameraArchive,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCmsPhonesUse,
        KEYAPISSUBSCRIPTIONV1Privilege_Type_CameraEventUse,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1Privilege_Type)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1Privilege_Type_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1Privilege_Type_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_TypeUnknown:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomOpen:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCodeUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomRfidUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomEventUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCameraUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCameraArchive:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCallredirectApp:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCallredirectPstn:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCallredirectSip:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierOpen:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierCodeUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierEventUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierCameraUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_BarrierCameraArchive:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_FrUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_TelemetryUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_CameraUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_CameraArchive:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_IntercomCmsPhonesUse:
    case KEYAPISSUBSCRIPTIONV1Privilege_Type_CameraEventUse:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1Privilege_StateType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1Privilege_StateType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "StateTypeUnknown\000CanBePaid\000NotPaid\000Turns"
        "Off\000Promo\000Paid\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1Privilege_StateType_StateTypeUnknown,
        KEYAPISSUBSCRIPTIONV1Privilege_StateType_CanBePaid,
        KEYAPISSUBSCRIPTIONV1Privilege_StateType_NotPaid,
        KEYAPISSUBSCRIPTIONV1Privilege_StateType_TurnsOff,
        KEYAPISSUBSCRIPTIONV1Privilege_StateType_Promo,
        KEYAPISSUBSCRIPTIONV1Privilege_StateType_Paid,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1Privilege_StateType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1Privilege_StateType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1Privilege_StateType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1Privilege_StateType_StateTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1Privilege_StateType_CanBePaid:
    case KEYAPISSUBSCRIPTIONV1Privilege_StateType_NotPaid:
    case KEYAPISSUBSCRIPTIONV1Privilege_StateType_TurnsOff:
    case KEYAPISSUBSCRIPTIONV1Privilege_StateType_Promo:
    case KEYAPISSUBSCRIPTIONV1Privilege_StateType_Paid:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "OrderByTypeUnknown\000Key\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_OrderByTypeUnknown,
        KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_Key,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_OrderByTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_Key:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "DirectionTypeUnknown\000Desc\000Asc\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_DirectionTypeUnknown,
        KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_Desc,
        KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_Asc,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_DirectionTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_Desc:
    case KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_Asc:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - KEYAPISSUBSCRIPTIONV1Privilege

@implementation KEYAPISSUBSCRIPTIONV1Privilege

@dynamic orpon;
@dynamic flatNumber;
@dynamic type;
@dynamic stateType;

typedef struct KEYAPISSUBSCRIPTIONV1Privilege__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISSUBSCRIPTIONV1Privilege_Type type;
  KEYAPISSUBSCRIPTIONV1Privilege_StateType stateType;
  NSString *flatNumber;
  int64_t orpon;
} KEYAPISSUBSCRIPTIONV1Privilege__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "orpon",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_Orpon,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Privilege__storage_, orpon),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt64,
      },
      {
        .name = "flatNumber",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_FlatNumber,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Privilege__storage_, flatNumber),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "type",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Privilege_Type_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_Type,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Privilege__storage_, type),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "stateType",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Privilege_StateType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_StateType,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Privilege__storage_, stateType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1Privilege)
                                   messageName:@"Privilege"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1Privilege__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

int32_t KEYAPISSUBSCRIPTIONV1Privilege_Type_RawValue(KEYAPISSUBSCRIPTIONV1Privilege *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Privilege descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_Type];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1Privilege_Type_RawValue(KEYAPISSUBSCRIPTIONV1Privilege *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Privilege descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_Type];
  GPBSetMessageRawEnumField(message, field, value);
}

int32_t KEYAPISSUBSCRIPTIONV1Privilege_StateType_RawValue(KEYAPISSUBSCRIPTIONV1Privilege *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Privilege descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_StateType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1Privilege_StateType_RawValue(KEYAPISSUBSCRIPTIONV1Privilege *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Privilege descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Privilege_FieldNumber_StateType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegeFilter

@implementation KEYAPISSUBSCRIPTIONV1PrivilegeFilter

@dynamic orponsArray, orponsArray_Count;
@dynamic flatNumbersArray, flatNumbersArray_Count;
@dynamic typesArray, typesArray_Count;
@dynamic stateTypesArray, stateTypesArray_Count;

typedef struct KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_ {
  uint32_t _has_storage_[1];
  GPBInt64Array *orponsArray;
  NSMutableArray *flatNumbersArray;
  GPBEnumArray *typesArray;
  GPBEnumArray *stateTypesArray;
} KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "orponsArray",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegeFilter_FieldNumber_OrponsArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_, orponsArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
        .dataType = GPBDataTypeInt64,
      },
      {
        .name = "flatNumbersArray",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegeFilter_FieldNumber_FlatNumbersArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_, flatNumbersArray),
        .flags = GPBFieldRepeated,
        .dataType = GPBDataTypeString,
      },
      {
        .name = "typesArray",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Privilege_Type_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegeFilter_FieldNumber_TypesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_, typesArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked | GPBFieldHasEnumDescriptor),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "stateTypesArray",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Privilege_StateType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegeFilter_FieldNumber_StateTypesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_, stateTypesArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked | GPBFieldHasEnumDescriptor),
        .dataType = GPBDataTypeEnum,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter)
                                   messageName:@"PrivilegeFilter"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError

@implementation KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError

@dynamic reasonOneOfCase;
@dynamic orpons;
@dynamic flatNumbers;

typedef struct KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid *orpons;
  KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid *flatNumbers;
} KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "orpons",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid),
        .number = KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FieldNumber_Orpons,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError__storage_, orpons),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "flatNumbers",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid),
        .number = KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FieldNumber_FlatNumbers,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError__storage_, flatNumbers),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError)
                                   messageName:@"ValidationError"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "reason",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_ClearReasonOneOfCase(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid

@implementation KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid


typedef struct KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid)
                                   messageName:@"OrponsInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_OrponsInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid

@implementation KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid


typedef struct KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid)
                                   messageName:@"FlatNumbersInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError_FlatNumbersInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegePaging

@implementation KEYAPISSUBSCRIPTIONV1PrivilegePaging

@dynamic orderByType;
@dynamic directionType;
@dynamic limit;
@dynamic offset;

typedef struct KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType orderByType;
  KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType directionType;
  int32_t limit;
  int32_t offset;
} KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "orderByType",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_OrderByType,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_, orderByType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "directionType",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_DirectionType,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_, directionType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "limit",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_Limit,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_, limit),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "offset",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_Offset,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_, offset),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging)
                                   messageName:@"PrivilegePaging"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegePaging__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

int32_t KEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_RawValue(KEYAPISSUBSCRIPTIONV1PrivilegePaging *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1PrivilegePaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_OrderByType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1PrivilegePaging_OrderByType_RawValue(KEYAPISSUBSCRIPTIONV1PrivilegePaging *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1PrivilegePaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_OrderByType];
  GPBSetMessageRawEnumField(message, field, value);
}

int32_t KEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_RawValue(KEYAPISSUBSCRIPTIONV1PrivilegePaging *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1PrivilegePaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_DirectionType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1PrivilegePaging_DirectionType_RawValue(KEYAPISSUBSCRIPTIONV1PrivilegePaging *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1PrivilegePaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1PrivilegePaging_FieldNumber_DirectionType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError

@implementation KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError

@dynamic reasonOneOfCase;
@dynamic limit;
@dynamic offset;

typedef struct KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid *limit;
  KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid *offset;
} KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "limit",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid),
        .number = KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_FieldNumber_Limit,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError__storage_, limit),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "offset",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid),
        .number = KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_FieldNumber_Offset,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError__storage_, offset),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError)
                                   messageName:@"ValidationError"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "reason",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_ClearReasonOneOfCase(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid

@implementation KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid


typedef struct KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid)
                                   messageName:@"LimitInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_LimitInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid

@implementation KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid


typedef struct KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid)
                                   messageName:@"OffsetInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError_OffsetInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest

@dynamic paginationOneOfCase;
@dynamic hasFilter, filter;
@dynamic paging;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1PrivilegeFilter *filter;
  KEYAPISSUBSCRIPTIONV1PrivilegePaging *paging;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "filter",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest_FieldNumber_Filter,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest__storage_, filter),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "paging",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest_FieldNumber_Paging,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest__storage_, paging),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest)
                                   messageName:@"GetPrivilegeListRequest"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "pagination",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest_ClearPaginationOneOfCase(KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeListRequest descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse

@dynamic typeOneOfCase;
@dynamic data_p;
@dynamic error;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1Privilege *data_p;
  KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error *error;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "data_p",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1Privilege),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "error",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_FieldNumber_Error,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse__storage_, error),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse)
                                   messageName:@"GetPrivilegeListResponse"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "type",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_ClearTypeOneOfCase(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error

@dynamic reasonOneOfCase;
@dynamic privilegeFilterValidation;
@dynamic privilegePagingValidation;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError *privilegeFilterValidation;
  KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError *privilegePagingValidation;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "privilegeFilterValidation",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error_FieldNumber_PrivilegeFilterValidation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error__storage_, privilegeFilterValidation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "privilegePagingValidation",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegePaging_ValidationError),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error_FieldNumber_PrivilegePagingValidation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error__storage_, privilegePagingValidation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error)
                                   messageName:@"Error"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "reason",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error_ClearReasonOneOfCase(KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeListResponse_Error descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest

@dynamic hasFilter, filter;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISSUBSCRIPTIONV1PrivilegeFilter *filter;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "filter",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest_FieldNumber_Filter,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest__storage_, filter),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest)
                                   messageName:@"GetPrivilegeCountRequest"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountRequest__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse

@dynamic typeOneOfCase;
@dynamic data_p;
@dynamic error;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse__storage_ {
  uint32_t _has_storage_[2];
  int32_t data_p;
  KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error *error;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "data_p",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "error",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_FieldNumber_Error,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse__storage_, error),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse)
                                   messageName:@"GetPrivilegeCountResponse"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "type",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_ClearTypeOneOfCase(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error

@dynamic reasonOneOfCase;
@dynamic privilegeFilterValidation;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError *privilegeFilterValidation;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "privilegeFilterValidation",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1PrivilegeFilter_ValidationError),
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error_FieldNumber_PrivilegeFilterValidation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error__storage_, privilegeFilterValidation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error)
                                   messageName:@"Error"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "reason",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error_ClearReasonOneOfCase(KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeCountResponse_Error descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest

@dynamic orpon;
@dynamic flatNumber;
@dynamic privilegeType;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISSUBSCRIPTIONV1Privilege_Type privilegeType;
  NSString *flatNumber;
  int64_t orpon;
} KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "orpon",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_FieldNumber_Orpon,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest__storage_, orpon),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt64,
      },
      {
        .name = "flatNumber",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_FieldNumber_FlatNumber,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest__storage_, flatNumber),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "privilegeType",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Privilege_Type_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_FieldNumber_PrivilegeType,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest__storage_, privilegeType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest)
                                   messageName:@"GetPrivilegeCheckRequest"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

int32_t KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_PrivilegeType_RawValue(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_FieldNumber_PrivilegeType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_PrivilegeType_RawValue(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest_FieldNumber_PrivilegeType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse

@implementation KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse

@dynamic typeOneOfCase;
@dynamic data_p;

typedef struct KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse__storage_ {
  uint32_t _has_storage_[2];
} KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "data_p",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = 0,  // Stored in _has_storage_ to save space.
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeBool,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse)
                                   messageName:@"GetPrivilegeCheckResponse"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionPrivilegeV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    static const char *oneofs[] = {
      "type",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

void KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse_ClearTypeOneOfCase(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}

#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)

// clang-format on
