// Generated by the protocol buffer compiler.  DO NOT EDIT!
// clang-format off
// source: deviceapis/device/v1/deviceapis_device_gate_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/DeviceapisDeviceGateV1.pbobjc.h"
#import "deviceapis/device/v1/DeviceapisDeviceCommonV1.pbobjc.h"
#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "protoc-gen-openapiv2/options/Annotations.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(DEVICEAPISDEVICEV1GateMode);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1GetGateModeRequest);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1GetGateModeResponse);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1House);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1House_RoomRange);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1SaveGateModeRequest);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1SaveGateModeResponse);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1SaveGateModeResponse_Error);
GPBObjCClassDeclaration(DEVICEAPISDEVICEV1ValidationError);

#pragma mark - DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root

@implementation DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root

+ (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]];
    [registry addExtensions:[AnnotationsRoot extensionRegistry]];
  }
  return registry;
}

@end

static GPBFileDescription DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription = {
  .package = "deviceapis.device.v1",
  .prefix = "DEVICEAPISDEVICEV1",
  .syntax = GPBFileSyntaxProto3
};

#pragma mark - Enum DEVICEAPISDEVICEV1House_InviteTemplateType

GPBEnumDescriptor *DEVICEAPISDEVICEV1House_InviteTemplateType_EnumDescriptor(void) {
  static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    static const char *valueNames =
        "InviteTemplateTypeUnknown\000H4LzF4Lz\000H4LzF"
        "4\000H4F4Lz\000";
    static const int32_t values[] = {
        DEVICEAPISDEVICEV1House_InviteTemplateType_InviteTemplateTypeUnknown,
        DEVICEAPISDEVICEV1House_InviteTemplateType_H4LzF4Lz,
        DEVICEAPISDEVICEV1House_InviteTemplateType_H4LzF4,
        DEVICEAPISDEVICEV1House_InviteTemplateType_H4F4Lz,
    };
    static const char *extraTextFormatInfo = "\003\001\003A\203A\000\002\003A\202\000\003\002\203A\000";
    GPBEnumDescriptor *worker =
        [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(DEVICEAPISDEVICEV1House_InviteTemplateType)
                                       valueNames:valueNames
                                           values:values
                                            count:(uint32_t)(sizeof(values) / sizeof(int32_t))
                                     enumVerifier:DEVICEAPISDEVICEV1House_InviteTemplateType_IsValidValue
                                            flags:GPBEnumDescriptorInitializationFlag_None
                              extraTextFormatInfo:extraTextFormatInfo];
    GPBEnumDescriptor *expected = nil;
    if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
      [worker release];
    }
  }
  return descriptor;
}

BOOL DEVICEAPISDEVICEV1House_InviteTemplateType_IsValidValue(int32_t value__) {
  switch (value__) {
    case DEVICEAPISDEVICEV1House_InviteTemplateType_InviteTemplateTypeUnknown:
    case DEVICEAPISDEVICEV1House_InviteTemplateType_H4LzF4Lz:
    case DEVICEAPISDEVICEV1House_InviteTemplateType_H4LzF4:
    case DEVICEAPISDEVICEV1House_InviteTemplateType_H4F4Lz:
      return YES;
    default:
      return NO;
  }
}

#pragma mark - DEVICEAPISDEVICEV1GateMode

@implementation DEVICEAPISDEVICEV1GateMode

@dynamic isGateModeOn;
@dynamic housesArray, housesArray_Count;

typedef struct DEVICEAPISDEVICEV1GateMode__storage_ {
  uint32_t _has_storage_[1];
  NSMutableArray *housesArray;
} DEVICEAPISDEVICEV1GateMode__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 = "isGateModeOn",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1GateMode_FieldNumber_IsGateModeOn,
        .hasIndex = 0,
        .offset = 1,  // Stored in _has_storage_ to save space.
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeBool,
      },
      {
        .name = "housesArray",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1House),
        .number = DEVICEAPISDEVICEV1GateMode_FieldNumber_HousesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1GateMode__storage_, housesArray),
        .flags = GPBFieldRepeated,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1GateMode)
                                   messageName:@"GateMode"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1GateMode__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 - DEVICEAPISDEVICEV1GetGateModeRequest

@implementation DEVICEAPISDEVICEV1GetGateModeRequest


typedef struct DEVICEAPISDEVICEV1GetGateModeRequest__storage_ {
  uint32_t _has_storage_[1];
} DEVICEAPISDEVICEV1GetGateModeRequest__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(DEVICEAPISDEVICEV1GetGateModeRequest)
                                   messageName:@"GetGateModeRequest"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:NULL
                                    fieldCount:0
                                   storageSize:sizeof(DEVICEAPISDEVICEV1GetGateModeRequest__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 - DEVICEAPISDEVICEV1GetGateModeResponse

@implementation DEVICEAPISDEVICEV1GetGateModeResponse

@dynamic typeOneOfCase;
@dynamic data_p;

typedef struct DEVICEAPISDEVICEV1GetGateModeResponse__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1GateMode *data_p;
} DEVICEAPISDEVICEV1GetGateModeResponse__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(DEVICEAPISDEVICEV1GateMode),
        .number = DEVICEAPISDEVICEV1GetGateModeResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1GetGateModeResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1GetGateModeResponse)
                                   messageName:@"GetGateModeResponse"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1GetGateModeResponse__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 DEVICEAPISDEVICEV1GetGateModeResponse_ClearTypeOneOfCase(DEVICEAPISDEVICEV1GetGateModeResponse *message) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1GetGateModeResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - DEVICEAPISDEVICEV1House

@implementation DEVICEAPISDEVICEV1House

@dynamic address;
@dynamic prefix;
@dynamic hasRoomRange, roomRange;
@dynamic sipServer;
@dynamic inviteTemplateType;

typedef struct DEVICEAPISDEVICEV1House__storage_ {
  uint32_t _has_storage_[1];
  DEVICEAPISDEVICEV1House_InviteTemplateType inviteTemplateType;
  NSString *address;
  NSString *prefix;
  DEVICEAPISDEVICEV1House_RoomRange *roomRange;
  NSString *sipServer;
} DEVICEAPISDEVICEV1House__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 = "address",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1House_FieldNumber_Address,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House__storage_, address),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "prefix",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1House_FieldNumber_Prefix,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House__storage_, prefix),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "roomRange",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1House_RoomRange),
        .number = DEVICEAPISDEVICEV1House_FieldNumber_RoomRange,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House__storage_, roomRange),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "sipServer",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1House_FieldNumber_SipServer,
        .hasIndex = 3,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House__storage_, sipServer),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "inviteTemplateType",
        .dataTypeSpecific.enumDescFunc = DEVICEAPISDEVICEV1House_InviteTemplateType_EnumDescriptor,
        .number = DEVICEAPISDEVICEV1House_FieldNumber_InviteTemplateType,
        .hasIndex = 4,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House__storage_, inviteTemplateType),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeEnum,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1House)
                                   messageName:@"House"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1House__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 DEVICEAPISDEVICEV1House_InviteTemplateType_RawValue(DEVICEAPISDEVICEV1House *message) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1House descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:DEVICEAPISDEVICEV1House_FieldNumber_InviteTemplateType];
  return GPBGetMessageRawEnumField(message, field);
}

void SetDEVICEAPISDEVICEV1House_InviteTemplateType_RawValue(DEVICEAPISDEVICEV1House *message, int32_t value) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1House descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:DEVICEAPISDEVICEV1House_FieldNumber_InviteTemplateType];
  GPBSetMessageRawEnumField(message, field, value);
}

#pragma mark - DEVICEAPISDEVICEV1House_RoomRange

@implementation DEVICEAPISDEVICEV1House_RoomRange

@dynamic firstRoomNumber;
@dynamic lastRoomNumber;

typedef struct DEVICEAPISDEVICEV1House_RoomRange__storage_ {
  uint32_t _has_storage_[1];
  NSString *firstRoomNumber;
  NSString *lastRoomNumber;
} DEVICEAPISDEVICEV1House_RoomRange__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 = "firstRoomNumber",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1House_RoomRange_FieldNumber_FirstRoomNumber,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House_RoomRange__storage_, firstRoomNumber),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
      {
        .name = "lastRoomNumber",
        .dataTypeSpecific.clazz = Nil,
        .number = DEVICEAPISDEVICEV1House_RoomRange_FieldNumber_LastRoomNumber,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1House_RoomRange__storage_, lastRoomNumber),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
        .dataType = GPBDataTypeString,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1House_RoomRange)
                                   messageName:@"RoomRange"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1House_RoomRange__storage_)
                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
    [localDescriptor setupContainingMessageClass:GPBObjCClass(DEVICEAPISDEVICEV1House)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - DEVICEAPISDEVICEV1SaveGateModeRequest

@implementation DEVICEAPISDEVICEV1SaveGateModeRequest

@dynamic hasData_p, data_p;

typedef struct DEVICEAPISDEVICEV1SaveGateModeRequest__storage_ {
  uint32_t _has_storage_[1];
  DEVICEAPISDEVICEV1GateMode *data_p;
} DEVICEAPISDEVICEV1SaveGateModeRequest__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(DEVICEAPISDEVICEV1GateMode),
        .number = DEVICEAPISDEVICEV1SaveGateModeRequest_FieldNumber_Data_p,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1SaveGateModeRequest__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1SaveGateModeRequest)
                                   messageName:@"SaveGateModeRequest"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1SaveGateModeRequest__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 - DEVICEAPISDEVICEV1SaveGateModeResponse

@implementation DEVICEAPISDEVICEV1SaveGateModeResponse

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

typedef struct DEVICEAPISDEVICEV1SaveGateModeResponse__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1GateMode *data_p;
  DEVICEAPISDEVICEV1SaveGateModeResponse_Error *error;
} DEVICEAPISDEVICEV1SaveGateModeResponse__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(DEVICEAPISDEVICEV1GateMode),
        .number = DEVICEAPISDEVICEV1SaveGateModeResponse_FieldNumber_Data_p,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1SaveGateModeResponse__storage_, data_p),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "error",
        .dataTypeSpecific.clazz = GPBObjCClass(DEVICEAPISDEVICEV1SaveGateModeResponse_Error),
        .number = DEVICEAPISDEVICEV1SaveGateModeResponse_FieldNumber_Error,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1SaveGateModeResponse__storage_, error),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1SaveGateModeResponse)
                                   messageName:@"SaveGateModeResponse"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1SaveGateModeResponse__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 DEVICEAPISDEVICEV1SaveGateModeResponse_ClearTypeOneOfCase(DEVICEAPISDEVICEV1SaveGateModeResponse *message) {
  GPBDescriptor *descriptor = [DEVICEAPISDEVICEV1SaveGateModeResponse descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBClearOneof(message, oneof);
}
#pragma mark - DEVICEAPISDEVICEV1SaveGateModeResponse_Error

@implementation DEVICEAPISDEVICEV1SaveGateModeResponse_Error

@dynamic reasonOneOfCase;
@dynamic validation;

typedef struct DEVICEAPISDEVICEV1SaveGateModeResponse_Error__storage_ {
  uint32_t _has_storage_[2];
  DEVICEAPISDEVICEV1ValidationError *validation;
} DEVICEAPISDEVICEV1SaveGateModeResponse_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 = DEVICEAPISDEVICEV1SaveGateModeResponse_Error_FieldNumber_Validation,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(DEVICEAPISDEVICEV1SaveGateModeResponse_Error__storage_, validation),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(DEVICEAPISDEVICEV1SaveGateModeResponse_Error)
                                   messageName:@"Error"
                               fileDescription:&DEVICEAPISDEVICEV1DeviceapisDeviceGateV1Root_FileDescription
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(DEVICEAPISDEVICEV1SaveGateModeResponse_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(DEVICEAPISDEVICEV1SaveGateModeResponse)];
    #if defined(DEBUG) && DEBUG
      NSAssert(descriptor == nil, @"Startup recursed!");
    #endif  // DEBUG
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

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

#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)

// clang-format on
