Example #1
0
func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
	if err != nil {
		return err
	}
	*x = MyMessage_Color(value)
	return nil
}
func (x *StringMaxLen) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(StringMaxLen_value, data, "StringMaxLen")
	if err != nil {
		return err
	}
	*x = StringMaxLen(value)
	return nil
}
Example #3
0
func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod")
	if err != nil {
		return err
	}
	*x = URLFetchRequest_RequestMethod(value)
	return nil
}
func (x *UserQueueMoveAction) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(UserQueueMoveAction_value, data, "UserQueueMoveAction")
	if err != nil {
		return err
	}
	*x = UserQueueMoveAction(value)
	return nil
}
func (x *VoiceModeControl_EnumVoiceModeControl) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(VoiceModeControl_EnumVoiceModeControl_value, data, "VoiceModeControl_EnumVoiceModeControl")
	if err != nil {
		return err
	}
	*x = VoiceModeControl_EnumVoiceModeControl(value)
	return nil
}
Example #6
0
func (x *TaskState) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(TaskState_value, data, "TaskState")
	if err != nil {
		return err
	}
	*x = TaskState(value)
	return nil
}
Example #7
0
func (x *Status) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Status_value, data, "Status")
	if err != nil {
		return err
	}
	*x = Status(value)
	return nil
}
func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
	if err != nil {
		return err
	}
	*x = FileOptions_OptimizeMode(value)
	return nil
}
func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType")
	if err != nil {
		return err
	}
	*x = FieldOptions_CType(value)
	return nil
}
Example #10
0
func (x *msg_Cmd) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(msg_Cmd_value, data, "msg_Cmd")
	if err != nil {
		return err
	}
	*x = msg_Cmd(value)
	return nil
}
func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label")
	if err != nil {
		return err
	}
	*x = FieldDescriptorProto_Label(value)
	return nil
}
Example #12
0
func (x *FOO) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
	if err != nil {
		return err
	}
	*x = FOO(value)
	return nil
}
Example #13
0
func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
	if err != nil {
		return err
	}
	*x = RepeatedEnum_Color(value)
	return nil
}
Example #14
0
func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
	if err != nil {
		return err
	}
	*x = Defaults_Color(value)
	return nil
}
Example #15
0
func (x *response_Err) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(response_Err_value, data, "response_Err")
	if err != nil {
		return err
	}
	*x = response_Err(value)
	return nil
}
Example #16
0
func (x *Blob_CompressionInfo_CompressionType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Blob_CompressionInfo_CompressionType_value, data, "Blob_CompressionInfo_CompressionType")
	if err != nil {
		return err
	}
	*x = Blob_CompressionInfo_CompressionType(value)
	return nil
}
Example #17
0
func (x *request_Verb) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(request_Verb_value, data, "request_Verb")
	if err != nil {
		return err
	}
	*x = request_Verb(value)
	return nil
}
Example #18
0
func (x *LS_UpdatePlayerCountResult_Result) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(LS_UpdatePlayerCountResult_Result_value, data, "LS_UpdatePlayerCountResult_Result")
	if err != nil {
		return err
	}
	*x = LS_UpdatePlayerCountResult_Result(value)
	return nil
}
Example #19
0
func (x *Value_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Value_Type_value, data, "Value_Type")
	if err != nil {
		return err
	}
	*x = Value_Type(value)
	return nil
}
Example #20
0
func (x *Header_MessageType) UnmarshalJSON(data []byte) error {
	value, err := proto1.UnmarshalJSONEnum(Header_MessageType_value, data, "Header_MessageType")
	if err != nil {
		return err
	}
	*x = Header_MessageType(value)
	return nil
}
func (x *ChannelMembership) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ChannelMembership_value, data, "ChannelMembership")
	if err != nil {
		return err
	}
	*x = ChannelMembership(value)
	return nil
}
Example #22
0
func (x *Command) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Command_value, data, "Command")
	if err != nil {
		return err
	}
	*x = Command(value)
	return nil
}
func (x *VoiceModeControl_MaxMicTime) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(VoiceModeControl_MaxMicTime_value, data, "VoiceModeControl_MaxMicTime")
	if err != nil {
		return err
	}
	*x = VoiceModeControl_MaxMicTime(value)
	return nil
}
Example #24
0
func (x *Errcode) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Errcode_value, data, "Errcode")
	if err != nil {
		return err
	}
	*x = Errcode(value)
	return nil
}
func (x *ChannelTextControlInfo_ControlInfoOption) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ChannelTextControlInfo_ControlInfoOption_value, data, "ChannelTextControlInfo_ControlInfoOption")
	if err != nil {
		return err
	}
	*x = ChannelTextControlInfo_ControlInfoOption(value)
	return nil
}
Example #26
0
func (x *Response_ErrorCode) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Response_ErrorCode_value, data, "Response_ErrorCode")
	if err != nil {
		return err
	}
	*x = Response_ErrorCode(value)
	return nil
}
Example #27
0
func (x *Operation_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Operation_Type_value, data, "Operation_Type")
	if err != nil {
		return err
	}
	*x = Operation_Type(value)
	return nil
}
Example #28
0
func (x *Request_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Request_Type_value, data, "Request_Type")
	if err != nil {
		return err
	}
	*x = Request_Type(value)
	return nil
}
Example #29
0
func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode")
	if err != nil {
		return err
	}
	*x = URLFetchServiceError_ErrorCode(value)
	return nil
}
Example #30
0
func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
	if err != nil {
		return err
	}
	*x = GoTest_KIND(value)
	return nil
}