github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/plugins/shared/hclspec/hcl_spec.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: plugins/shared/hclspec/hcl_spec.proto
     3  
     4  package hclspec
     5  
     6  /*
     7  Spec allows exposing the specification for an HCL body, allowing for parsing and
     8  validation.
     9  
    10  Certain expressions within a specification may use the following functions.
    11  The documentation for each spec type above specifies where functions may
    12  be used.
    13  
    14  `abs(number)` returns the absolute (positive) value of the given number.
    15  `coalesce(vals...)` returns the first non-null value given.
    16  `concat(lists...)` concatenates together all of the given lists to produce a new list.
    17  `hasindex(val, idx)` returns true if the expression `val[idx]` could succeed.
    18  `int(number)` returns the integer portion of the given number, rounding towards zero.
    19  `jsondecode(str)` interprets the given string as JSON and returns the resulting data structure.
    20  `jsonencode(val)` returns a JSON-serialized version of the given value.
    21  `length(collection)` returns the number of elements in the given collection (list, set, map, object, or tuple).
    22  `lower(string)` returns the given string with all uppercase letters converted to lowercase.
    23  `max(numbers...)` returns the greatest of the given numbers.
    24  `min(numbers...)` returns the smallest of the given numbers.
    25  `reverse(string)` returns the given string with all of the characters in reverse order.
    26  `strlen(string)` returns the number of characters in the given string.
    27  `substr(string, offset, length)` returns the requested substring of the given string.
    28  `upper(string)` returns the given string with all lowercase letters converted to uppercase.
    29  
    30  ## Type Expressions
    31  
    32  Type expressions are used to describe the expected type of an attribute, as
    33  an additional validation constraint.
    34  
    35  A type expression uses primitive type names and compound type constructors.
    36  A type constructor builds a new type based on one or more type expression
    37  arguments.
    38  
    39  The following type names and type constructors are supported:
    40  
    41  `any` is a wildcard that accepts a value of any type. (In HCL terms, this
    42  is the _dynamic pseudo-type_.)
    43  `string` is a Unicode string.
    44  `number` is an arbitrary-precision floating point number.
    45  `bool` is a boolean value (`true` or `false`)
    46  `list(element_type)` constructs a list type with the given element type
    47  `set(element_type)` constructs a set type with the given element type
    48  `map(element_type)` constructs a map type with the given element type
    49  `object({name1 = element_type, name2 = element_type, ...})` constructs
    50  an object type with the given attribute types.
    51  `tuple([element_type, element_type, ...])` constructs a tuple type with
    52  the given element types. This can be used, for example, to require an
    53  array with a particular number of elements, or with elements of different
    54  types.
    55  
    56  `null` is a valid value of any type, and not a type itself.
    57  */
    58  
    59  import proto "github.com/golang/protobuf/proto"
    60  import fmt "fmt"
    61  import math "math"
    62  
    63  // Reference imports to suppress errors if they are not otherwise used.
    64  var _ = proto.Marshal
    65  var _ = fmt.Errorf
    66  var _ = math.Inf
    67  
    68  // This is a compile-time assertion to ensure that this generated file
    69  // is compatible with the proto package it is being compiled against.
    70  // A compilation error at this line likely means your copy of the
    71  // proto package needs to be updated.
    72  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    73  
    74  // Spec defines the available specification types.
    75  type Spec struct {
    76  	// Types that are valid to be assigned to Block:
    77  	//	*Spec_Object
    78  	//	*Spec_Array
    79  	//	*Spec_Attr
    80  	//	*Spec_BlockValue
    81  	//	*Spec_BlockAttrs
    82  	//	*Spec_BlockList
    83  	//	*Spec_BlockSet
    84  	//	*Spec_BlockMap
    85  	//	*Spec_Default
    86  	//	*Spec_Literal
    87  	Block                isSpec_Block `protobuf_oneof:"block"`
    88  	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
    89  	XXX_unrecognized     []byte       `json:"-"`
    90  	XXX_sizecache        int32        `json:"-"`
    91  }
    92  
    93  func (m *Spec) Reset()         { *m = Spec{} }
    94  func (m *Spec) String() string { return proto.CompactTextString(m) }
    95  func (*Spec) ProtoMessage()    {}
    96  func (*Spec) Descriptor() ([]byte, []int) {
    97  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{0}
    98  }
    99  func (m *Spec) XXX_Unmarshal(b []byte) error {
   100  	return xxx_messageInfo_Spec.Unmarshal(m, b)
   101  }
   102  func (m *Spec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   103  	return xxx_messageInfo_Spec.Marshal(b, m, deterministic)
   104  }
   105  func (dst *Spec) XXX_Merge(src proto.Message) {
   106  	xxx_messageInfo_Spec.Merge(dst, src)
   107  }
   108  func (m *Spec) XXX_Size() int {
   109  	return xxx_messageInfo_Spec.Size(m)
   110  }
   111  func (m *Spec) XXX_DiscardUnknown() {
   112  	xxx_messageInfo_Spec.DiscardUnknown(m)
   113  }
   114  
   115  var xxx_messageInfo_Spec proto.InternalMessageInfo
   116  
   117  type isSpec_Block interface {
   118  	isSpec_Block()
   119  }
   120  
   121  type Spec_Object struct {
   122  	Object *Object `protobuf:"bytes,1,opt,name=object,proto3,oneof"`
   123  }
   124  
   125  type Spec_Array struct {
   126  	Array *Array `protobuf:"bytes,2,opt,name=array,proto3,oneof"`
   127  }
   128  
   129  type Spec_Attr struct {
   130  	Attr *Attr `protobuf:"bytes,3,opt,name=Attr,proto3,oneof"`
   131  }
   132  
   133  type Spec_BlockValue struct {
   134  	BlockValue *Block `protobuf:"bytes,4,opt,name=block_value,json=blockValue,proto3,oneof"`
   135  }
   136  
   137  type Spec_BlockAttrs struct {
   138  	BlockAttrs *BlockAttrs `protobuf:"bytes,5,opt,name=block_attrs,json=blockAttrs,proto3,oneof"`
   139  }
   140  
   141  type Spec_BlockList struct {
   142  	BlockList *BlockList `protobuf:"bytes,6,opt,name=block_list,json=blockList,proto3,oneof"`
   143  }
   144  
   145  type Spec_BlockSet struct {
   146  	BlockSet *BlockSet `protobuf:"bytes,7,opt,name=block_set,json=blockSet,proto3,oneof"`
   147  }
   148  
   149  type Spec_BlockMap struct {
   150  	BlockMap *BlockMap `protobuf:"bytes,8,opt,name=block_map,json=blockMap,proto3,oneof"`
   151  }
   152  
   153  type Spec_Default struct {
   154  	Default *Default `protobuf:"bytes,9,opt,name=default,proto3,oneof"`
   155  }
   156  
   157  type Spec_Literal struct {
   158  	Literal *Literal `protobuf:"bytes,10,opt,name=literal,proto3,oneof"`
   159  }
   160  
   161  func (*Spec_Object) isSpec_Block() {}
   162  
   163  func (*Spec_Array) isSpec_Block() {}
   164  
   165  func (*Spec_Attr) isSpec_Block() {}
   166  
   167  func (*Spec_BlockValue) isSpec_Block() {}
   168  
   169  func (*Spec_BlockAttrs) isSpec_Block() {}
   170  
   171  func (*Spec_BlockList) isSpec_Block() {}
   172  
   173  func (*Spec_BlockSet) isSpec_Block() {}
   174  
   175  func (*Spec_BlockMap) isSpec_Block() {}
   176  
   177  func (*Spec_Default) isSpec_Block() {}
   178  
   179  func (*Spec_Literal) isSpec_Block() {}
   180  
   181  func (m *Spec) GetBlock() isSpec_Block {
   182  	if m != nil {
   183  		return m.Block
   184  	}
   185  	return nil
   186  }
   187  
   188  func (m *Spec) GetObject() *Object {
   189  	if x, ok := m.GetBlock().(*Spec_Object); ok {
   190  		return x.Object
   191  	}
   192  	return nil
   193  }
   194  
   195  func (m *Spec) GetArray() *Array {
   196  	if x, ok := m.GetBlock().(*Spec_Array); ok {
   197  		return x.Array
   198  	}
   199  	return nil
   200  }
   201  
   202  func (m *Spec) GetAttr() *Attr {
   203  	if x, ok := m.GetBlock().(*Spec_Attr); ok {
   204  		return x.Attr
   205  	}
   206  	return nil
   207  }
   208  
   209  func (m *Spec) GetBlockValue() *Block {
   210  	if x, ok := m.GetBlock().(*Spec_BlockValue); ok {
   211  		return x.BlockValue
   212  	}
   213  	return nil
   214  }
   215  
   216  func (m *Spec) GetBlockAttrs() *BlockAttrs {
   217  	if x, ok := m.GetBlock().(*Spec_BlockAttrs); ok {
   218  		return x.BlockAttrs
   219  	}
   220  	return nil
   221  }
   222  
   223  func (m *Spec) GetBlockList() *BlockList {
   224  	if x, ok := m.GetBlock().(*Spec_BlockList); ok {
   225  		return x.BlockList
   226  	}
   227  	return nil
   228  }
   229  
   230  func (m *Spec) GetBlockSet() *BlockSet {
   231  	if x, ok := m.GetBlock().(*Spec_BlockSet); ok {
   232  		return x.BlockSet
   233  	}
   234  	return nil
   235  }
   236  
   237  func (m *Spec) GetBlockMap() *BlockMap {
   238  	if x, ok := m.GetBlock().(*Spec_BlockMap); ok {
   239  		return x.BlockMap
   240  	}
   241  	return nil
   242  }
   243  
   244  func (m *Spec) GetDefault() *Default {
   245  	if x, ok := m.GetBlock().(*Spec_Default); ok {
   246  		return x.Default
   247  	}
   248  	return nil
   249  }
   250  
   251  func (m *Spec) GetLiteral() *Literal {
   252  	if x, ok := m.GetBlock().(*Spec_Literal); ok {
   253  		return x.Literal
   254  	}
   255  	return nil
   256  }
   257  
   258  // XXX_OneofFuncs is for the internal use of the proto package.
   259  func (*Spec) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
   260  	return _Spec_OneofMarshaler, _Spec_OneofUnmarshaler, _Spec_OneofSizer, []interface{}{
   261  		(*Spec_Object)(nil),
   262  		(*Spec_Array)(nil),
   263  		(*Spec_Attr)(nil),
   264  		(*Spec_BlockValue)(nil),
   265  		(*Spec_BlockAttrs)(nil),
   266  		(*Spec_BlockList)(nil),
   267  		(*Spec_BlockSet)(nil),
   268  		(*Spec_BlockMap)(nil),
   269  		(*Spec_Default)(nil),
   270  		(*Spec_Literal)(nil),
   271  	}
   272  }
   273  
   274  func _Spec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
   275  	m := msg.(*Spec)
   276  	// block
   277  	switch x := m.Block.(type) {
   278  	case *Spec_Object:
   279  		b.EncodeVarint(1<<3 | proto.WireBytes)
   280  		if err := b.EncodeMessage(x.Object); err != nil {
   281  			return err
   282  		}
   283  	case *Spec_Array:
   284  		b.EncodeVarint(2<<3 | proto.WireBytes)
   285  		if err := b.EncodeMessage(x.Array); err != nil {
   286  			return err
   287  		}
   288  	case *Spec_Attr:
   289  		b.EncodeVarint(3<<3 | proto.WireBytes)
   290  		if err := b.EncodeMessage(x.Attr); err != nil {
   291  			return err
   292  		}
   293  	case *Spec_BlockValue:
   294  		b.EncodeVarint(4<<3 | proto.WireBytes)
   295  		if err := b.EncodeMessage(x.BlockValue); err != nil {
   296  			return err
   297  		}
   298  	case *Spec_BlockAttrs:
   299  		b.EncodeVarint(5<<3 | proto.WireBytes)
   300  		if err := b.EncodeMessage(x.BlockAttrs); err != nil {
   301  			return err
   302  		}
   303  	case *Spec_BlockList:
   304  		b.EncodeVarint(6<<3 | proto.WireBytes)
   305  		if err := b.EncodeMessage(x.BlockList); err != nil {
   306  			return err
   307  		}
   308  	case *Spec_BlockSet:
   309  		b.EncodeVarint(7<<3 | proto.WireBytes)
   310  		if err := b.EncodeMessage(x.BlockSet); err != nil {
   311  			return err
   312  		}
   313  	case *Spec_BlockMap:
   314  		b.EncodeVarint(8<<3 | proto.WireBytes)
   315  		if err := b.EncodeMessage(x.BlockMap); err != nil {
   316  			return err
   317  		}
   318  	case *Spec_Default:
   319  		b.EncodeVarint(9<<3 | proto.WireBytes)
   320  		if err := b.EncodeMessage(x.Default); err != nil {
   321  			return err
   322  		}
   323  	case *Spec_Literal:
   324  		b.EncodeVarint(10<<3 | proto.WireBytes)
   325  		if err := b.EncodeMessage(x.Literal); err != nil {
   326  			return err
   327  		}
   328  	case nil:
   329  	default:
   330  		return fmt.Errorf("Spec.Block has unexpected type %T", x)
   331  	}
   332  	return nil
   333  }
   334  
   335  func _Spec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
   336  	m := msg.(*Spec)
   337  	switch tag {
   338  	case 1: // block.object
   339  		if wire != proto.WireBytes {
   340  			return true, proto.ErrInternalBadWireType
   341  		}
   342  		msg := new(Object)
   343  		err := b.DecodeMessage(msg)
   344  		m.Block = &Spec_Object{msg}
   345  		return true, err
   346  	case 2: // block.array
   347  		if wire != proto.WireBytes {
   348  			return true, proto.ErrInternalBadWireType
   349  		}
   350  		msg := new(Array)
   351  		err := b.DecodeMessage(msg)
   352  		m.Block = &Spec_Array{msg}
   353  		return true, err
   354  	case 3: // block.Attr
   355  		if wire != proto.WireBytes {
   356  			return true, proto.ErrInternalBadWireType
   357  		}
   358  		msg := new(Attr)
   359  		err := b.DecodeMessage(msg)
   360  		m.Block = &Spec_Attr{msg}
   361  		return true, err
   362  	case 4: // block.block_value
   363  		if wire != proto.WireBytes {
   364  			return true, proto.ErrInternalBadWireType
   365  		}
   366  		msg := new(Block)
   367  		err := b.DecodeMessage(msg)
   368  		m.Block = &Spec_BlockValue{msg}
   369  		return true, err
   370  	case 5: // block.block_attrs
   371  		if wire != proto.WireBytes {
   372  			return true, proto.ErrInternalBadWireType
   373  		}
   374  		msg := new(BlockAttrs)
   375  		err := b.DecodeMessage(msg)
   376  		m.Block = &Spec_BlockAttrs{msg}
   377  		return true, err
   378  	case 6: // block.block_list
   379  		if wire != proto.WireBytes {
   380  			return true, proto.ErrInternalBadWireType
   381  		}
   382  		msg := new(BlockList)
   383  		err := b.DecodeMessage(msg)
   384  		m.Block = &Spec_BlockList{msg}
   385  		return true, err
   386  	case 7: // block.block_set
   387  		if wire != proto.WireBytes {
   388  			return true, proto.ErrInternalBadWireType
   389  		}
   390  		msg := new(BlockSet)
   391  		err := b.DecodeMessage(msg)
   392  		m.Block = &Spec_BlockSet{msg}
   393  		return true, err
   394  	case 8: // block.block_map
   395  		if wire != proto.WireBytes {
   396  			return true, proto.ErrInternalBadWireType
   397  		}
   398  		msg := new(BlockMap)
   399  		err := b.DecodeMessage(msg)
   400  		m.Block = &Spec_BlockMap{msg}
   401  		return true, err
   402  	case 9: // block.default
   403  		if wire != proto.WireBytes {
   404  			return true, proto.ErrInternalBadWireType
   405  		}
   406  		msg := new(Default)
   407  		err := b.DecodeMessage(msg)
   408  		m.Block = &Spec_Default{msg}
   409  		return true, err
   410  	case 10: // block.literal
   411  		if wire != proto.WireBytes {
   412  			return true, proto.ErrInternalBadWireType
   413  		}
   414  		msg := new(Literal)
   415  		err := b.DecodeMessage(msg)
   416  		m.Block = &Spec_Literal{msg}
   417  		return true, err
   418  	default:
   419  		return false, nil
   420  	}
   421  }
   422  
   423  func _Spec_OneofSizer(msg proto.Message) (n int) {
   424  	m := msg.(*Spec)
   425  	// block
   426  	switch x := m.Block.(type) {
   427  	case *Spec_Object:
   428  		s := proto.Size(x.Object)
   429  		n += 1 // tag and wire
   430  		n += proto.SizeVarint(uint64(s))
   431  		n += s
   432  	case *Spec_Array:
   433  		s := proto.Size(x.Array)
   434  		n += 1 // tag and wire
   435  		n += proto.SizeVarint(uint64(s))
   436  		n += s
   437  	case *Spec_Attr:
   438  		s := proto.Size(x.Attr)
   439  		n += 1 // tag and wire
   440  		n += proto.SizeVarint(uint64(s))
   441  		n += s
   442  	case *Spec_BlockValue:
   443  		s := proto.Size(x.BlockValue)
   444  		n += 1 // tag and wire
   445  		n += proto.SizeVarint(uint64(s))
   446  		n += s
   447  	case *Spec_BlockAttrs:
   448  		s := proto.Size(x.BlockAttrs)
   449  		n += 1 // tag and wire
   450  		n += proto.SizeVarint(uint64(s))
   451  		n += s
   452  	case *Spec_BlockList:
   453  		s := proto.Size(x.BlockList)
   454  		n += 1 // tag and wire
   455  		n += proto.SizeVarint(uint64(s))
   456  		n += s
   457  	case *Spec_BlockSet:
   458  		s := proto.Size(x.BlockSet)
   459  		n += 1 // tag and wire
   460  		n += proto.SizeVarint(uint64(s))
   461  		n += s
   462  	case *Spec_BlockMap:
   463  		s := proto.Size(x.BlockMap)
   464  		n += 1 // tag and wire
   465  		n += proto.SizeVarint(uint64(s))
   466  		n += s
   467  	case *Spec_Default:
   468  		s := proto.Size(x.Default)
   469  		n += 1 // tag and wire
   470  		n += proto.SizeVarint(uint64(s))
   471  		n += s
   472  	case *Spec_Literal:
   473  		s := proto.Size(x.Literal)
   474  		n += 1 // tag and wire
   475  		n += proto.SizeVarint(uint64(s))
   476  		n += s
   477  	case nil:
   478  	default:
   479  		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
   480  	}
   481  	return n
   482  }
   483  
   484  // Attr spec type reads the value of an attribute in the current body
   485  // and returns that value as its result. It also creates validation constraints
   486  // for the given attribute name and its value.
   487  //
   488  // ```hcl
   489  // Attr {
   490  // name     = "document_root"
   491  // type     = string
   492  // required = true
   493  // }
   494  // ```
   495  //
   496  // `Attr` spec blocks accept the following arguments:
   497  //
   498  // `name` (required) - The attribute name to expect within the HCL input file.
   499  // This may be omitted when a default name selector is created by a parent
   500  // `Object` spec, if the input attribute name should match the output JSON
   501  // object property name.
   502  //
   503  // `type` (optional) - A [type expression](#type-expressions) that the given
   504  // attribute value must conform to. If this argument is set, `hcldec` will
   505  // automatically convert the given input value to this type or produce an
   506  // error if that is not possible.
   507  //
   508  // `required` (optional) - If set to `true`, `hcldec` will produce an error
   509  // if a value is not provided for the source attribute.
   510  //
   511  // `Attr` is a leaf spec type, so no nested spec blocks are permitted.
   512  type Attr struct {
   513  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   514  	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
   515  	Required             bool     `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
   516  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   517  	XXX_unrecognized     []byte   `json:"-"`
   518  	XXX_sizecache        int32    `json:"-"`
   519  }
   520  
   521  func (m *Attr) Reset()         { *m = Attr{} }
   522  func (m *Attr) String() string { return proto.CompactTextString(m) }
   523  func (*Attr) ProtoMessage()    {}
   524  func (*Attr) Descriptor() ([]byte, []int) {
   525  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{1}
   526  }
   527  func (m *Attr) XXX_Unmarshal(b []byte) error {
   528  	return xxx_messageInfo_Attr.Unmarshal(m, b)
   529  }
   530  func (m *Attr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   531  	return xxx_messageInfo_Attr.Marshal(b, m, deterministic)
   532  }
   533  func (dst *Attr) XXX_Merge(src proto.Message) {
   534  	xxx_messageInfo_Attr.Merge(dst, src)
   535  }
   536  func (m *Attr) XXX_Size() int {
   537  	return xxx_messageInfo_Attr.Size(m)
   538  }
   539  func (m *Attr) XXX_DiscardUnknown() {
   540  	xxx_messageInfo_Attr.DiscardUnknown(m)
   541  }
   542  
   543  var xxx_messageInfo_Attr proto.InternalMessageInfo
   544  
   545  func (m *Attr) GetName() string {
   546  	if m != nil {
   547  		return m.Name
   548  	}
   549  	return ""
   550  }
   551  
   552  func (m *Attr) GetType() string {
   553  	if m != nil {
   554  		return m.Type
   555  	}
   556  	return ""
   557  }
   558  
   559  func (m *Attr) GetRequired() bool {
   560  	if m != nil {
   561  		return m.Required
   562  	}
   563  	return false
   564  }
   565  
   566  // Block spec type applies one nested spec block to the contents of a
   567  // block within the current body and returns the result of that spec. It also
   568  // creates validation constraints for the given block type name.
   569  //
   570  // ```hcl
   571  // Block {
   572  // name = "logging"
   573  //
   574  // Object {
   575  // Attr "level" {
   576  // type = string
   577  // }
   578  // Attr "file" {
   579  // type = string
   580  // }
   581  // }
   582  // }
   583  // ```
   584  //
   585  // `Block` spec blocks accept the following arguments:
   586  //
   587  // `name` (required) - The block type name to expect within the HCL
   588  // input file. This may be omitted when a default name selector is created
   589  // by a parent `Object` spec, if the input block type name should match the
   590  // output JSON object property name.
   591  //
   592  // `required` (optional) - If set to `true`, `hcldec` will produce an error
   593  // if a block of the specified type is not present in the current body.
   594  //
   595  // `Block` creates a validation constraint that there must be zero or one blocks
   596  // of the given type name, or exactly one if `required` is set.
   597  //
   598  // `Block` expects a single nested spec block, which is applied to the body of
   599  // the block of the given type when it is present.
   600  //
   601  type Block struct {
   602  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   603  	Required             bool     `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
   604  	Nested               *Spec    `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"`
   605  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   606  	XXX_unrecognized     []byte   `json:"-"`
   607  	XXX_sizecache        int32    `json:"-"`
   608  }
   609  
   610  func (m *Block) Reset()         { *m = Block{} }
   611  func (m *Block) String() string { return proto.CompactTextString(m) }
   612  func (*Block) ProtoMessage()    {}
   613  func (*Block) Descriptor() ([]byte, []int) {
   614  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{2}
   615  }
   616  func (m *Block) XXX_Unmarshal(b []byte) error {
   617  	return xxx_messageInfo_Block.Unmarshal(m, b)
   618  }
   619  func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   620  	return xxx_messageInfo_Block.Marshal(b, m, deterministic)
   621  }
   622  func (dst *Block) XXX_Merge(src proto.Message) {
   623  	xxx_messageInfo_Block.Merge(dst, src)
   624  }
   625  func (m *Block) XXX_Size() int {
   626  	return xxx_messageInfo_Block.Size(m)
   627  }
   628  func (m *Block) XXX_DiscardUnknown() {
   629  	xxx_messageInfo_Block.DiscardUnknown(m)
   630  }
   631  
   632  var xxx_messageInfo_Block proto.InternalMessageInfo
   633  
   634  func (m *Block) GetName() string {
   635  	if m != nil {
   636  		return m.Name
   637  	}
   638  	return ""
   639  }
   640  
   641  func (m *Block) GetRequired() bool {
   642  	if m != nil {
   643  		return m.Required
   644  	}
   645  	return false
   646  }
   647  
   648  func (m *Block) GetNested() *Spec {
   649  	if m != nil {
   650  		return m.Nested
   651  	}
   652  	return nil
   653  }
   654  
   655  //
   656  // The BlockAttrs spec type is similar to an Attr spec block of a map type,
   657  // but it produces a map from the attributes of a block rather than from an
   658  // attribute's expression.
   659  //
   660  // ```hcl
   661  // BlockAttrs {
   662  // name     = "variables"
   663  // type     = string
   664  // required = false
   665  // }
   666  // ```
   667  //
   668  // This allows a map with user-defined keys to be produced within block syntax,
   669  // but due to the constraints of that syntax it also means that the user will
   670  // be unable to dynamically-generate either individual key names using key
   671  // expressions or the entire map value using a `for` expression.
   672  //
   673  // `BlockAttrs` spec blocks accept the following arguments:
   674  //
   675  // `name` (required) - The block type name to expect within the HCL
   676  // input file. This may be omitted when a default name selector is created
   677  // by a parent `object` spec, if the input block type name should match the
   678  // output JSON object property name.
   679  //
   680  // `type` (required) - The value type to require for each of the
   681  // attributes within a matched block. The resulting value will be a JSON
   682  // object whose property values are of this type.
   683  //
   684  // `required` (optional) - If `true`, an error will be produced if a block
   685  // of the given type is not present. If `false` -- the default -- an absent
   686  // block will be indicated by producing `null`.
   687  type BlockAttrs struct {
   688  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   689  	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
   690  	Required             bool     `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
   691  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   692  	XXX_unrecognized     []byte   `json:"-"`
   693  	XXX_sizecache        int32    `json:"-"`
   694  }
   695  
   696  func (m *BlockAttrs) Reset()         { *m = BlockAttrs{} }
   697  func (m *BlockAttrs) String() string { return proto.CompactTextString(m) }
   698  func (*BlockAttrs) ProtoMessage()    {}
   699  func (*BlockAttrs) Descriptor() ([]byte, []int) {
   700  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{3}
   701  }
   702  func (m *BlockAttrs) XXX_Unmarshal(b []byte) error {
   703  	return xxx_messageInfo_BlockAttrs.Unmarshal(m, b)
   704  }
   705  func (m *BlockAttrs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   706  	return xxx_messageInfo_BlockAttrs.Marshal(b, m, deterministic)
   707  }
   708  func (dst *BlockAttrs) XXX_Merge(src proto.Message) {
   709  	xxx_messageInfo_BlockAttrs.Merge(dst, src)
   710  }
   711  func (m *BlockAttrs) XXX_Size() int {
   712  	return xxx_messageInfo_BlockAttrs.Size(m)
   713  }
   714  func (m *BlockAttrs) XXX_DiscardUnknown() {
   715  	xxx_messageInfo_BlockAttrs.DiscardUnknown(m)
   716  }
   717  
   718  var xxx_messageInfo_BlockAttrs proto.InternalMessageInfo
   719  
   720  func (m *BlockAttrs) GetName() string {
   721  	if m != nil {
   722  		return m.Name
   723  	}
   724  	return ""
   725  }
   726  
   727  func (m *BlockAttrs) GetType() string {
   728  	if m != nil {
   729  		return m.Type
   730  	}
   731  	return ""
   732  }
   733  
   734  func (m *BlockAttrs) GetRequired() bool {
   735  	if m != nil {
   736  		return m.Required
   737  	}
   738  	return false
   739  }
   740  
   741  // BlockList spec type is similar to `Block`, but it accepts zero or
   742  // more blocks of a specified type rather than requiring zero or one. The
   743  // result is a JSON array with one entry per block of the given type.
   744  //
   745  // ```hcl
   746  // BlockList {
   747  // name = "log_file"
   748  //
   749  // Object {
   750  // Attr "level" {
   751  // type = string
   752  // }
   753  // Attr "filename" {
   754  // type     = string
   755  // required = true
   756  // }
   757  // }
   758  // }
   759  // ```
   760  //
   761  // `BlockList` spec blocks accept the following arguments:
   762  //
   763  // `name` (required) - The block type name to expect within the HCL
   764  // input file. This may be omitted when a default name selector is created
   765  // by a parent `Object` spec, if the input block type name should match the
   766  // output JSON object property name.
   767  //
   768  // `min_items` (optional) - If set to a number greater than zero, `hcldec` will
   769  // produce an error if fewer than the given number of blocks are present.
   770  //
   771  // `max_items` (optional) - If set to a number greater than zero, `hcldec` will
   772  // produce an error if more than the given number of blocks are present. This
   773  // attribute must be greater than or equal to `min_items` if both are set.
   774  //
   775  // `Block` creates a validation constraint on the number of blocks of the given
   776  // type that must be present.
   777  //
   778  // `Block` expects a single nested spec block, which is applied to the body of
   779  // each matching block to produce the resulting list items.
   780  //
   781  type BlockList struct {
   782  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   783  	MinItems             uint64   `protobuf:"varint,2,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
   784  	MaxItems             uint64   `protobuf:"varint,3,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
   785  	Nested               *Spec    `protobuf:"bytes,4,opt,name=nested,proto3" json:"nested,omitempty"`
   786  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   787  	XXX_unrecognized     []byte   `json:"-"`
   788  	XXX_sizecache        int32    `json:"-"`
   789  }
   790  
   791  func (m *BlockList) Reset()         { *m = BlockList{} }
   792  func (m *BlockList) String() string { return proto.CompactTextString(m) }
   793  func (*BlockList) ProtoMessage()    {}
   794  func (*BlockList) Descriptor() ([]byte, []int) {
   795  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{4}
   796  }
   797  func (m *BlockList) XXX_Unmarshal(b []byte) error {
   798  	return xxx_messageInfo_BlockList.Unmarshal(m, b)
   799  }
   800  func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   801  	return xxx_messageInfo_BlockList.Marshal(b, m, deterministic)
   802  }
   803  func (dst *BlockList) XXX_Merge(src proto.Message) {
   804  	xxx_messageInfo_BlockList.Merge(dst, src)
   805  }
   806  func (m *BlockList) XXX_Size() int {
   807  	return xxx_messageInfo_BlockList.Size(m)
   808  }
   809  func (m *BlockList) XXX_DiscardUnknown() {
   810  	xxx_messageInfo_BlockList.DiscardUnknown(m)
   811  }
   812  
   813  var xxx_messageInfo_BlockList proto.InternalMessageInfo
   814  
   815  func (m *BlockList) GetName() string {
   816  	if m != nil {
   817  		return m.Name
   818  	}
   819  	return ""
   820  }
   821  
   822  func (m *BlockList) GetMinItems() uint64 {
   823  	if m != nil {
   824  		return m.MinItems
   825  	}
   826  	return 0
   827  }
   828  
   829  func (m *BlockList) GetMaxItems() uint64 {
   830  	if m != nil {
   831  		return m.MaxItems
   832  	}
   833  	return 0
   834  }
   835  
   836  func (m *BlockList) GetNested() *Spec {
   837  	if m != nil {
   838  		return m.Nested
   839  	}
   840  	return nil
   841  }
   842  
   843  // BlockSet spec type behaves the same as BlockList except that
   844  // the result is in no specific order and any duplicate items are removed.
   845  //
   846  // ```hcl
   847  // BlockSet {
   848  // name = "log_file"
   849  //
   850  // Object {
   851  // Attr "level" {
   852  // type = string
   853  // }
   854  // Attr "filename" {
   855  // type     = string
   856  // required = true
   857  // }
   858  // }
   859  // }
   860  // ```
   861  //
   862  // The contents of `BlockSet` are the same as for `BlockList`.
   863  //
   864  type BlockSet struct {
   865  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   866  	MinItems             uint64   `protobuf:"varint,2,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
   867  	MaxItems             uint64   `protobuf:"varint,3,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
   868  	Nested               *Spec    `protobuf:"bytes,4,opt,name=nested,proto3" json:"nested,omitempty"`
   869  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   870  	XXX_unrecognized     []byte   `json:"-"`
   871  	XXX_sizecache        int32    `json:"-"`
   872  }
   873  
   874  func (m *BlockSet) Reset()         { *m = BlockSet{} }
   875  func (m *BlockSet) String() string { return proto.CompactTextString(m) }
   876  func (*BlockSet) ProtoMessage()    {}
   877  func (*BlockSet) Descriptor() ([]byte, []int) {
   878  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{5}
   879  }
   880  func (m *BlockSet) XXX_Unmarshal(b []byte) error {
   881  	return xxx_messageInfo_BlockSet.Unmarshal(m, b)
   882  }
   883  func (m *BlockSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   884  	return xxx_messageInfo_BlockSet.Marshal(b, m, deterministic)
   885  }
   886  func (dst *BlockSet) XXX_Merge(src proto.Message) {
   887  	xxx_messageInfo_BlockSet.Merge(dst, src)
   888  }
   889  func (m *BlockSet) XXX_Size() int {
   890  	return xxx_messageInfo_BlockSet.Size(m)
   891  }
   892  func (m *BlockSet) XXX_DiscardUnknown() {
   893  	xxx_messageInfo_BlockSet.DiscardUnknown(m)
   894  }
   895  
   896  var xxx_messageInfo_BlockSet proto.InternalMessageInfo
   897  
   898  func (m *BlockSet) GetName() string {
   899  	if m != nil {
   900  		return m.Name
   901  	}
   902  	return ""
   903  }
   904  
   905  func (m *BlockSet) GetMinItems() uint64 {
   906  	if m != nil {
   907  		return m.MinItems
   908  	}
   909  	return 0
   910  }
   911  
   912  func (m *BlockSet) GetMaxItems() uint64 {
   913  	if m != nil {
   914  		return m.MaxItems
   915  	}
   916  	return 0
   917  }
   918  
   919  func (m *BlockSet) GetNested() *Spec {
   920  	if m != nil {
   921  		return m.Nested
   922  	}
   923  	return nil
   924  }
   925  
   926  // BlockMap spec type is similar to `Block`, but it accepts zero or
   927  // more blocks of a specified type rather than requiring zero or one. The
   928  // result is a JSON object, or possibly multiple nested JSON objects, whose
   929  // properties are derived from the labels set on each matching block.
   930  //
   931  // ```hcl
   932  // BlockMap {
   933  // name = "log_file"
   934  // labels = ["filename"]
   935  //
   936  // Object {
   937  // Attr "level" {
   938  // type     = string
   939  // required = true
   940  // }
   941  // }
   942  // }
   943  // ```
   944  //
   945  // `BlockMap` spec blocks accept the following arguments:
   946  //
   947  // `name` (required) - The block type name to expect within the HCL
   948  // input file. This may be omitted when a default name selector is created
   949  // by a parent `Object` spec, if the input block type name should match the
   950  // output JSON object property name.
   951  //
   952  // `labels` (required) - A list of user-oriented block label names. Each entry
   953  // in this list creates one level of object within the output value, and
   954  // requires one additional block header label on any child block of this type.
   955  // Block header labels are the quoted strings that appear after the block type
   956  // name but before the opening `{`.
   957  //
   958  // `Block` creates a validation constraint on the number of labels that blocks
   959  // of the given type must have.
   960  //
   961  // `Block` expects a single nested spec block, which is applied to the body of
   962  // each matching block to produce the resulting map items.
   963  //
   964  type BlockMap struct {
   965  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   966  	Labels               []string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"`
   967  	Nested               *Spec    `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"`
   968  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   969  	XXX_unrecognized     []byte   `json:"-"`
   970  	XXX_sizecache        int32    `json:"-"`
   971  }
   972  
   973  func (m *BlockMap) Reset()         { *m = BlockMap{} }
   974  func (m *BlockMap) String() string { return proto.CompactTextString(m) }
   975  func (*BlockMap) ProtoMessage()    {}
   976  func (*BlockMap) Descriptor() ([]byte, []int) {
   977  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{6}
   978  }
   979  func (m *BlockMap) XXX_Unmarshal(b []byte) error {
   980  	return xxx_messageInfo_BlockMap.Unmarshal(m, b)
   981  }
   982  func (m *BlockMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   983  	return xxx_messageInfo_BlockMap.Marshal(b, m, deterministic)
   984  }
   985  func (dst *BlockMap) XXX_Merge(src proto.Message) {
   986  	xxx_messageInfo_BlockMap.Merge(dst, src)
   987  }
   988  func (m *BlockMap) XXX_Size() int {
   989  	return xxx_messageInfo_BlockMap.Size(m)
   990  }
   991  func (m *BlockMap) XXX_DiscardUnknown() {
   992  	xxx_messageInfo_BlockMap.DiscardUnknown(m)
   993  }
   994  
   995  var xxx_messageInfo_BlockMap proto.InternalMessageInfo
   996  
   997  func (m *BlockMap) GetName() string {
   998  	if m != nil {
   999  		return m.Name
  1000  	}
  1001  	return ""
  1002  }
  1003  
  1004  func (m *BlockMap) GetLabels() []string {
  1005  	if m != nil {
  1006  		return m.Labels
  1007  	}
  1008  	return nil
  1009  }
  1010  
  1011  func (m *BlockMap) GetNested() *Spec {
  1012  	if m != nil {
  1013  		return m.Nested
  1014  	}
  1015  	return nil
  1016  }
  1017  
  1018  // Literal spec type returns a given literal value, and creates no
  1019  // validation constraints. It is most commonly used with the `Default` spec
  1020  // type to create a fallback value, but can also be used e.g. to fill out
  1021  // required properties in an `Object` spec that do not correspond to any
  1022  // construct in the input configuration.
  1023  //
  1024  // ```hcl
  1025  // Literal {
  1026  // value = "hello world"
  1027  // }
  1028  // ```
  1029  //
  1030  // `Literal` spec blocks accept the following argument:
  1031  //
  1032  // `value` (required) - The value to return. This attribute may be an expression
  1033  // that uses [functions](#spec-definition-functions).
  1034  //
  1035  // `Literal` is a leaf spec type, so no nested spec blocks are permitted.
  1036  type Literal struct {
  1037  	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
  1038  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1039  	XXX_unrecognized     []byte   `json:"-"`
  1040  	XXX_sizecache        int32    `json:"-"`
  1041  }
  1042  
  1043  func (m *Literal) Reset()         { *m = Literal{} }
  1044  func (m *Literal) String() string { return proto.CompactTextString(m) }
  1045  func (*Literal) ProtoMessage()    {}
  1046  func (*Literal) Descriptor() ([]byte, []int) {
  1047  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{7}
  1048  }
  1049  func (m *Literal) XXX_Unmarshal(b []byte) error {
  1050  	return xxx_messageInfo_Literal.Unmarshal(m, b)
  1051  }
  1052  func (m *Literal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1053  	return xxx_messageInfo_Literal.Marshal(b, m, deterministic)
  1054  }
  1055  func (dst *Literal) XXX_Merge(src proto.Message) {
  1056  	xxx_messageInfo_Literal.Merge(dst, src)
  1057  }
  1058  func (m *Literal) XXX_Size() int {
  1059  	return xxx_messageInfo_Literal.Size(m)
  1060  }
  1061  func (m *Literal) XXX_DiscardUnknown() {
  1062  	xxx_messageInfo_Literal.DiscardUnknown(m)
  1063  }
  1064  
  1065  var xxx_messageInfo_Literal proto.InternalMessageInfo
  1066  
  1067  func (m *Literal) GetValue() string {
  1068  	if m != nil {
  1069  		return m.Value
  1070  	}
  1071  	return ""
  1072  }
  1073  
  1074  // Default spec type evaluates a sequence of nested specs in turn and
  1075  // returns the result of the first one that produces a non-null value.
  1076  // It creates no validation constraints of its own, but passes on the validation
  1077  // constraints from its first nested block.
  1078  //
  1079  // ```hcl
  1080  // Default {
  1081  // Attr {
  1082  // name = "private"
  1083  // type = bool
  1084  // }
  1085  // Literal {
  1086  // value = false
  1087  // }
  1088  // }
  1089  // ```
  1090  //
  1091  // A `Default` spec block must have at least one nested spec block, and should
  1092  // generally have at least two since otherwise the `Default` wrapper is a no-op.
  1093  //
  1094  // The second and any subsequent spec blocks are _fallback_ specs. These exhibit
  1095  // their usual behavior but are not able to impose validation constraints on the
  1096  // current body since they are not evaluated unless all prior specs produce
  1097  // `null` as their result.
  1098  //
  1099  type Default struct {
  1100  	Primary              *Spec    `protobuf:"bytes,1,opt,name=primary,proto3" json:"primary,omitempty"`
  1101  	Default              *Spec    `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
  1102  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1103  	XXX_unrecognized     []byte   `json:"-"`
  1104  	XXX_sizecache        int32    `json:"-"`
  1105  }
  1106  
  1107  func (m *Default) Reset()         { *m = Default{} }
  1108  func (m *Default) String() string { return proto.CompactTextString(m) }
  1109  func (*Default) ProtoMessage()    {}
  1110  func (*Default) Descriptor() ([]byte, []int) {
  1111  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{8}
  1112  }
  1113  func (m *Default) XXX_Unmarshal(b []byte) error {
  1114  	return xxx_messageInfo_Default.Unmarshal(m, b)
  1115  }
  1116  func (m *Default) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1117  	return xxx_messageInfo_Default.Marshal(b, m, deterministic)
  1118  }
  1119  func (dst *Default) XXX_Merge(src proto.Message) {
  1120  	xxx_messageInfo_Default.Merge(dst, src)
  1121  }
  1122  func (m *Default) XXX_Size() int {
  1123  	return xxx_messageInfo_Default.Size(m)
  1124  }
  1125  func (m *Default) XXX_DiscardUnknown() {
  1126  	xxx_messageInfo_Default.DiscardUnknown(m)
  1127  }
  1128  
  1129  var xxx_messageInfo_Default proto.InternalMessageInfo
  1130  
  1131  func (m *Default) GetPrimary() *Spec {
  1132  	if m != nil {
  1133  		return m.Primary
  1134  	}
  1135  	return nil
  1136  }
  1137  
  1138  func (m *Default) GetDefault() *Spec {
  1139  	if m != nil {
  1140  		return m.Default
  1141  	}
  1142  	return nil
  1143  }
  1144  
  1145  // Object spec type is the most commonly used at the root of a spec file.
  1146  // Its result is a JSON object whose properties are set based on any nested
  1147  // spec blocks:
  1148  //
  1149  // ```hcl
  1150  // Object {
  1151  // Attr "name" {
  1152  // type = "string"
  1153  // }
  1154  // Block "address" {
  1155  // Object {
  1156  // Attr "street" {
  1157  // type = "string"
  1158  // }
  1159  // # ...
  1160  // }
  1161  // }
  1162  // }
  1163  // ```
  1164  //
  1165  // Nested spec blocks inside `Object` must always have an extra block label
  1166  // `"name"`, `"address"` and `"street"` in the above example) that specifies
  1167  // the name of the property that should be created in the JSON object result.
  1168  // This label also acts as a default name selector for the nested spec, allowing
  1169  // the `Attr` blocks in the above example to omit the usually-required `name`
  1170  // argument in cases where the HCL input name and JSON output name are the same.
  1171  //
  1172  // An `Object` spec block creates no validation constraints, but it passes on
  1173  // any validation constraints created by the nested specs.
  1174  type Object struct {
  1175  	Attributes           map[string]*Spec `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  1176  	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
  1177  	XXX_unrecognized     []byte           `json:"-"`
  1178  	XXX_sizecache        int32            `json:"-"`
  1179  }
  1180  
  1181  func (m *Object) Reset()         { *m = Object{} }
  1182  func (m *Object) String() string { return proto.CompactTextString(m) }
  1183  func (*Object) ProtoMessage()    {}
  1184  func (*Object) Descriptor() ([]byte, []int) {
  1185  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{9}
  1186  }
  1187  func (m *Object) XXX_Unmarshal(b []byte) error {
  1188  	return xxx_messageInfo_Object.Unmarshal(m, b)
  1189  }
  1190  func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1191  	return xxx_messageInfo_Object.Marshal(b, m, deterministic)
  1192  }
  1193  func (dst *Object) XXX_Merge(src proto.Message) {
  1194  	xxx_messageInfo_Object.Merge(dst, src)
  1195  }
  1196  func (m *Object) XXX_Size() int {
  1197  	return xxx_messageInfo_Object.Size(m)
  1198  }
  1199  func (m *Object) XXX_DiscardUnknown() {
  1200  	xxx_messageInfo_Object.DiscardUnknown(m)
  1201  }
  1202  
  1203  var xxx_messageInfo_Object proto.InternalMessageInfo
  1204  
  1205  func (m *Object) GetAttributes() map[string]*Spec {
  1206  	if m != nil {
  1207  		return m.Attributes
  1208  	}
  1209  	return nil
  1210  }
  1211  
  1212  // Array spec type produces a JSON array whose elements are set based on
  1213  // any nested spec blocks:
  1214  //
  1215  // ```hcl
  1216  // Array {
  1217  // Attr {
  1218  // name = "first_element"
  1219  // type = "string"
  1220  // }
  1221  // Attr {
  1222  // name = "second_element"
  1223  // type = "string"
  1224  // }
  1225  // }
  1226  // ```
  1227  //
  1228  // An `Array` spec block creates no validation constraints, but it passes on
  1229  // any validation constraints created by the nested specs.
  1230  type Array struct {
  1231  	Values               []*Spec  `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
  1232  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1233  	XXX_unrecognized     []byte   `json:"-"`
  1234  	XXX_sizecache        int32    `json:"-"`
  1235  }
  1236  
  1237  func (m *Array) Reset()         { *m = Array{} }
  1238  func (m *Array) String() string { return proto.CompactTextString(m) }
  1239  func (*Array) ProtoMessage()    {}
  1240  func (*Array) Descriptor() ([]byte, []int) {
  1241  	return fileDescriptor_hcl_spec_8d078e4df12ae415, []int{10}
  1242  }
  1243  func (m *Array) XXX_Unmarshal(b []byte) error {
  1244  	return xxx_messageInfo_Array.Unmarshal(m, b)
  1245  }
  1246  func (m *Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1247  	return xxx_messageInfo_Array.Marshal(b, m, deterministic)
  1248  }
  1249  func (dst *Array) XXX_Merge(src proto.Message) {
  1250  	xxx_messageInfo_Array.Merge(dst, src)
  1251  }
  1252  func (m *Array) XXX_Size() int {
  1253  	return xxx_messageInfo_Array.Size(m)
  1254  }
  1255  func (m *Array) XXX_DiscardUnknown() {
  1256  	xxx_messageInfo_Array.DiscardUnknown(m)
  1257  }
  1258  
  1259  var xxx_messageInfo_Array proto.InternalMessageInfo
  1260  
  1261  func (m *Array) GetValues() []*Spec {
  1262  	if m != nil {
  1263  		return m.Values
  1264  	}
  1265  	return nil
  1266  }
  1267  
  1268  func init() {
  1269  	proto.RegisterType((*Spec)(nil), "hashicorp.nomad.plugins.shared.hclspec.Spec")
  1270  	proto.RegisterType((*Attr)(nil), "hashicorp.nomad.plugins.shared.hclspec.Attr")
  1271  	proto.RegisterType((*Block)(nil), "hashicorp.nomad.plugins.shared.hclspec.Block")
  1272  	proto.RegisterType((*BlockAttrs)(nil), "hashicorp.nomad.plugins.shared.hclspec.BlockAttrs")
  1273  	proto.RegisterType((*BlockList)(nil), "hashicorp.nomad.plugins.shared.hclspec.BlockList")
  1274  	proto.RegisterType((*BlockSet)(nil), "hashicorp.nomad.plugins.shared.hclspec.BlockSet")
  1275  	proto.RegisterType((*BlockMap)(nil), "hashicorp.nomad.plugins.shared.hclspec.BlockMap")
  1276  	proto.RegisterType((*Literal)(nil), "hashicorp.nomad.plugins.shared.hclspec.Literal")
  1277  	proto.RegisterType((*Default)(nil), "hashicorp.nomad.plugins.shared.hclspec.Default")
  1278  	proto.RegisterType((*Object)(nil), "hashicorp.nomad.plugins.shared.hclspec.Object")
  1279  	proto.RegisterMapType((map[string]*Spec)(nil), "hashicorp.nomad.plugins.shared.hclspec.Object.AttributesEntry")
  1280  	proto.RegisterType((*Array)(nil), "hashicorp.nomad.plugins.shared.hclspec.Array")
  1281  }
  1282  
  1283  func init() {
  1284  	proto.RegisterFile("plugins/shared/hclspec/hcl_spec.proto", fileDescriptor_hcl_spec_8d078e4df12ae415)
  1285  }
  1286  
  1287  var fileDescriptor_hcl_spec_8d078e4df12ae415 = []byte{
  1288  	// 624 bytes of a gzipped FileDescriptorProto
  1289  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0x4d, 0x6f, 0xd3, 0x4c,
  1290  	0x10, 0xc7, 0xe3, 0xc4, 0xaf, 0xd3, 0xc3, 0xf3, 0x68, 0x85, 0x90, 0x55, 0x0e, 0x54, 0x96, 0x40,
  1291  	0x3d, 0x80, 0x0b, 0xe5, 0x82, 0x38, 0x20, 0x35, 0x6a, 0x91, 0x81, 0x46, 0xad, 0xb6, 0x82, 0x03,
  1292  	0x07, 0xa2, 0xb5, 0xb3, 0x10, 0x13, 0xbf, 0xb1, 0xbb, 0x41, 0x8d, 0x04, 0x1f, 0x84, 0x03, 0xf0,
  1293  	0xa9, 0xf8, 0x3e, 0x68, 0x5f, 0x9c, 0x14, 0x94, 0x43, 0x1c, 0x7a, 0xe0, 0x94, 0x19, 0x8f, 0xfe,
  1294  	0x3f, 0xcf, 0xec, 0xce, 0x78, 0x02, 0x77, 0x9a, 0x62, 0xfe, 0x3e, 0xaf, 0xf8, 0x01, 0x9f, 0x12,
  1295  	0x46, 0x27, 0x07, 0xd3, 0xac, 0xe0, 0x0d, 0xcd, 0xe4, 0xef, 0x58, 0x1a, 0x71, 0xc3, 0x6a, 0x51,
  1296  	0xa3, 0xbb, 0x53, 0xc2, 0xa7, 0x79, 0x56, 0xb3, 0x26, 0xae, 0xea, 0x92, 0x4c, 0x62, 0x23, 0x8b,
  1297  	0xb5, 0x2c, 0x36, 0xb2, 0xe8, 0x9b, 0x0b, 0xf6, 0x45, 0x43, 0x33, 0x94, 0x80, 0x5b, 0xa7, 0x1f,
  1298  	0x68, 0x26, 0x42, 0x6b, 0xcf, 0xda, 0xdf, 0x39, 0x8c, 0xe3, 0xcd, 0x08, 0xf1, 0x99, 0x52, 0x25,
  1299  	0x3d, 0x6c, 0xf4, 0xe8, 0x04, 0x1c, 0xc2, 0x18, 0x59, 0x84, 0x7d, 0x05, 0xba, 0xbf, 0x29, 0xe8,
  1300  	0x48, 0x8a, 0x92, 0x1e, 0xd6, 0x6a, 0x34, 0x04, 0xfb, 0x48, 0x08, 0x16, 0x0e, 0x14, 0xe5, 0xde,
  1301  	0xc6, 0x14, 0x21, 0x58, 0xd2, 0xc3, 0x4a, 0x8b, 0xce, 0x61, 0x27, 0x2d, 0xea, 0x6c, 0x36, 0xfe,
  1302  	0x44, 0x8a, 0x39, 0x0d, 0xed, 0x6e, 0x09, 0x0d, 0xa5, 0x34, 0xe9, 0x61, 0x50, 0x8c, 0xd7, 0x12,
  1303  	0x81, 0x5e, 0xb5, 0x44, 0x22, 0x04, 0xe3, 0xa1, 0xa3, 0x88, 0x87, 0x9d, 0x88, 0x32, 0x33, 0xbe,
  1304  	0xc4, 0x2a, 0x0f, 0x61, 0xd0, 0xde, 0xb8, 0xc8, 0xb9, 0x08, 0x5d, 0x45, 0x7d, 0xd8, 0x89, 0x7a,
  1305  	0x9a, 0x73, 0x79, 0x09, 0x41, 0xda, 0x3a, 0xe8, 0x0c, 0xb4, 0x33, 0xe6, 0x54, 0x84, 0x9e, 0x42,
  1306  	0x3e, 0xe8, 0x84, 0xbc, 0xa0, 0x92, 0xe8, 0xa7, 0xc6, 0x5e, 0x01, 0x4b, 0xd2, 0x84, 0xfe, 0x16,
  1307  	0xc0, 0x11, 0x69, 0x96, 0xc0, 0x11, 0x69, 0xd0, 0x4b, 0xf0, 0x26, 0xf4, 0x1d, 0x99, 0x17, 0x22,
  1308  	0x0c, 0x14, 0xee, 0x60, 0x53, 0xdc, 0xb1, 0x96, 0x25, 0x3d, 0xdc, 0x12, 0x24, 0xac, 0xc8, 0x05,
  1309  	0x65, 0xa4, 0x08, 0xa1, 0x1b, 0xec, 0x54, 0xcb, 0x24, 0xcc, 0x10, 0x86, 0x1e, 0x38, 0x2a, 0xcb,
  1310  	0xe8, 0x85, 0xee, 0x42, 0x84, 0xc0, 0xae, 0x48, 0x49, 0xd5, 0x70, 0x04, 0x58, 0xd9, 0xf2, 0x99,
  1311  	0x58, 0x34, 0x54, 0xf5, 0x79, 0x80, 0x95, 0x8d, 0x76, 0xc1, 0x67, 0xf4, 0xe3, 0x3c, 0x67, 0x74,
  1312  	0xa2, 0x3a, 0xd7, 0xc7, 0x4b, 0x3f, 0xfa, 0x02, 0x8e, 0x3a, 0x86, 0xb5, 0xb0, 0xab, 0xc2, 0xfe,
  1313  	0xef, 0x42, 0x74, 0x0c, 0x6e, 0x45, 0xb9, 0x30, 0xc8, 0x0e, 0xc3, 0x20, 0x27, 0x1b, 0x1b, 0x6d,
  1314  	0x74, 0x0e, 0xb0, 0xea, 0xbf, 0x6b, 0x29, 0xe8, 0x87, 0x05, 0xc1, 0xb2, 0xf9, 0xd6, 0x12, 0x6f,
  1315  	0x41, 0x50, 0xe6, 0xd5, 0x38, 0x17, 0xb4, 0xe4, 0x0a, 0x6b, 0x63, 0xbf, 0xcc, 0xab, 0xe7, 0xd2,
  1316  	0x57, 0x41, 0x72, 0x69, 0x82, 0x03, 0x13, 0x24, 0x97, 0x3a, 0xb8, 0xaa, 0xd9, 0xfe, 0x8b, 0x9a,
  1317  	0xbf, 0x5b, 0xe0, 0xb7, 0xbd, 0xfc, 0x4f, 0x26, 0xf8, 0xd9, 0xe4, 0x27, 0xc7, 0x61, 0x5d, 0x7e,
  1318  	0x37, 0xc1, 0x2d, 0x48, 0x4a, 0x0b, 0x99, 0xdc, 0x60, 0x3f, 0xc0, 0xc6, 0xbb, 0xa6, 0x96, 0xb8,
  1319  	0x0d, 0x9e, 0x69, 0x7e, 0x74, 0x03, 0x1c, 0xfd, 0x91, 0xd4, 0x6f, 0xd7, 0x4e, 0xf4, 0xd5, 0x02,
  1320  	0xcf, 0xcc, 0x1a, 0x7a, 0x06, 0x5e, 0xc3, 0xf2, 0x92, 0xb0, 0x85, 0x59, 0x11, 0xdd, 0xde, 0xd9,
  1321  	0x8a, 0x25, 0xa7, 0x9d, 0xfa, 0xfe, 0x36, 0x1c, 0x23, 0x8e, 0x7e, 0x5a, 0xe0, 0xea, 0xe5, 0x83,
  1322  	0xde, 0x02, 0xc8, 0xef, 0x71, 0x9e, 0xce, 0x05, 0xe5, 0xa1, 0xb5, 0x37, 0xd8, 0xdf, 0x39, 0x7c,
  1323  	0xda, 0x6d, 0x81, 0xa9, 0xc5, 0xa1, 0x01, 0x27, 0x95, 0x60, 0x0b, 0x7c, 0x85, 0xb8, 0x3b, 0x83,
  1324  	0xff, 0xfe, 0x08, 0xa3, 0xff, 0x61, 0x30, 0xa3, 0x0b, 0x73, 0x5a, 0xd2, 0x44, 0xc3, 0xf6, 0x04,
  1325  	0xb7, 0xa9, 0x4a, 0x4b, 0x9f, 0xf4, 0x1f, 0x5b, 0xd1, 0x08, 0x1c, 0xb5, 0x0a, 0xe5, 0x1d, 0xab,
  1326  	0xa7, 0x6d, 0x45, 0x1d, 0xef, 0x58, 0x6b, 0x87, 0xc1, 0x1b, 0xcf, 0x3c, 0x4f, 0x5d, 0xf5, 0xdf,
  1327  	0xe0, 0xd1, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x20, 0x9f, 0xf2, 0x44, 0x08, 0x00, 0x00,
  1328  }