// Generated by the protocol buffer compiler.  DO NOT EDIT!
// clang-format off
// source: deviceapis/device/v1/deviceapis_device_reader_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 "deviceapis/device/v1/DeviceapisDeviceReaderV1.pbobjc.h"
#import "deviceapis/device/v1/DeviceapisDeviceCommonV1.pbobjc.h"
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.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(DEVICEAPISDEVICEV1EditReaderRequest);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1EditReaderResponse);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1EditReaderResponse_Error);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1GetReaderRequest);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1GetReaderResponse);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1Reader);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1Reader_SavingError);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1Reader_SavingError_ProfileNotFound);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1Reader_SavingError_ReaderNotFound);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1ValidationError);
GPBObjCClassDeclaration(GPBFieldMask);

#pragma mark - DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root

@implementation DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root

+ (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 DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription = {
  .package = "deviceapis.device.v1",
  .prefix = "DEVICEAPISDEVICEV1",
  .syntax = GPBFileSyntaxProto3
};

#pragma mark - Enum DEVICEAPISDEVICEV1Reader_DirectionType

GPBEnumDescriptor *DEVICEAPISDEVICEV1Reader_DirectionType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "DirectionTypeUnknown\000In\000Out\000";
    static const int32_t values[] = {
        DEVICEAPISDEVICEV1Reader_DirectionType_DirectionTypeUnknown,
        DEVICEAPISDEVICEV1Reader_DirectionType_In,
        DEVICEAPISDEVICEV1Reader_DirectionType_Out,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(DEVICEAPISDEVICEV1Reader_DirectionType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:DEVICEAPISDEVICEV1Reader_DirectionType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL DEVICEAPISDEVICEV1Reader_DirectionType_IsValidValue(int32_t value__) {
  switch (value__) {
    case DEVICEAPISDEVICEV1Reader_DirectionType_DirectionTypeUnknown:
    case DEVICEAPISDEVICEV1Reader_DirectionType_In:
    case DEVICEAPISDEVICEV1Reader_DirectionType_Out:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - DEVICEAPISDEVICEV1EditReaderRequest

@implementation DEVICEAPISDEVICEV1EditReaderRequest

@dynamic hasData_p, data_p;
@dynamic hasUpdateMask, updateMask;

typedef struct DEVICEAPISDEVICEV1EditReaderRequest__storage_ {
  uint32_t _has_storage_[1];
  DEVICEAPISDEVICEV1Reader *data_p;
  GPBFieldMask *updateMask;
} DEVICEAPISDEVICEV1EditReaderRequest__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(DEVICEAPISDEVICEV1Reader),
        .number = DEVICEAPISDEVICEV1EditReaderRequest_FieldNumber_Data_p,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1EditReaderRequest__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "updateMask",
        .dataTypeSpecific.clazz = GPBObjCClass(GPBFieldMask),
        .number = DEVICEAPISDEVICEV1EditReaderRequest_FieldNumber_UpdateMask,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1EditReaderRequest__storage_, updateMask),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1EditReaderRequest)
                                   messageName:@"EditReaderRequest"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1EditReaderRequest__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 - DEVICEAPISDEVICEV1EditReaderResponse

@implementation DEVICEAPISDEVICEV1EditReaderResponse

@dynamic typeOneOfCase;
@dynamic error;

typedef struct DEVICEAPISDEVICEV1EditReaderResponse__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1EditReaderResponse_Error *error;
} DEVICEAPISDEVICEV1EditReaderResponse__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 = "error",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1EditReaderResponse_Error),
        .number = DEVICEAPISDEVICEV1EditReaderResponse_FieldNumber_Error,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1EditReaderResponse__storage_, error),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1EditReaderResponse)
                                   messageName:@"EditReaderResponse"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1EditReaderResponse__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 DEVICEAPISDEVICEV1EditReaderResponse_ClearTypeOneOfCase(DEVICEAPISDEVICEV1EditReaderResponse *message) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1EditReaderResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - DEVICEAPISDEVICEV1EditReaderResponse_Error

@implementation DEVICEAPISDEVICEV1EditReaderResponse_Error

@dynamic reasonOneOfCase;
@dynamic validation;
@dynamic saving;

typedef struct DEVICEAPISDEVICEV1EditReaderResponse_Error__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1ValidationError *validation;
  DEVICEAPISDEVICEV1Reader_SavingError *saving;
} DEVICEAPISDEVICEV1EditReaderResponse_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 = "validation",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1ValidationError),
        .number = DEVICEAPISDEVICEV1EditReaderResponse_Error_FieldNumber_Validation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1EditReaderResponse_Error__storage_, validation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "saving",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError),
        .number = DEVICEAPISDEVICEV1EditReaderResponse_Error_FieldNumber_Saving,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1EditReaderResponse_Error__storage_, saving),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1EditReaderResponse_Error)
                                   messageName:@"Error"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1EditReaderResponse_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(DEVICEAPISDEVICEV1EditReaderResponse)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

@implementation DEVICEAPISDEVICEV1GetReaderRequest

@dynamic id_p;

typedef struct DEVICEAPISDEVICEV1GetReaderRequest__storage_ {
  uint32_t _has_storage_[1];
  int32_t id_p;
} DEVICEAPISDEVICEV1GetReaderRequest__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 = DEVICEAPISDEVICEV1GetReaderRequest_FieldNumber_Id_p,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1GetReaderRequest__storage_, id_p),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1GetReaderRequest)
                                   messageName:@"GetReaderRequest"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1GetReaderRequest__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 - DEVICEAPISDEVICEV1GetReaderResponse

@implementation DEVICEAPISDEVICEV1GetReaderResponse

@dynamic typeOneOfCase;
@dynamic data_p;

typedef struct DEVICEAPISDEVICEV1GetReaderResponse__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1Reader *data_p;
} DEVICEAPISDEVICEV1GetReaderResponse__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(DEVICEAPISDEVICEV1Reader),
        .number = DEVICEAPISDEVICEV1GetReaderResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1GetReaderResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1GetReaderResponse)
                                   messageName:@"GetReaderResponse"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1GetReaderResponse__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 DEVICEAPISDEVICEV1GetReaderResponse_ClearTypeOneOfCase(DEVICEAPISDEVICEV1GetReaderResponse *message) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1GetReaderResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - DEVICEAPISDEVICEV1Reader

@implementation DEVICEAPISDEVICEV1Reader

@dynamic id_p;
@dynamic encryptionProfileIdsArray, encryptionProfileIdsArray_Count;
@dynamic relayIndexesArray, relayIndexesArray_Count;
@dynamic isNoneSecureMode;
@dynamic directionType;

typedef struct DEVICEAPISDEVICEV1Reader__storage_ {
  uint32_t _has_storage_[1];
  int32_t id_p;
  DEVICEAPISDEVICEV1Reader_DirectionType directionType;
  GPBInt32Array *encryptionProfileIdsArray;
  GPBInt32Array *relayIndexesArray;
} DEVICEAPISDEVICEV1Reader__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 = DEVICEAPISDEVICEV1Reader_FieldNumber_Id_p,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader__storage_, id_p),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "encryptionProfileIdsArray",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1Reader_FieldNumber_EncryptionProfileIdsArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader__storage_, encryptionProfileIdsArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "relayIndexesArray",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1Reader_FieldNumber_RelayIndexesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader__storage_, relayIndexesArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
        .dataType = GPBDataTypeInt32,
      },
      {
        .name = "isNoneSecureMode",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1Reader_FieldNumber_IsNoneSecureMode,
        .hasIndex = 1,
        .offset = 2,  // Stored in _has_storage_ to save space.
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeBool,
      },
      {
        .name = "directionType",
        .dataTypeSpecific.enumDescFunc = DEVICEAPISDEVICEV1Reader_DirectionType_EnumDescriptor,
        .number = DEVICEAPISDEVICEV1Reader_FieldNumber_DirectionType,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader__storage_, directionType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1Reader)
                                   messageName:@"Reader"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1Reader__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 DEVICEAPISDEVICEV1Reader_DirectionType_RawValue(DEVICEAPISDEVICEV1Reader *message) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1Reader descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:DEVICEAPISDEVICEV1Reader_FieldNumber_DirectionType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetDEVICEAPISDEVICEV1Reader_DirectionType_RawValue(DEVICEAPISDEVICEV1Reader *message, int32_t value) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1Reader descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:DEVICEAPISDEVICEV1Reader_FieldNumber_DirectionType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - DEVICEAPISDEVICEV1Reader_SavingError

@implementation DEVICEAPISDEVICEV1Reader_SavingError

@dynamic reasonOneOfCase;
@dynamic readerNotFound;
@dynamic profileIsNotSupported;
@dynamic profileNotFound;

typedef struct DEVICEAPISDEVICEV1Reader_SavingError__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1Reader_SavingError_ReaderNotFound *readerNotFound;
  DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported *profileIsNotSupported;
  DEVICEAPISDEVICEV1Reader_SavingError_ProfileNotFound *profileNotFound;
} DEVICEAPISDEVICEV1Reader_SavingError__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 = "readerNotFound",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError_ReaderNotFound),
        .number = DEVICEAPISDEVICEV1Reader_SavingError_FieldNumber_ReaderNotFound,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader_SavingError__storage_, readerNotFound),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "profileIsNotSupported",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported),
        .number = DEVICEAPISDEVICEV1Reader_SavingError_FieldNumber_ProfileIsNotSupported,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader_SavingError__storage_, profileIsNotSupported),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "profileNotFound",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError_ProfileNotFound),
        .number = DEVICEAPISDEVICEV1Reader_SavingError_FieldNumber_ProfileNotFound,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader_SavingError__storage_, profileNotFound),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError)
                                   messageName:@"SavingError"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1Reader_SavingError__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(DEVICEAPISDEVICEV1Reader)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

@implementation DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported

@dynamic profileIdsArray, profileIdsArray_Count;

typedef struct DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported__storage_ {
  uint32_t _has_storage_[1];
  GPBInt32Array *profileIdsArray;
} DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported__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 = "profileIdsArray",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported_FieldNumber_ProfileIdsArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported__storage_, profileIdsArray),
        .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
        .dataType = GPBDataTypeInt32,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported)
                                   messageName:@"ProfileIsNotSupported"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceReaderV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1Reader_SavingError_ProfileIsNotSupported__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(DEVICEAPISDEVICEV1Reader_SavingError)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - DEVICEAPISDEVICEV1Reader_SavingError_ProfileNotFound

@implementation DEVICEAPISDEVICEV1Reader_SavingError_ProfileNotFound


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

@end

#pragma mark - DEVICEAPISDEVICEV1Reader_SavingError_ReaderNotFound

@implementation DEVICEAPISDEVICEV1Reader_SavingError_ReaderNotFound


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

@end


#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)

// clang-format on
