test

package
v0.0.0-...-8bbdae8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-terraform. DO NOT EDIT.

Code generated by protoc-gen-terraform. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	Mode_name = map[int32]string{
		0: "UNKNOWN",
		1: "ON",
		2: "OFF",
	}
	Mode_value = map[string]int32{
		"UNKNOWN": 0,
		"ON":      1,
		"OFF":     2,
	}
)

Enum value maps for Mode.

View Source
var File_test_primary_proto protoreflect.FileDescriptor
View Source
var File_test_secondary_proto protoreflect.FileDescriptor

Functions

func GenSchemaBranch1

func GenSchemaBranch1(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaBranch1 returns tfsdk.Schema definition for Branch1

func GenSchemaBranch2

func GenSchemaBranch2(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaBranch2 returns tfsdk.Schema definition for Branch2

func GenSchemaEmptyMessageBranch

func GenSchemaEmptyMessageBranch(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaEmptyMessageBranch returns tfsdk.Schema definition for EmptyMessageBranch

func GenSchemaNested

func GenSchemaNested(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaNested returns tfsdk.Schema definition for Nested

func GenSchemaOtherNested

func GenSchemaOtherNested(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaOtherNested returns tfsdk.Schema definition for OtherNested

func GenSchemaTest

func GenSchemaTest(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaTest returns tfsdk.Schema definition for Test

func GenSchemaTest2

func GenSchemaTest2(ctx context.Context) (tfsdk.Schema, diag.Diagnostics)

GenSchemaTest2 returns tfsdk.Schema definition for Test2

Types

type Branch1

type Branch1 struct {

	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	// contains filtered or unexported fields
}

Branch1 message is OneOf branch 1

func (*Branch1) Descriptor deprecated

func (*Branch1) Descriptor() ([]byte, []int)

Deprecated: Use Branch1.ProtoReflect.Descriptor instead.

func (*Branch1) GetStr

func (x *Branch1) GetStr() string

func (*Branch1) ProtoMessage

func (*Branch1) ProtoMessage()

func (*Branch1) ProtoReflect

func (x *Branch1) ProtoReflect() protoreflect.Message

func (*Branch1) Reset

func (x *Branch1) Reset()

func (*Branch1) String

func (x *Branch1) String() string

type Branch2

type Branch2 struct {

	// Int32 int field
	Int32 int32 `protobuf:"varint,1,opt,name=Int32,proto3" json:"Int32,omitempty"`
	// contains filtered or unexported fields
}

Branch2 message is OneOf branch 2

func (*Branch2) Descriptor deprecated

func (*Branch2) Descriptor() ([]byte, []int)

Deprecated: Use Branch2.ProtoReflect.Descriptor instead.

func (*Branch2) GetInt32

func (x *Branch2) GetInt32() int32

func (*Branch2) ProtoMessage

func (*Branch2) ProtoMessage()

func (*Branch2) ProtoReflect

func (x *Branch2) ProtoReflect() protoreflect.Message

func (*Branch2) Reset

func (x *Branch2) Reset()

func (*Branch2) String

func (x *Branch2) String() string

type EmptyMessageBranch

type EmptyMessageBranch struct {
	// contains filtered or unexported fields
}

EmptyMessageBranch message for empty oneof branch

func (*EmptyMessageBranch) Descriptor deprecated

func (*EmptyMessageBranch) Descriptor() ([]byte, []int)

Deprecated: Use EmptyMessageBranch.ProtoReflect.Descriptor instead.

func (*EmptyMessageBranch) ProtoMessage

func (*EmptyMessageBranch) ProtoMessage()

func (*EmptyMessageBranch) ProtoReflect

func (x *EmptyMessageBranch) ProtoReflect() protoreflect.Message

func (*EmptyMessageBranch) Reset

func (x *EmptyMessageBranch) Reset()

func (*EmptyMessageBranch) String

func (x *EmptyMessageBranch) String() string

type Mode

type Mode int32
const (
	Mode_UNKNOWN Mode = 0
	Mode_ON      Mode = 1
	Mode_OFF     Mode = 2
)

func (Mode) Descriptor

func (Mode) Descriptor() protoreflect.EnumDescriptor

func (Mode) Enum

func (x Mode) Enum() *Mode

func (Mode) EnumDescriptor deprecated

func (Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Mode.Descriptor instead.

func (Mode) Number

func (x Mode) Number() protoreflect.EnumNumber

func (Mode) String

func (x Mode) String() string

func (Mode) Type

func (Mode) Type() protoreflect.EnumType

type Nested

type Nested struct {

	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	// Nested repeated nested messages
	OtherNestedList []*OtherNested `protobuf:"bytes,2,rep,name=OtherNestedList,proto3" json:"OtherNestedList,omitempty"`
	// Nested map repeated nested messages
	Map map[string]string `` /* 147-byte string literal not displayed */
	// MapObjectNested nested object map
	MapObjectNested map[string]*OtherNested `` /* 171-byte string literal not displayed */
	// contains filtered or unexported fields
}

Nested message definition

func (*Nested) Descriptor deprecated

func (*Nested) Descriptor() ([]byte, []int)

Deprecated: Use Nested.ProtoReflect.Descriptor instead.

func (*Nested) GetMap

func (x *Nested) GetMap() map[string]string

func (*Nested) GetMapObjectNested

func (x *Nested) GetMapObjectNested() map[string]*OtherNested

func (*Nested) GetOtherNestedList

func (x *Nested) GetOtherNestedList() []*OtherNested

func (*Nested) GetStr

func (x *Nested) GetStr() string

func (*Nested) ProtoMessage

func (*Nested) ProtoMessage()

func (*Nested) ProtoReflect

func (x *Nested) ProtoReflect() protoreflect.Message

func (*Nested) Reset

func (x *Nested) Reset()

func (*Nested) String

func (x *Nested) String() string

type OtherNested

type OtherNested struct {

	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	// contains filtered or unexported fields
}

OtherNested message nested into nested message

func (*OtherNested) Descriptor deprecated

func (*OtherNested) Descriptor() ([]byte, []int)

Deprecated: Use OtherNested.ProtoReflect.Descriptor instead.

func (*OtherNested) GetStr

func (x *OtherNested) GetStr() string

func (*OtherNested) ProtoMessage

func (*OtherNested) ProtoMessage()

func (*OtherNested) ProtoReflect

func (x *OtherNested) ProtoReflect() protoreflect.Message

func (*OtherNested) Reset

func (x *OtherNested) Reset()

func (*OtherNested) String

func (x *OtherNested) String() string

type Test

type Test struct {

	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	// Int32 int32 field
	Int32 int32 `protobuf:"varint,2,opt,name=Int32,proto3" json:"Int32,omitempty"`
	// Int64 int64 field
	Int64 int64 `protobuf:"varint,3,opt,name=Int64,proto3" json:"Int64,omitempty"`
	// Float float field
	Float float32 `protobuf:"fixed32,4,opt,name=Float,proto3" json:"Float,omitempty"`
	// Double double field
	Double float64 `protobuf:"fixed64,5,opt,name=Double,proto3" json:"Double,omitempty"`
	// Bool bool field
	Bool bool `protobuf:"varint,6,opt,name=Bool,proto3" json:"Bool,omitempty"`
	// Bytes byte[] field
	Bytes []byte `protobuf:"bytes,7,opt,name=Bytes,proto3" json:"Bytes,omitempty"`
	// StringList []string field
	StringList []string `protobuf:"bytes,16,rep,name=StringList,proto3" json:"StringList,omitempty"`
	// Nested nested message field, non-nullable
	Nested *Nested `protobuf:"bytes,22,opt,name=Nested,proto3" json:"Nested,omitempty"`
	// NestedList nested message array
	NestedList []*Nested `protobuf:"bytes,25,rep,name=NestedList,proto3" json:"NestedList,omitempty"`
	// Map normal map
	Map map[string]string `` /* 148-byte string literal not displayed */
	// MapObject is the object map
	NestedMap map[string]*Nested `` /* 160-byte string literal not displayed */
	// Mode is the enum value
	Mode Mode `protobuf:"varint,31,opt,name=Mode,proto3,enum=test.Mode" json:"Mode,omitempty"`
	// Types that are assignable to OneOf:
	//
	//	*Test_Branch1
	//	*Test_Branch2
	//	*Test_Branch3
	OneOf isTest_OneOf `protobuf_oneof:"OneOf"`
	// Required string field
	Required string `protobuf:"bytes,38,opt,name=required,proto3" json:"required,omitempty"`
	// Structs are self referential so we need to avoid infinite recursion
	Struct *structpb.Struct `protobuf:"bytes,39,opt,name=Struct,proto3" json:"Struct,omitempty"`
	// contains filtered or unexported fields
}

Test message definition. +terraform-gen:config:test.terraform.yaml

func (*Test) Descriptor deprecated

func (*Test) Descriptor() ([]byte, []int)

Deprecated: Use Test.ProtoReflect.Descriptor instead.

func (*Test) GetBool

func (x *Test) GetBool() bool

func (*Test) GetBranch1

func (x *Test) GetBranch1() *Branch1

func (*Test) GetBranch2

func (x *Test) GetBranch2() *Branch2

func (*Test) GetBranch3

func (x *Test) GetBranch3() string

func (*Test) GetBytes

func (x *Test) GetBytes() []byte

func (*Test) GetDouble

func (x *Test) GetDouble() float64

func (*Test) GetFloat

func (x *Test) GetFloat() float32

func (*Test) GetInt32

func (x *Test) GetInt32() int32

func (*Test) GetInt64

func (x *Test) GetInt64() int64

func (*Test) GetMap

func (x *Test) GetMap() map[string]string

func (*Test) GetMode

func (x *Test) GetMode() Mode

func (*Test) GetNested

func (x *Test) GetNested() *Nested

func (*Test) GetNestedList

func (x *Test) GetNestedList() []*Nested

func (*Test) GetNestedMap

func (x *Test) GetNestedMap() map[string]*Nested

func (*Test) GetOneOf

func (m *Test) GetOneOf() isTest_OneOf

func (*Test) GetRequired

func (x *Test) GetRequired() string

func (*Test) GetStr

func (x *Test) GetStr() string

func (*Test) GetStringList

func (x *Test) GetStringList() []string

func (*Test) GetStruct

func (x *Test) GetStruct() *structpb.Struct

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) ProtoReflect

func (x *Test) ProtoReflect() protoreflect.Message

func (*Test) Reset

func (x *Test) Reset()

func (*Test) String

func (x *Test) String() string

type Test2

type Test2 struct {

	// Str string field
	Str string `protobuf:"bytes,1,opt,name=Str,proto3" json:"Str,omitempty"`
	// contains filtered or unexported fields
}

Validates that it can handle multiple files

func (*Test2) Descriptor deprecated

func (*Test2) Descriptor() ([]byte, []int)

Deprecated: Use Test2.ProtoReflect.Descriptor instead.

func (*Test2) GetStr

func (x *Test2) GetStr() string

func (*Test2) ProtoMessage

func (*Test2) ProtoMessage()

func (*Test2) ProtoReflect

func (x *Test2) ProtoReflect() protoreflect.Message

func (*Test2) Reset

func (x *Test2) Reset()

func (*Test2) String

func (x *Test2) String() string

type Test_Branch1

type Test_Branch1 struct {
	// Branch1 is the first oneOf branch
	Branch1 *Branch1 `protobuf:"bytes,33,opt,name=Branch1,proto3,oneof"`
}

type Test_Branch2

type Test_Branch2 struct {
	// Branch2 is the second oneOf branch
	Branch2 *Branch2 `protobuf:"bytes,34,opt,name=Branch2,proto3,oneof"`
}

type Test_Branch3

type Test_Branch3 struct {
	// Branch3 is the third branch which is simple string
	Branch3 string `protobuf:"bytes,35,opt,name=Branch3,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL