// Generated by the protocol buffer compiler.  DO NOT EDIT!
// clang-format off
// source: keyapis/subscription/v1/keyapis_subscription_offer_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/KeyapisSubscriptionOfferV1.pbobjc.h"
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
#import "keyapis/subscription/v1/KeyapisSubscriptionPlanV1.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(GPBDoubleValue);
GPBObjCClassDeclaration(GPBInt32Value);
GPBObjCClassDeclaration(GPBStringValue);
GPBObjCClassDeclaration(GPBTimestamp);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferListRequest);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferListResponse);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferRequest);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1GetOfferResponse);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1Offer);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferFilter);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferPaging);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid);
GPBObjCClassDeclaration(KEYAPISSUBSCRIPTIONV1Plan);

#pragma mark - KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root

@implementation KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root

+ (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 KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription = {
  .package = "keyapis.subscription.v1",
  .prefix = "KEYAPISSUBSCRIPTIONV1",
  .syntax = GPBFileSyntaxProto3
};

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1Offer_Type

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1Offer_Type_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "TypeUnknown\000Company\000Rtk\000Shared\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1Offer_Type_TypeUnknown,
        KEYAPISSUBSCRIPTIONV1Offer_Type_Company,
        KEYAPISSUBSCRIPTIONV1Offer_Type_Rtk,
        KEYAPISSUBSCRIPTIONV1Offer_Type_Shared,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1Offer_Type)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1Offer_Type_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1Offer_Type_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1Offer_Type_TypeUnknown:
    case KEYAPISSUBSCRIPTIONV1Offer_Type_Company:
    case KEYAPISSUBSCRIPTIONV1Offer_Type_Rtk:
    case KEYAPISSUBSCRIPTIONV1Offer_Type_Shared:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1Offer_StatusType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1Offer_StatusType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "StatusTypeUnknown\000Active\000Blocked\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1Offer_StatusType_StatusTypeUnknown,
        KEYAPISSUBSCRIPTIONV1Offer_StatusType_Active,
        KEYAPISSUBSCRIPTIONV1Offer_StatusType_Blocked,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1Offer_StatusType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1Offer_StatusType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1Offer_StatusType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1Offer_StatusType_StatusTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1Offer_StatusType_Active:
    case KEYAPISSUBSCRIPTIONV1Offer_StatusType_Blocked:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "DiscountRequirementTypeUnknown\000NoConditi"
        "ons\000InternetIsPaid\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_DiscountRequirementTypeUnknown,
        KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_NoConditions,
        KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_InternetIsPaid,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_DiscountRequirementTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_NoConditions:
    case KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_InternetIsPaid:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "OrderByTypeUnknown\000Id\000Price\000";
    static const int32_t values[] = {
        KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_OrderByTypeUnknown,
        KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_Id,
        KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_Price,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_OrderByTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_Id:
    case KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_Price:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - Enum KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType

GPBEnumDescriptor *KEYAPISSUBSCRIPTIONV1OfferPaging_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[] = {
        KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_DirectionTypeUnknown,
        KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_Desc,
        KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_Asc,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_DirectionTypeUnknown:
    case KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_Desc:
    case KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_Asc:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - KEYAPISSUBSCRIPTIONV1Offer

@implementation KEYAPISSUBSCRIPTIONV1Offer

@dynamic id_p;
@dynamic type;
@dynamic orpon;
@dynamic hasCompanyId, companyId;
@dynamic planId;
@dynamic isEnableAutoSubscribe;
@dynamic statusType;
@dynamic hasPrice, price;
@dynamic isDigitalWay;
@dynamic hasCreatedAt, createdAt;
@dynamic hasChangedAt, changedAt;
@dynamic hasOfferURL, offerURL;
@dynamic hasPlan, plan;
@dynamic hasDiscountPrice, discountPrice;
@dynamic discountRequirementTypesArray, discountRequirementTypesArray_Count;

typedef struct KEYAPISSUBSCRIPTIONV1Offer__storage_ {
  uint32_t _has_storage_[1];
  int32_t id_p;
  KEYAPISSUBSCRIPTIONV1Offer_Type type;
  int32_t planId;
  KEYAPISSUBSCRIPTIONV1Offer_StatusType statusType;
  GPBInt32Value *companyId;
  GPBDoubleValue *price;
  GPBTimestamp *createdAt;
  GPBTimestamp *changedAt;
  GPBStringValue *offerURL;
  KEYAPISSUBSCRIPTIONV1Plan *plan;
  GPBDoubleValue *discountPrice;
  GPBEnumArray *discountRequirementTypesArray;
  int64_t orpon;
} KEYAPISSUBSCRIPTIONV1Offer__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 = "id_p",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Id_p,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, id_p),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "type",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Offer_Type_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Type,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, type),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "orpon",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Orpon,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, orpon),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt64,
      },
      {
        .name = "companyId",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBInt32Value),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_CompanyId,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, companyId),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "planId",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_PlanId,
        .hasIndex = 4,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, planId),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "isEnableAutoSubscribe",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_IsEnableAutoSubscribe,
        .hasIndex = 5,
        .offset = 6,  // Stored in _has_storage_ to save space.
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeBool,
      },
      {
        .name = "statusType",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Offer_StatusType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_StatusType,
        .hasIndex = 7,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, statusType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "price",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBDoubleValue),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Price,
        .hasIndex = 8,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, price),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "isDigitalWay",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_IsDigitalWay,
        .hasIndex = 9,
        .offset = 10,  // Stored in _has_storage_ to save space.
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeBool,
      },
      {
        .name = "createdAt",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBTimestamp),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_CreatedAt,
        .hasIndex = 11,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, createdAt),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "changedAt",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBTimestamp),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_ChangedAt,
        .hasIndex = 12,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, changedAt),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "offerURL",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBStringValue),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_OfferURL,
        .hasIndex = 13,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, offerURL),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom),
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "plan",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1Plan),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Plan,
        .hasIndex = 14,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, plan),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "discountPrice",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBDoubleValue),
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_DiscountPrice,
        .hasIndex = 15,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, discountPrice),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "discountRequirementTypesArray",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Offer_DiscountRequirementType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_DiscountRequirementTypesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1Offer__storage_, discountRequirementTypesArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked | GPBFieldHasEnumDescriptor),
        .dataType = GPBDataTypeEnum,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1Offer)
                                   messageName:@"Offer"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1Offer__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
    static const char *extraTextFormatInfo =
        "\001\014\005\241!!\000";
    [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
#endif  // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

int32_t KEYAPISSUBSCRIPTIONV1Offer_Type_RawValue(KEYAPISSUBSCRIPTIONV1Offer *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Offer descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Type];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1Offer_Type_RawValue(KEYAPISSUBSCRIPTIONV1Offer *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Offer descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_Type];
  GPBSetMessageRawEnumField(message, field, value);
}

int32_t KEYAPISSUBSCRIPTIONV1Offer_StatusType_RawValue(KEYAPISSUBSCRIPTIONV1Offer *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Offer descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_StatusType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1Offer_StatusType_RawValue(KEYAPISSUBSCRIPTIONV1Offer *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1Offer descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1Offer_FieldNumber_StatusType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - KEYAPISSUBSCRIPTIONV1OfferFilter

@implementation KEYAPISSUBSCRIPTIONV1OfferFilter

@dynamic typesArray, typesArray_Count;
@dynamic orponsArray, orponsArray_Count;
@dynamic companyIdsArray, companyIdsArray_Count;

typedef struct KEYAPISSUBSCRIPTIONV1OfferFilter__storage_ {
  uint32_t _has_storage_[1];
  GPBEnumArray *typesArray;
  GPBInt64Array *orponsArray;
  GPBInt32Array *companyIdsArray;
} KEYAPISSUBSCRIPTIONV1OfferFilter__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 = "typesArray",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1Offer_Type_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1OfferFilter_FieldNumber_TypesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferFilter__storage_, typesArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked | GPBFieldHasEnumDescriptor),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "orponsArray",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1OfferFilter_FieldNumber_OrponsArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferFilter__storage_, orponsArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
        .dataType = GPBDataTypeInt64,
      },
      {
        .name = "companyIdsArray",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1OfferFilter_FieldNumber_CompanyIdsArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferFilter__storage_, companyIdsArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
        .dataType = GPBDataTypeInt32,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter)
                                   messageName:@"OfferFilter"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferFilter__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 - KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError

@implementation KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError

@dynamic reasonOneOfCase;
@dynamic orpons;
@dynamic companyIds;

typedef struct KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid *orpons;
  KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid *companyIds;
} KEYAPISSUBSCRIPTIONV1OfferFilter_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(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid),
        .number = KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_FieldNumber_Orpons,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError__storage_, orpons),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "companyIds",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid),
        .number = KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_FieldNumber_CompanyIds,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError__storage_, companyIds),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError)
                                   messageName:@"ValidationError"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferFilter_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(KEYAPISSUBSCRIPTIONV1OfferFilter)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

@implementation KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid


typedef struct KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1OfferFilter_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(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid)
                                   messageName:@"OrponsInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_OrponsInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid

@implementation KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid


typedef struct KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid__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(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid)
                                   messageName:@"CompanyIdsInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError_CompanyIdsInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1OfferPaging

@implementation KEYAPISSUBSCRIPTIONV1OfferPaging

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

typedef struct KEYAPISSUBSCRIPTIONV1OfferPaging__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType orderByType;
  KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType directionType;
  int32_t limit;
  int32_t offset;
} KEYAPISSUBSCRIPTIONV1OfferPaging__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 = KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_OrderByType,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferPaging__storage_, orderByType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "directionType",
        .dataTypeSpecific.enumDescFunc = KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_EnumDescriptor,
        .number = KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_DirectionType,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferPaging__storage_, directionType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "limit",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_Limit,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferPaging__storage_, limit),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "offset",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_Offset,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferPaging__storage_, offset),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging)
                                   messageName:@"OfferPaging"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferPaging__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 KEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_RawValue(KEYAPISSUBSCRIPTIONV1OfferPaging *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1OfferPaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_OrderByType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1OfferPaging_OrderByType_RawValue(KEYAPISSUBSCRIPTIONV1OfferPaging *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1OfferPaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_OrderByType];
  GPBSetMessageRawEnumField(message, field, value);
}

int32_t KEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_RawValue(KEYAPISSUBSCRIPTIONV1OfferPaging *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1OfferPaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_DirectionType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISSUBSCRIPTIONV1OfferPaging_DirectionType_RawValue(KEYAPISSUBSCRIPTIONV1OfferPaging *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1OfferPaging descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISSUBSCRIPTIONV1OfferPaging_FieldNumber_DirectionType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError

@implementation KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError

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

typedef struct KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid *limit;
  KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid *offset;
} KEYAPISSUBSCRIPTIONV1OfferPaging_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(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid),
        .number = KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_FieldNumber_Limit,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError__storage_, limit),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "offset",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid),
        .number = KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_FieldNumber_Offset,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError__storage_, offset),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError)
                                   messageName:@"ValidationError"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferPaging_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(KEYAPISSUBSCRIPTIONV1OfferPaging)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

@implementation KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid


typedef struct KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1OfferPaging_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(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid)
                                   messageName:@"LimitInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_LimitInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid

@implementation KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid


typedef struct KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid__storage_ {
  uint32_t _has_storage_[1];
} KEYAPISSUBSCRIPTIONV1OfferPaging_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(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid)
                                   messageName:@"OffsetInvalid"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError_OffsetInvalid__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - KEYAPISSUBSCRIPTIONV1GetOfferRequest

@implementation KEYAPISSUBSCRIPTIONV1GetOfferRequest

@dynamic id_p;

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferRequest__storage_ {
  uint32_t _has_storage_[1];
  NSString *id_p;
} KEYAPISSUBSCRIPTIONV1GetOfferRequest__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 = "id_p",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISSUBSCRIPTIONV1GetOfferRequest_FieldNumber_Id_p,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferRequest__storage_, id_p),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferRequest)
                                   messageName:@"GetOfferRequest"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferRequest__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 - KEYAPISSUBSCRIPTIONV1GetOfferResponse

@implementation KEYAPISSUBSCRIPTIONV1GetOfferResponse

@dynamic typeOneOfCase;
@dynamic data_p;

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferResponse__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1Offer *data_p;
} KEYAPISSUBSCRIPTIONV1GetOfferResponse__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(KEYAPISSUBSCRIPTIONV1Offer),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferResponse)
                                   messageName:@"GetOfferResponse"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferResponse__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 KEYAPISSUBSCRIPTIONV1GetOfferResponse_ClearTypeOneOfCase(KEYAPISSUBSCRIPTIONV1GetOfferResponse *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetOfferResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetOfferListRequest

@implementation KEYAPISSUBSCRIPTIONV1GetOfferListRequest

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

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferListRequest__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1OfferFilter *filter;
  KEYAPISSUBSCRIPTIONV1OfferPaging *paging;
} KEYAPISSUBSCRIPTIONV1GetOfferListRequest__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(KEYAPISSUBSCRIPTIONV1OfferFilter),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferListRequest_FieldNumber_Filter,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferListRequest__storage_, filter),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "paging",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferListRequest_FieldNumber_Paging,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferListRequest__storage_, paging),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferListRequest)
                                   messageName:@"GetOfferListRequest"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferListRequest__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 KEYAPISSUBSCRIPTIONV1GetOfferListRequest_ClearPaginationOneOfCase(KEYAPISSUBSCRIPTIONV1GetOfferListRequest *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetOfferListRequest descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetOfferListResponse

@implementation KEYAPISSUBSCRIPTIONV1GetOfferListResponse

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

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferListResponse__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1Offer *data_p;
  KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error *error;
} KEYAPISSUBSCRIPTIONV1GetOfferListResponse__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(KEYAPISSUBSCRIPTIONV1Offer),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferListResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferListResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "error",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferListResponse_FieldNumber_Error,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferListResponse__storage_, error),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferListResponse)
                                   messageName:@"GetOfferListResponse"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferListResponse__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 KEYAPISSUBSCRIPTIONV1GetOfferListResponse_ClearTypeOneOfCase(KEYAPISSUBSCRIPTIONV1GetOfferListResponse *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetOfferListResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error

@implementation KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error

@dynamic reasonOneOfCase;
@dynamic offerFilterValidation;
@dynamic offerPagingValidation;

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError *offerFilterValidation;
  KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError *offerPagingValidation;
} KEYAPISSUBSCRIPTIONV1GetOfferListResponse_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 = "offerFilterValidation",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error_FieldNumber_OfferFilterValidation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error__storage_, offerFilterValidation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "offerPagingValidation",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferPaging_ValidationError),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error_FieldNumber_OfferPagingValidation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error__storage_, offerPagingValidation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferListResponse_Error)
                                   messageName:@"Error"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferListResponse_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(KEYAPISSUBSCRIPTIONV1GetOfferListResponse)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

@implementation KEYAPISSUBSCRIPTIONV1GetOfferCountRequest

@dynamic hasFilter, filter;

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferCountRequest__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISSUBSCRIPTIONV1OfferFilter *filter;
} KEYAPISSUBSCRIPTIONV1GetOfferCountRequest__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(KEYAPISSUBSCRIPTIONV1OfferFilter),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferCountRequest_FieldNumber_Filter,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest__storage_, filter),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest)
                                   messageName:@"GetOfferCountRequest"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest__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 - KEYAPISSUBSCRIPTIONV1GetOfferCountResponse

@implementation KEYAPISSUBSCRIPTIONV1GetOfferCountResponse

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

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferCountResponse__storage_ {
  uint32_t _has_storage_[2];
  int32_t data_p;
  KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error *error;
} KEYAPISSUBSCRIPTIONV1GetOfferCountResponse__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 = KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "error",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_FieldNumber_Error,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse__storage_, error),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse)
                                   messageName:@"GetOfferCountResponse"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse__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 KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_ClearTypeOneOfCase(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse *message) {
  GPBDescriptor *descriptor = [KEYAPISSUBSCRIPTIONV1GetOfferCountResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error

@implementation KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error

@dynamic reasonOneOfCase;
@dynamic offerFilterValidation;

typedef struct KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error__storage_ {
  uint32_t _has_storage_[2];
  KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError *offerFilterValidation;
} KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_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 = "offerFilterValidation",
        .dataTypeSpecific.clazz = GPBObjCClass(KEYAPISSUBSCRIPTIONV1OfferFilter_ValidationError),
        .number = KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error_FieldNumber_OfferFilterValidation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error__storage_, offerFilterValidation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_Error)
                                   messageName:@"Error"
                               fileDescription:&KEYAPISSUBSCRIPTIONV1KeyapisSubscriptionOfferV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse_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(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)

// clang-format on
