syntax = "proto3";

package tests.lint;

import "patch/go.proto";

option go_package = "github.com/alta/protopatch/tests/lint";

option (go.lint).all = true;
option (go.lint).initialisms = 'RGB';
option (go.lint).initialisms = 'RGBA';
option (go.lint).initialisms = 'HSV';

enum Protocol {
	// PROTOCOL_INVALID value should lint to ProtocolInvalid.
	PROTOCOL_INVALID = 0;
	// PROTOCOL_IP value should lint to ProtocolIP.
	PROTOCOL_IP = 1;
	// PROTOCOL_UDP value should lint to ProtocolUDP.
	PROTOCOL_UDP = 2;
	// PROTOCOL_TCP value should lint to ProtocolTCP.
	PROTOCOL_TCP = 3;
}

// Url message type should lint to URL.
message Url {}

// Id message type should lint to ID.
message Id {}

// RgbColor should lint to RGBColor.
message RGBColor {}

message OneofMessage {
	oneof contents {
		// Id oneof should lint to ID.
		Id id = 1;
		// Url oneof should lint to URL.
		Url url = 2;
	};
}

message OuterMessage {
	option (go.message).name = 'Outer';
	// InnerId message should lint to InnerID.
	message InnerId {}
	// InnerId message should lint to InnerURL.
	message InnerUrl {}
	// Flavor should lint to OuterFlavor.
	enum Flavor {
		// FLAVOR_INVALID should lint to OuterFlavorInvalid.
		FLAVOR_INVALID = 0;
		// FLAVOR_ID should lint to OuterFlavorA.
		FLAVOR_A = 1;
		// FLAVOR_B should lint to OuterFlavorB.
		FLAVOR_B = 2;
		// FLAVOR_C should lint to OuterFlavorC.
		FLAVOR_C = 3;
		// FLAVOR_ID should lint to OuterFlavorID.
		FLAVOR_ID = 4;
		// FLAVOR_URL should lint to FlavorID, overriding the custom name.
		FLAVOR_URL = 5 [(go.value).name = 'FlavorId'];
	}
	// id field should lint to ID.
	InnerId id = 1;
	// url field should lint to URL.
	InnerUrl url = 2;
}

message Color {
	oneof value {
		// rgb should lint to RGB.
		string rgb = 1;
		// rgba should lint to RGBA.
		string rgba = 2;
		// hsv should lint to HSV.
		string hsv = 3;
	}
}

enum Basic {
	// INVALID value should lint to BasicInvalid.
	INVALID = 0;
	// A value should lint to BasicInvalid.
	A = 1;
	// B value should lint to BasicInvalid.
	B = 2;
	// C value should lint to BasicInvalid.
	C = 3;
}

// IdFieldsTest message should lint to IDFieldsTest.
message IdFieldsTest {
	// id field should lint to ID.
	string id = 1;
	// customer_id field should lint to CustomerID.
	string customer_id = 2;
	// api_path field should lint to APIPath.
	string api_path = 3;
}
