// Generated by the protocol buffer compiler.  DO NOT EDIT!
// clang-format off
// source: keyapis/vc/v1/keyapis_vc_camera_access_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/vc/v1/KeyapisVcCameraAccessV1.pbobjc.h"
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
// @@protoc_insertion_point(imports)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-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(KEYAPISVCV1CameraAccess);

#pragma mark - KEYAPISVCV1KeyapisVcCameraAccessV1Root

@implementation KEYAPISVCV1KeyapisVcCameraAccessV1Root

+ (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 KEYAPISVCV1KeyapisVcCameraAccessV1Root_FileDescription = {
  .package = "keyapis.vc.v1",
  .prefix = "KEYAPISVCV1",
  .syntax = GPBFileSyntaxProto3
};

#pragma mark - Enum KEYAPISVCV1CameraAccess_AccessorType

GPBEnumDescriptor *KEYAPISVCV1CameraAccess_AccessorType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "AccessorTypeUnknown\000User\000Group\000";
    static const int32_t values[] = {
        KEYAPISVCV1CameraAccess_AccessorType_AccessorTypeUnknown,
        KEYAPISVCV1CameraAccess_AccessorType_User,
        KEYAPISVCV1CameraAccess_AccessorType_Group,
    };
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(KEYAPISVCV1CameraAccess_AccessorType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:KEYAPISVCV1CameraAccess_AccessorType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL KEYAPISVCV1CameraAccess_AccessorType_IsValidValue(int32_t value__) {
  switch (value__) {
    case KEYAPISVCV1CameraAccess_AccessorType_AccessorTypeUnknown:
    case KEYAPISVCV1CameraAccess_AccessorType_User:
    case KEYAPISVCV1CameraAccess_AccessorType_Group:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - KEYAPISVCV1CameraAccess

@implementation KEYAPISVCV1CameraAccess

@dynamic externalId;
@dynamic accessorType;
@dynamic accessorId;
@dynamic vcCompanyId;

typedef struct KEYAPISVCV1CameraAccess__storage_ {
  uint32_t _has_storage_[1];
  KEYAPISVCV1CameraAccess_AccessorType accessorType;
  int32_t vcCompanyId;
  NSString *externalId;
  NSString *accessorId;
} KEYAPISVCV1CameraAccess__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 = "externalId",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISVCV1CameraAccess_FieldNumber_ExternalId,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(KEYAPISVCV1CameraAccess__storage_, externalId),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "accessorType",
        .dataTypeSpecific.enumDescFunc = KEYAPISVCV1CameraAccess_AccessorType_EnumDescriptor,
        .number = KEYAPISVCV1CameraAccess_FieldNumber_AccessorType,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(KEYAPISVCV1CameraAccess__storage_, accessorType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "accessorId",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISVCV1CameraAccess_FieldNumber_AccessorId,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(KEYAPISVCV1CameraAccess__storage_, accessorId),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "vcCompanyId",
        .dataTypeSpecific.clazz = Nil,
        .number = KEYAPISVCV1CameraAccess_FieldNumber_VcCompanyId,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(KEYAPISVCV1CameraAccess__storage_, vcCompanyId),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeInt32,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(KEYAPISVCV1CameraAccess)
                                   messageName:@"CameraAccess"
                               fileDescription:&KEYAPISVCV1KeyapisVcCameraAccessV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(KEYAPISVCV1CameraAccess__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 KEYAPISVCV1CameraAccess_AccessorType_RawValue(KEYAPISVCV1CameraAccess *message) {
  GPBDescriptor *descriptor = [KEYAPISVCV1CameraAccess descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISVCV1CameraAccess_FieldNumber_AccessorType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetKEYAPISVCV1CameraAccess_AccessorType_RawValue(KEYAPISVCV1CameraAccess *message, int32_t value) {
  GPBDescriptor *descriptor = [KEYAPISVCV1CameraAccess descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:KEYAPISVCV1CameraAccess_FieldNumber_AccessorType];
  GPBSetMessageRawEnumField(message, field, value);
}


#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)

// clang-format on
