github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/query/generated/proto/admin/database.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/m3db/m3/src/query/generated/proto/admin/database.proto
     3  
     4  // Copyright (c) 2021 Uber Technologies, Inc.
     5  //
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction, including without limitation the rights
     9  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    10  // copies of the Software, and to permit persons to whom the Software is
    11  // furnished to do so, subject to the following conditions:
    12  //
    13  // The above copyright notice and this permission notice shall be included in
    14  // all copies or substantial portions of the Software.
    15  //
    16  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    19  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  // THE SOFTWARE.
    23  
    24  /*
    25  	Package admin is a generated protocol buffer package.
    26  
    27  	It is generated from these files:
    28  		github.com/m3db/m3/src/query/generated/proto/admin/database.proto
    29  		github.com/m3db/m3/src/query/generated/proto/admin/namespace.proto
    30  		github.com/m3db/m3/src/query/generated/proto/admin/placement.proto
    31  		github.com/m3db/m3/src/query/generated/proto/admin/topic.proto
    32  
    33  	It has these top-level messages:
    34  		DatabaseCreateRequest
    35  		AggregatedNamespace
    36  		BlockSize
    37  		Host
    38  		DatabaseCreateResponse
    39  		NamespaceGetResponse
    40  		NamespaceAddRequest
    41  		NamespaceUpdateRequest
    42  		NamespaceSchemaAddRequest
    43  		NamespaceSchemaAddResponse
    44  		NamespaceSchemaResetRequest
    45  		NamespaceSchemaResetResponse
    46  		NamespaceReadyRequest
    47  		NamespaceReadyResponse
    48  		PlacementInitRequest
    49  		PlacementGetResponse
    50  		PlacementAddRequest
    51  		PlacementRemoveRequest
    52  		PlacementReplaceRequest
    53  		PlacementSetRequest
    54  		PlacementSetResponse
    55  		TopicGetResponse
    56  		TopicInitRequest
    57  		TopicAddRequest
    58  		TopicUpdateRequest
    59  */
    60  package admin
    61  
    62  import proto "github.com/gogo/protobuf/proto"
    63  import fmt "fmt"
    64  import math "math"
    65  
    66  import io "io"
    67  
    68  // Reference imports to suppress errors if they are not otherwise used.
    69  var _ = proto.Marshal
    70  var _ = fmt.Errorf
    71  var _ = math.Inf
    72  
    73  // This is a compile-time assertion to ensure that this generated file
    74  // is compatible with the proto package it is being compiled against.
    75  // A compilation error at this line likely means your copy of the
    76  // proto package needs to be updated.
    77  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    78  
    79  type DatabaseCreateRequest struct {
    80  	// Required fields
    81  	NamespaceName string `protobuf:"bytes,1,opt,name=namespace_name,json=namespaceName,proto3" json:"namespace_name,omitempty"`
    82  	Type          string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
    83  	// Optional fields that may be inferred depending on database type
    84  	NumShards         int32 `protobuf:"varint,3,opt,name=num_shards,json=numShards,proto3" json:"num_shards,omitempty"`
    85  	ReplicationFactor int32 `protobuf:"varint,4,opt,name=replication_factor,json=replicationFactor,proto3" json:"replication_factor,omitempty"`
    86  	// Explicit retention time using time shorthand, e.g. "48h"
    87  	RetentionTime string `protobuf:"bytes,5,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"`
    88  	// If no block size fields are set then the block size is
    89  	// derived from the length of the retention period
    90  	BlockSize *BlockSize `protobuf:"bytes,6,opt,name=block_size,json=blockSize" json:"block_size,omitempty"`
    91  	// Required if not using local database type
    92  	Hosts []*Host `protobuf:"bytes,7,rep,name=hosts" json:"hosts,omitempty"`
    93  	// Optional field to add an additional aggregated namespace.
    94  	AggregatedNamespace *AggregatedNamespace `protobuf:"bytes,8,opt,name=aggregated_namespace,json=aggregatedNamespace" json:"aggregated_namespace,omitempty"`
    95  }
    96  
    97  func (m *DatabaseCreateRequest) Reset()                    { *m = DatabaseCreateRequest{} }
    98  func (m *DatabaseCreateRequest) String() string            { return proto.CompactTextString(m) }
    99  func (*DatabaseCreateRequest) ProtoMessage()               {}
   100  func (*DatabaseCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{0} }
   101  
   102  func (m *DatabaseCreateRequest) GetNamespaceName() string {
   103  	if m != nil {
   104  		return m.NamespaceName
   105  	}
   106  	return ""
   107  }
   108  
   109  func (m *DatabaseCreateRequest) GetType() string {
   110  	if m != nil {
   111  		return m.Type
   112  	}
   113  	return ""
   114  }
   115  
   116  func (m *DatabaseCreateRequest) GetNumShards() int32 {
   117  	if m != nil {
   118  		return m.NumShards
   119  	}
   120  	return 0
   121  }
   122  
   123  func (m *DatabaseCreateRequest) GetReplicationFactor() int32 {
   124  	if m != nil {
   125  		return m.ReplicationFactor
   126  	}
   127  	return 0
   128  }
   129  
   130  func (m *DatabaseCreateRequest) GetRetentionTime() string {
   131  	if m != nil {
   132  		return m.RetentionTime
   133  	}
   134  	return ""
   135  }
   136  
   137  func (m *DatabaseCreateRequest) GetBlockSize() *BlockSize {
   138  	if m != nil {
   139  		return m.BlockSize
   140  	}
   141  	return nil
   142  }
   143  
   144  func (m *DatabaseCreateRequest) GetHosts() []*Host {
   145  	if m != nil {
   146  		return m.Hosts
   147  	}
   148  	return nil
   149  }
   150  
   151  func (m *DatabaseCreateRequest) GetAggregatedNamespace() *AggregatedNamespace {
   152  	if m != nil {
   153  		return m.AggregatedNamespace
   154  	}
   155  	return nil
   156  }
   157  
   158  type AggregatedNamespace struct {
   159  	// Required fields.
   160  	// Namespace name.
   161  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   162  	// Time window to aggregate data points across.
   163  	// Uses same shorthand as retention_time.
   164  	Resolution string `protobuf:"bytes,2,opt,name=resolution,proto3" json:"resolution,omitempty"`
   165  	// Length of time to retain data.
   166  	RetentionTime string `protobuf:"bytes,3,opt,name=retention_time,json=retentionTime,proto3" json:"retention_time,omitempty"`
   167  }
   168  
   169  func (m *AggregatedNamespace) Reset()                    { *m = AggregatedNamespace{} }
   170  func (m *AggregatedNamespace) String() string            { return proto.CompactTextString(m) }
   171  func (*AggregatedNamespace) ProtoMessage()               {}
   172  func (*AggregatedNamespace) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{1} }
   173  
   174  func (m *AggregatedNamespace) GetName() string {
   175  	if m != nil {
   176  		return m.Name
   177  	}
   178  	return ""
   179  }
   180  
   181  func (m *AggregatedNamespace) GetResolution() string {
   182  	if m != nil {
   183  		return m.Resolution
   184  	}
   185  	return ""
   186  }
   187  
   188  func (m *AggregatedNamespace) GetRetentionTime() string {
   189  	if m != nil {
   190  		return m.RetentionTime
   191  	}
   192  	return ""
   193  }
   194  
   195  type BlockSize struct {
   196  	// Explicit block size using time shorthand, e.g. "2h"
   197  	Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
   198  	// With the expected series datapoints per hour, use a recommended block size
   199  	ExpectedSeriesDatapointsPerHour int64 `protobuf:"varint,2,opt,name=expected_series_datapoints_per_hour,json=expectedSeriesDatapointsPerHour,proto3" json:"expected_series_datapoints_per_hour,omitempty"`
   200  }
   201  
   202  func (m *BlockSize) Reset()                    { *m = BlockSize{} }
   203  func (m *BlockSize) String() string            { return proto.CompactTextString(m) }
   204  func (*BlockSize) ProtoMessage()               {}
   205  func (*BlockSize) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{2} }
   206  
   207  func (m *BlockSize) GetTime() string {
   208  	if m != nil {
   209  		return m.Time
   210  	}
   211  	return ""
   212  }
   213  
   214  func (m *BlockSize) GetExpectedSeriesDatapointsPerHour() int64 {
   215  	if m != nil {
   216  		return m.ExpectedSeriesDatapointsPerHour
   217  	}
   218  	return 0
   219  }
   220  
   221  type Host struct {
   222  	// Name (must be unique) of the host for logging/display purposes, can be hostname if desired,
   223  	// or UUID or any other string ID as used in third party inventory system
   224  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
   225  	// Address can be IP address or hostname, this is used to connect to the host
   226  	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
   227  	// Port running the Node RPC listen address (currently TChannel/Thrift Node service)
   228  	Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
   229  	// (Optional) Isolation group is an optional grouping, for instance to isolate replicas by
   230  	// zones use zone here, or to isolate by host racks use racks here
   231  	IsolationGroup string `protobuf:"bytes,4,opt,name=isolation_group,json=isolationGroup,proto3" json:"isolation_group,omitempty"`
   232  	// (Optional) Zone specifies the zone the host resides in, this is optional.
   233  	Zone string `protobuf:"bytes,5,opt,name=zone,proto3" json:"zone,omitempty"`
   234  	// (Optional) Weight specifies when considering how many shards to take how to weight
   235  	// this instance, do not specify to default to a weight of 1.
   236  	Weight uint32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"`
   237  }
   238  
   239  func (m *Host) Reset()                    { *m = Host{} }
   240  func (m *Host) String() string            { return proto.CompactTextString(m) }
   241  func (*Host) ProtoMessage()               {}
   242  func (*Host) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{3} }
   243  
   244  func (m *Host) GetId() string {
   245  	if m != nil {
   246  		return m.Id
   247  	}
   248  	return ""
   249  }
   250  
   251  func (m *Host) GetAddress() string {
   252  	if m != nil {
   253  		return m.Address
   254  	}
   255  	return ""
   256  }
   257  
   258  func (m *Host) GetPort() uint32 {
   259  	if m != nil {
   260  		return m.Port
   261  	}
   262  	return 0
   263  }
   264  
   265  func (m *Host) GetIsolationGroup() string {
   266  	if m != nil {
   267  		return m.IsolationGroup
   268  	}
   269  	return ""
   270  }
   271  
   272  func (m *Host) GetZone() string {
   273  	if m != nil {
   274  		return m.Zone
   275  	}
   276  	return ""
   277  }
   278  
   279  func (m *Host) GetWeight() uint32 {
   280  	if m != nil {
   281  		return m.Weight
   282  	}
   283  	return 0
   284  }
   285  
   286  type DatabaseCreateResponse struct {
   287  	Namespace *NamespaceGetResponse `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
   288  	Placement *PlacementGetResponse `protobuf:"bytes,2,opt,name=placement" json:"placement,omitempty"`
   289  }
   290  
   291  func (m *DatabaseCreateResponse) Reset()                    { *m = DatabaseCreateResponse{} }
   292  func (m *DatabaseCreateResponse) String() string            { return proto.CompactTextString(m) }
   293  func (*DatabaseCreateResponse) ProtoMessage()               {}
   294  func (*DatabaseCreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{4} }
   295  
   296  func (m *DatabaseCreateResponse) GetNamespace() *NamespaceGetResponse {
   297  	if m != nil {
   298  		return m.Namespace
   299  	}
   300  	return nil
   301  }
   302  
   303  func (m *DatabaseCreateResponse) GetPlacement() *PlacementGetResponse {
   304  	if m != nil {
   305  		return m.Placement
   306  	}
   307  	return nil
   308  }
   309  
   310  func init() {
   311  	proto.RegisterType((*DatabaseCreateRequest)(nil), "admin.DatabaseCreateRequest")
   312  	proto.RegisterType((*AggregatedNamespace)(nil), "admin.AggregatedNamespace")
   313  	proto.RegisterType((*BlockSize)(nil), "admin.BlockSize")
   314  	proto.RegisterType((*Host)(nil), "admin.Host")
   315  	proto.RegisterType((*DatabaseCreateResponse)(nil), "admin.DatabaseCreateResponse")
   316  }
   317  func (m *DatabaseCreateRequest) Marshal() (dAtA []byte, err error) {
   318  	size := m.Size()
   319  	dAtA = make([]byte, size)
   320  	n, err := m.MarshalTo(dAtA)
   321  	if err != nil {
   322  		return nil, err
   323  	}
   324  	return dAtA[:n], nil
   325  }
   326  
   327  func (m *DatabaseCreateRequest) MarshalTo(dAtA []byte) (int, error) {
   328  	var i int
   329  	_ = i
   330  	var l int
   331  	_ = l
   332  	if len(m.NamespaceName) > 0 {
   333  		dAtA[i] = 0xa
   334  		i++
   335  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.NamespaceName)))
   336  		i += copy(dAtA[i:], m.NamespaceName)
   337  	}
   338  	if len(m.Type) > 0 {
   339  		dAtA[i] = 0x12
   340  		i++
   341  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Type)))
   342  		i += copy(dAtA[i:], m.Type)
   343  	}
   344  	if m.NumShards != 0 {
   345  		dAtA[i] = 0x18
   346  		i++
   347  		i = encodeVarintDatabase(dAtA, i, uint64(m.NumShards))
   348  	}
   349  	if m.ReplicationFactor != 0 {
   350  		dAtA[i] = 0x20
   351  		i++
   352  		i = encodeVarintDatabase(dAtA, i, uint64(m.ReplicationFactor))
   353  	}
   354  	if len(m.RetentionTime) > 0 {
   355  		dAtA[i] = 0x2a
   356  		i++
   357  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.RetentionTime)))
   358  		i += copy(dAtA[i:], m.RetentionTime)
   359  	}
   360  	if m.BlockSize != nil {
   361  		dAtA[i] = 0x32
   362  		i++
   363  		i = encodeVarintDatabase(dAtA, i, uint64(m.BlockSize.Size()))
   364  		n1, err := m.BlockSize.MarshalTo(dAtA[i:])
   365  		if err != nil {
   366  			return 0, err
   367  		}
   368  		i += n1
   369  	}
   370  	if len(m.Hosts) > 0 {
   371  		for _, msg := range m.Hosts {
   372  			dAtA[i] = 0x3a
   373  			i++
   374  			i = encodeVarintDatabase(dAtA, i, uint64(msg.Size()))
   375  			n, err := msg.MarshalTo(dAtA[i:])
   376  			if err != nil {
   377  				return 0, err
   378  			}
   379  			i += n
   380  		}
   381  	}
   382  	if m.AggregatedNamespace != nil {
   383  		dAtA[i] = 0x42
   384  		i++
   385  		i = encodeVarintDatabase(dAtA, i, uint64(m.AggregatedNamespace.Size()))
   386  		n2, err := m.AggregatedNamespace.MarshalTo(dAtA[i:])
   387  		if err != nil {
   388  			return 0, err
   389  		}
   390  		i += n2
   391  	}
   392  	return i, nil
   393  }
   394  
   395  func (m *AggregatedNamespace) Marshal() (dAtA []byte, err error) {
   396  	size := m.Size()
   397  	dAtA = make([]byte, size)
   398  	n, err := m.MarshalTo(dAtA)
   399  	if err != nil {
   400  		return nil, err
   401  	}
   402  	return dAtA[:n], nil
   403  }
   404  
   405  func (m *AggregatedNamespace) MarshalTo(dAtA []byte) (int, error) {
   406  	var i int
   407  	_ = i
   408  	var l int
   409  	_ = l
   410  	if len(m.Name) > 0 {
   411  		dAtA[i] = 0xa
   412  		i++
   413  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Name)))
   414  		i += copy(dAtA[i:], m.Name)
   415  	}
   416  	if len(m.Resolution) > 0 {
   417  		dAtA[i] = 0x12
   418  		i++
   419  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Resolution)))
   420  		i += copy(dAtA[i:], m.Resolution)
   421  	}
   422  	if len(m.RetentionTime) > 0 {
   423  		dAtA[i] = 0x1a
   424  		i++
   425  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.RetentionTime)))
   426  		i += copy(dAtA[i:], m.RetentionTime)
   427  	}
   428  	return i, nil
   429  }
   430  
   431  func (m *BlockSize) Marshal() (dAtA []byte, err error) {
   432  	size := m.Size()
   433  	dAtA = make([]byte, size)
   434  	n, err := m.MarshalTo(dAtA)
   435  	if err != nil {
   436  		return nil, err
   437  	}
   438  	return dAtA[:n], nil
   439  }
   440  
   441  func (m *BlockSize) MarshalTo(dAtA []byte) (int, error) {
   442  	var i int
   443  	_ = i
   444  	var l int
   445  	_ = l
   446  	if len(m.Time) > 0 {
   447  		dAtA[i] = 0xa
   448  		i++
   449  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Time)))
   450  		i += copy(dAtA[i:], m.Time)
   451  	}
   452  	if m.ExpectedSeriesDatapointsPerHour != 0 {
   453  		dAtA[i] = 0x10
   454  		i++
   455  		i = encodeVarintDatabase(dAtA, i, uint64(m.ExpectedSeriesDatapointsPerHour))
   456  	}
   457  	return i, nil
   458  }
   459  
   460  func (m *Host) Marshal() (dAtA []byte, err error) {
   461  	size := m.Size()
   462  	dAtA = make([]byte, size)
   463  	n, err := m.MarshalTo(dAtA)
   464  	if err != nil {
   465  		return nil, err
   466  	}
   467  	return dAtA[:n], nil
   468  }
   469  
   470  func (m *Host) MarshalTo(dAtA []byte) (int, error) {
   471  	var i int
   472  	_ = i
   473  	var l int
   474  	_ = l
   475  	if len(m.Id) > 0 {
   476  		dAtA[i] = 0xa
   477  		i++
   478  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Id)))
   479  		i += copy(dAtA[i:], m.Id)
   480  	}
   481  	if len(m.Address) > 0 {
   482  		dAtA[i] = 0x12
   483  		i++
   484  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Address)))
   485  		i += copy(dAtA[i:], m.Address)
   486  	}
   487  	if m.Port != 0 {
   488  		dAtA[i] = 0x18
   489  		i++
   490  		i = encodeVarintDatabase(dAtA, i, uint64(m.Port))
   491  	}
   492  	if len(m.IsolationGroup) > 0 {
   493  		dAtA[i] = 0x22
   494  		i++
   495  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.IsolationGroup)))
   496  		i += copy(dAtA[i:], m.IsolationGroup)
   497  	}
   498  	if len(m.Zone) > 0 {
   499  		dAtA[i] = 0x2a
   500  		i++
   501  		i = encodeVarintDatabase(dAtA, i, uint64(len(m.Zone)))
   502  		i += copy(dAtA[i:], m.Zone)
   503  	}
   504  	if m.Weight != 0 {
   505  		dAtA[i] = 0x30
   506  		i++
   507  		i = encodeVarintDatabase(dAtA, i, uint64(m.Weight))
   508  	}
   509  	return i, nil
   510  }
   511  
   512  func (m *DatabaseCreateResponse) Marshal() (dAtA []byte, err error) {
   513  	size := m.Size()
   514  	dAtA = make([]byte, size)
   515  	n, err := m.MarshalTo(dAtA)
   516  	if err != nil {
   517  		return nil, err
   518  	}
   519  	return dAtA[:n], nil
   520  }
   521  
   522  func (m *DatabaseCreateResponse) MarshalTo(dAtA []byte) (int, error) {
   523  	var i int
   524  	_ = i
   525  	var l int
   526  	_ = l
   527  	if m.Namespace != nil {
   528  		dAtA[i] = 0xa
   529  		i++
   530  		i = encodeVarintDatabase(dAtA, i, uint64(m.Namespace.Size()))
   531  		n3, err := m.Namespace.MarshalTo(dAtA[i:])
   532  		if err != nil {
   533  			return 0, err
   534  		}
   535  		i += n3
   536  	}
   537  	if m.Placement != nil {
   538  		dAtA[i] = 0x12
   539  		i++
   540  		i = encodeVarintDatabase(dAtA, i, uint64(m.Placement.Size()))
   541  		n4, err := m.Placement.MarshalTo(dAtA[i:])
   542  		if err != nil {
   543  			return 0, err
   544  		}
   545  		i += n4
   546  	}
   547  	return i, nil
   548  }
   549  
   550  func encodeVarintDatabase(dAtA []byte, offset int, v uint64) int {
   551  	for v >= 1<<7 {
   552  		dAtA[offset] = uint8(v&0x7f | 0x80)
   553  		v >>= 7
   554  		offset++
   555  	}
   556  	dAtA[offset] = uint8(v)
   557  	return offset + 1
   558  }
   559  func (m *DatabaseCreateRequest) Size() (n int) {
   560  	var l int
   561  	_ = l
   562  	l = len(m.NamespaceName)
   563  	if l > 0 {
   564  		n += 1 + l + sovDatabase(uint64(l))
   565  	}
   566  	l = len(m.Type)
   567  	if l > 0 {
   568  		n += 1 + l + sovDatabase(uint64(l))
   569  	}
   570  	if m.NumShards != 0 {
   571  		n += 1 + sovDatabase(uint64(m.NumShards))
   572  	}
   573  	if m.ReplicationFactor != 0 {
   574  		n += 1 + sovDatabase(uint64(m.ReplicationFactor))
   575  	}
   576  	l = len(m.RetentionTime)
   577  	if l > 0 {
   578  		n += 1 + l + sovDatabase(uint64(l))
   579  	}
   580  	if m.BlockSize != nil {
   581  		l = m.BlockSize.Size()
   582  		n += 1 + l + sovDatabase(uint64(l))
   583  	}
   584  	if len(m.Hosts) > 0 {
   585  		for _, e := range m.Hosts {
   586  			l = e.Size()
   587  			n += 1 + l + sovDatabase(uint64(l))
   588  		}
   589  	}
   590  	if m.AggregatedNamespace != nil {
   591  		l = m.AggregatedNamespace.Size()
   592  		n += 1 + l + sovDatabase(uint64(l))
   593  	}
   594  	return n
   595  }
   596  
   597  func (m *AggregatedNamespace) Size() (n int) {
   598  	var l int
   599  	_ = l
   600  	l = len(m.Name)
   601  	if l > 0 {
   602  		n += 1 + l + sovDatabase(uint64(l))
   603  	}
   604  	l = len(m.Resolution)
   605  	if l > 0 {
   606  		n += 1 + l + sovDatabase(uint64(l))
   607  	}
   608  	l = len(m.RetentionTime)
   609  	if l > 0 {
   610  		n += 1 + l + sovDatabase(uint64(l))
   611  	}
   612  	return n
   613  }
   614  
   615  func (m *BlockSize) Size() (n int) {
   616  	var l int
   617  	_ = l
   618  	l = len(m.Time)
   619  	if l > 0 {
   620  		n += 1 + l + sovDatabase(uint64(l))
   621  	}
   622  	if m.ExpectedSeriesDatapointsPerHour != 0 {
   623  		n += 1 + sovDatabase(uint64(m.ExpectedSeriesDatapointsPerHour))
   624  	}
   625  	return n
   626  }
   627  
   628  func (m *Host) Size() (n int) {
   629  	var l int
   630  	_ = l
   631  	l = len(m.Id)
   632  	if l > 0 {
   633  		n += 1 + l + sovDatabase(uint64(l))
   634  	}
   635  	l = len(m.Address)
   636  	if l > 0 {
   637  		n += 1 + l + sovDatabase(uint64(l))
   638  	}
   639  	if m.Port != 0 {
   640  		n += 1 + sovDatabase(uint64(m.Port))
   641  	}
   642  	l = len(m.IsolationGroup)
   643  	if l > 0 {
   644  		n += 1 + l + sovDatabase(uint64(l))
   645  	}
   646  	l = len(m.Zone)
   647  	if l > 0 {
   648  		n += 1 + l + sovDatabase(uint64(l))
   649  	}
   650  	if m.Weight != 0 {
   651  		n += 1 + sovDatabase(uint64(m.Weight))
   652  	}
   653  	return n
   654  }
   655  
   656  func (m *DatabaseCreateResponse) Size() (n int) {
   657  	var l int
   658  	_ = l
   659  	if m.Namespace != nil {
   660  		l = m.Namespace.Size()
   661  		n += 1 + l + sovDatabase(uint64(l))
   662  	}
   663  	if m.Placement != nil {
   664  		l = m.Placement.Size()
   665  		n += 1 + l + sovDatabase(uint64(l))
   666  	}
   667  	return n
   668  }
   669  
   670  func sovDatabase(x uint64) (n int) {
   671  	for {
   672  		n++
   673  		x >>= 7
   674  		if x == 0 {
   675  			break
   676  		}
   677  	}
   678  	return n
   679  }
   680  func sozDatabase(x uint64) (n int) {
   681  	return sovDatabase(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   682  }
   683  func (m *DatabaseCreateRequest) Unmarshal(dAtA []byte) error {
   684  	l := len(dAtA)
   685  	iNdEx := 0
   686  	for iNdEx < l {
   687  		preIndex := iNdEx
   688  		var wire uint64
   689  		for shift := uint(0); ; shift += 7 {
   690  			if shift >= 64 {
   691  				return ErrIntOverflowDatabase
   692  			}
   693  			if iNdEx >= l {
   694  				return io.ErrUnexpectedEOF
   695  			}
   696  			b := dAtA[iNdEx]
   697  			iNdEx++
   698  			wire |= (uint64(b) & 0x7F) << shift
   699  			if b < 0x80 {
   700  				break
   701  			}
   702  		}
   703  		fieldNum := int32(wire >> 3)
   704  		wireType := int(wire & 0x7)
   705  		if wireType == 4 {
   706  			return fmt.Errorf("proto: DatabaseCreateRequest: wiretype end group for non-group")
   707  		}
   708  		if fieldNum <= 0 {
   709  			return fmt.Errorf("proto: DatabaseCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   710  		}
   711  		switch fieldNum {
   712  		case 1:
   713  			if wireType != 2 {
   714  				return fmt.Errorf("proto: wrong wireType = %d for field NamespaceName", wireType)
   715  			}
   716  			var stringLen uint64
   717  			for shift := uint(0); ; shift += 7 {
   718  				if shift >= 64 {
   719  					return ErrIntOverflowDatabase
   720  				}
   721  				if iNdEx >= l {
   722  					return io.ErrUnexpectedEOF
   723  				}
   724  				b := dAtA[iNdEx]
   725  				iNdEx++
   726  				stringLen |= (uint64(b) & 0x7F) << shift
   727  				if b < 0x80 {
   728  					break
   729  				}
   730  			}
   731  			intStringLen := int(stringLen)
   732  			if intStringLen < 0 {
   733  				return ErrInvalidLengthDatabase
   734  			}
   735  			postIndex := iNdEx + intStringLen
   736  			if postIndex > l {
   737  				return io.ErrUnexpectedEOF
   738  			}
   739  			m.NamespaceName = string(dAtA[iNdEx:postIndex])
   740  			iNdEx = postIndex
   741  		case 2:
   742  			if wireType != 2 {
   743  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
   744  			}
   745  			var stringLen uint64
   746  			for shift := uint(0); ; shift += 7 {
   747  				if shift >= 64 {
   748  					return ErrIntOverflowDatabase
   749  				}
   750  				if iNdEx >= l {
   751  					return io.ErrUnexpectedEOF
   752  				}
   753  				b := dAtA[iNdEx]
   754  				iNdEx++
   755  				stringLen |= (uint64(b) & 0x7F) << shift
   756  				if b < 0x80 {
   757  					break
   758  				}
   759  			}
   760  			intStringLen := int(stringLen)
   761  			if intStringLen < 0 {
   762  				return ErrInvalidLengthDatabase
   763  			}
   764  			postIndex := iNdEx + intStringLen
   765  			if postIndex > l {
   766  				return io.ErrUnexpectedEOF
   767  			}
   768  			m.Type = string(dAtA[iNdEx:postIndex])
   769  			iNdEx = postIndex
   770  		case 3:
   771  			if wireType != 0 {
   772  				return fmt.Errorf("proto: wrong wireType = %d for field NumShards", wireType)
   773  			}
   774  			m.NumShards = 0
   775  			for shift := uint(0); ; shift += 7 {
   776  				if shift >= 64 {
   777  					return ErrIntOverflowDatabase
   778  				}
   779  				if iNdEx >= l {
   780  					return io.ErrUnexpectedEOF
   781  				}
   782  				b := dAtA[iNdEx]
   783  				iNdEx++
   784  				m.NumShards |= (int32(b) & 0x7F) << shift
   785  				if b < 0x80 {
   786  					break
   787  				}
   788  			}
   789  		case 4:
   790  			if wireType != 0 {
   791  				return fmt.Errorf("proto: wrong wireType = %d for field ReplicationFactor", wireType)
   792  			}
   793  			m.ReplicationFactor = 0
   794  			for shift := uint(0); ; shift += 7 {
   795  				if shift >= 64 {
   796  					return ErrIntOverflowDatabase
   797  				}
   798  				if iNdEx >= l {
   799  					return io.ErrUnexpectedEOF
   800  				}
   801  				b := dAtA[iNdEx]
   802  				iNdEx++
   803  				m.ReplicationFactor |= (int32(b) & 0x7F) << shift
   804  				if b < 0x80 {
   805  					break
   806  				}
   807  			}
   808  		case 5:
   809  			if wireType != 2 {
   810  				return fmt.Errorf("proto: wrong wireType = %d for field RetentionTime", wireType)
   811  			}
   812  			var stringLen uint64
   813  			for shift := uint(0); ; shift += 7 {
   814  				if shift >= 64 {
   815  					return ErrIntOverflowDatabase
   816  				}
   817  				if iNdEx >= l {
   818  					return io.ErrUnexpectedEOF
   819  				}
   820  				b := dAtA[iNdEx]
   821  				iNdEx++
   822  				stringLen |= (uint64(b) & 0x7F) << shift
   823  				if b < 0x80 {
   824  					break
   825  				}
   826  			}
   827  			intStringLen := int(stringLen)
   828  			if intStringLen < 0 {
   829  				return ErrInvalidLengthDatabase
   830  			}
   831  			postIndex := iNdEx + intStringLen
   832  			if postIndex > l {
   833  				return io.ErrUnexpectedEOF
   834  			}
   835  			m.RetentionTime = string(dAtA[iNdEx:postIndex])
   836  			iNdEx = postIndex
   837  		case 6:
   838  			if wireType != 2 {
   839  				return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType)
   840  			}
   841  			var msglen int
   842  			for shift := uint(0); ; shift += 7 {
   843  				if shift >= 64 {
   844  					return ErrIntOverflowDatabase
   845  				}
   846  				if iNdEx >= l {
   847  					return io.ErrUnexpectedEOF
   848  				}
   849  				b := dAtA[iNdEx]
   850  				iNdEx++
   851  				msglen |= (int(b) & 0x7F) << shift
   852  				if b < 0x80 {
   853  					break
   854  				}
   855  			}
   856  			if msglen < 0 {
   857  				return ErrInvalidLengthDatabase
   858  			}
   859  			postIndex := iNdEx + msglen
   860  			if postIndex > l {
   861  				return io.ErrUnexpectedEOF
   862  			}
   863  			if m.BlockSize == nil {
   864  				m.BlockSize = &BlockSize{}
   865  			}
   866  			if err := m.BlockSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   867  				return err
   868  			}
   869  			iNdEx = postIndex
   870  		case 7:
   871  			if wireType != 2 {
   872  				return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
   873  			}
   874  			var msglen int
   875  			for shift := uint(0); ; shift += 7 {
   876  				if shift >= 64 {
   877  					return ErrIntOverflowDatabase
   878  				}
   879  				if iNdEx >= l {
   880  					return io.ErrUnexpectedEOF
   881  				}
   882  				b := dAtA[iNdEx]
   883  				iNdEx++
   884  				msglen |= (int(b) & 0x7F) << shift
   885  				if b < 0x80 {
   886  					break
   887  				}
   888  			}
   889  			if msglen < 0 {
   890  				return ErrInvalidLengthDatabase
   891  			}
   892  			postIndex := iNdEx + msglen
   893  			if postIndex > l {
   894  				return io.ErrUnexpectedEOF
   895  			}
   896  			m.Hosts = append(m.Hosts, &Host{})
   897  			if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   898  				return err
   899  			}
   900  			iNdEx = postIndex
   901  		case 8:
   902  			if wireType != 2 {
   903  				return fmt.Errorf("proto: wrong wireType = %d for field AggregatedNamespace", wireType)
   904  			}
   905  			var msglen int
   906  			for shift := uint(0); ; shift += 7 {
   907  				if shift >= 64 {
   908  					return ErrIntOverflowDatabase
   909  				}
   910  				if iNdEx >= l {
   911  					return io.ErrUnexpectedEOF
   912  				}
   913  				b := dAtA[iNdEx]
   914  				iNdEx++
   915  				msglen |= (int(b) & 0x7F) << shift
   916  				if b < 0x80 {
   917  					break
   918  				}
   919  			}
   920  			if msglen < 0 {
   921  				return ErrInvalidLengthDatabase
   922  			}
   923  			postIndex := iNdEx + msglen
   924  			if postIndex > l {
   925  				return io.ErrUnexpectedEOF
   926  			}
   927  			if m.AggregatedNamespace == nil {
   928  				m.AggregatedNamespace = &AggregatedNamespace{}
   929  			}
   930  			if err := m.AggregatedNamespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   931  				return err
   932  			}
   933  			iNdEx = postIndex
   934  		default:
   935  			iNdEx = preIndex
   936  			skippy, err := skipDatabase(dAtA[iNdEx:])
   937  			if err != nil {
   938  				return err
   939  			}
   940  			if skippy < 0 {
   941  				return ErrInvalidLengthDatabase
   942  			}
   943  			if (iNdEx + skippy) > l {
   944  				return io.ErrUnexpectedEOF
   945  			}
   946  			iNdEx += skippy
   947  		}
   948  	}
   949  
   950  	if iNdEx > l {
   951  		return io.ErrUnexpectedEOF
   952  	}
   953  	return nil
   954  }
   955  func (m *AggregatedNamespace) Unmarshal(dAtA []byte) error {
   956  	l := len(dAtA)
   957  	iNdEx := 0
   958  	for iNdEx < l {
   959  		preIndex := iNdEx
   960  		var wire uint64
   961  		for shift := uint(0); ; shift += 7 {
   962  			if shift >= 64 {
   963  				return ErrIntOverflowDatabase
   964  			}
   965  			if iNdEx >= l {
   966  				return io.ErrUnexpectedEOF
   967  			}
   968  			b := dAtA[iNdEx]
   969  			iNdEx++
   970  			wire |= (uint64(b) & 0x7F) << shift
   971  			if b < 0x80 {
   972  				break
   973  			}
   974  		}
   975  		fieldNum := int32(wire >> 3)
   976  		wireType := int(wire & 0x7)
   977  		if wireType == 4 {
   978  			return fmt.Errorf("proto: AggregatedNamespace: wiretype end group for non-group")
   979  		}
   980  		if fieldNum <= 0 {
   981  			return fmt.Errorf("proto: AggregatedNamespace: illegal tag %d (wire type %d)", fieldNum, wire)
   982  		}
   983  		switch fieldNum {
   984  		case 1:
   985  			if wireType != 2 {
   986  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
   987  			}
   988  			var stringLen uint64
   989  			for shift := uint(0); ; shift += 7 {
   990  				if shift >= 64 {
   991  					return ErrIntOverflowDatabase
   992  				}
   993  				if iNdEx >= l {
   994  					return io.ErrUnexpectedEOF
   995  				}
   996  				b := dAtA[iNdEx]
   997  				iNdEx++
   998  				stringLen |= (uint64(b) & 0x7F) << shift
   999  				if b < 0x80 {
  1000  					break
  1001  				}
  1002  			}
  1003  			intStringLen := int(stringLen)
  1004  			if intStringLen < 0 {
  1005  				return ErrInvalidLengthDatabase
  1006  			}
  1007  			postIndex := iNdEx + intStringLen
  1008  			if postIndex > l {
  1009  				return io.ErrUnexpectedEOF
  1010  			}
  1011  			m.Name = string(dAtA[iNdEx:postIndex])
  1012  			iNdEx = postIndex
  1013  		case 2:
  1014  			if wireType != 2 {
  1015  				return fmt.Errorf("proto: wrong wireType = %d for field Resolution", wireType)
  1016  			}
  1017  			var stringLen uint64
  1018  			for shift := uint(0); ; shift += 7 {
  1019  				if shift >= 64 {
  1020  					return ErrIntOverflowDatabase
  1021  				}
  1022  				if iNdEx >= l {
  1023  					return io.ErrUnexpectedEOF
  1024  				}
  1025  				b := dAtA[iNdEx]
  1026  				iNdEx++
  1027  				stringLen |= (uint64(b) & 0x7F) << shift
  1028  				if b < 0x80 {
  1029  					break
  1030  				}
  1031  			}
  1032  			intStringLen := int(stringLen)
  1033  			if intStringLen < 0 {
  1034  				return ErrInvalidLengthDatabase
  1035  			}
  1036  			postIndex := iNdEx + intStringLen
  1037  			if postIndex > l {
  1038  				return io.ErrUnexpectedEOF
  1039  			}
  1040  			m.Resolution = string(dAtA[iNdEx:postIndex])
  1041  			iNdEx = postIndex
  1042  		case 3:
  1043  			if wireType != 2 {
  1044  				return fmt.Errorf("proto: wrong wireType = %d for field RetentionTime", wireType)
  1045  			}
  1046  			var stringLen uint64
  1047  			for shift := uint(0); ; shift += 7 {
  1048  				if shift >= 64 {
  1049  					return ErrIntOverflowDatabase
  1050  				}
  1051  				if iNdEx >= l {
  1052  					return io.ErrUnexpectedEOF
  1053  				}
  1054  				b := dAtA[iNdEx]
  1055  				iNdEx++
  1056  				stringLen |= (uint64(b) & 0x7F) << shift
  1057  				if b < 0x80 {
  1058  					break
  1059  				}
  1060  			}
  1061  			intStringLen := int(stringLen)
  1062  			if intStringLen < 0 {
  1063  				return ErrInvalidLengthDatabase
  1064  			}
  1065  			postIndex := iNdEx + intStringLen
  1066  			if postIndex > l {
  1067  				return io.ErrUnexpectedEOF
  1068  			}
  1069  			m.RetentionTime = string(dAtA[iNdEx:postIndex])
  1070  			iNdEx = postIndex
  1071  		default:
  1072  			iNdEx = preIndex
  1073  			skippy, err := skipDatabase(dAtA[iNdEx:])
  1074  			if err != nil {
  1075  				return err
  1076  			}
  1077  			if skippy < 0 {
  1078  				return ErrInvalidLengthDatabase
  1079  			}
  1080  			if (iNdEx + skippy) > l {
  1081  				return io.ErrUnexpectedEOF
  1082  			}
  1083  			iNdEx += skippy
  1084  		}
  1085  	}
  1086  
  1087  	if iNdEx > l {
  1088  		return io.ErrUnexpectedEOF
  1089  	}
  1090  	return nil
  1091  }
  1092  func (m *BlockSize) Unmarshal(dAtA []byte) error {
  1093  	l := len(dAtA)
  1094  	iNdEx := 0
  1095  	for iNdEx < l {
  1096  		preIndex := iNdEx
  1097  		var wire uint64
  1098  		for shift := uint(0); ; shift += 7 {
  1099  			if shift >= 64 {
  1100  				return ErrIntOverflowDatabase
  1101  			}
  1102  			if iNdEx >= l {
  1103  				return io.ErrUnexpectedEOF
  1104  			}
  1105  			b := dAtA[iNdEx]
  1106  			iNdEx++
  1107  			wire |= (uint64(b) & 0x7F) << shift
  1108  			if b < 0x80 {
  1109  				break
  1110  			}
  1111  		}
  1112  		fieldNum := int32(wire >> 3)
  1113  		wireType := int(wire & 0x7)
  1114  		if wireType == 4 {
  1115  			return fmt.Errorf("proto: BlockSize: wiretype end group for non-group")
  1116  		}
  1117  		if fieldNum <= 0 {
  1118  			return fmt.Errorf("proto: BlockSize: illegal tag %d (wire type %d)", fieldNum, wire)
  1119  		}
  1120  		switch fieldNum {
  1121  		case 1:
  1122  			if wireType != 2 {
  1123  				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  1124  			}
  1125  			var stringLen uint64
  1126  			for shift := uint(0); ; shift += 7 {
  1127  				if shift >= 64 {
  1128  					return ErrIntOverflowDatabase
  1129  				}
  1130  				if iNdEx >= l {
  1131  					return io.ErrUnexpectedEOF
  1132  				}
  1133  				b := dAtA[iNdEx]
  1134  				iNdEx++
  1135  				stringLen |= (uint64(b) & 0x7F) << shift
  1136  				if b < 0x80 {
  1137  					break
  1138  				}
  1139  			}
  1140  			intStringLen := int(stringLen)
  1141  			if intStringLen < 0 {
  1142  				return ErrInvalidLengthDatabase
  1143  			}
  1144  			postIndex := iNdEx + intStringLen
  1145  			if postIndex > l {
  1146  				return io.ErrUnexpectedEOF
  1147  			}
  1148  			m.Time = string(dAtA[iNdEx:postIndex])
  1149  			iNdEx = postIndex
  1150  		case 2:
  1151  			if wireType != 0 {
  1152  				return fmt.Errorf("proto: wrong wireType = %d for field ExpectedSeriesDatapointsPerHour", wireType)
  1153  			}
  1154  			m.ExpectedSeriesDatapointsPerHour = 0
  1155  			for shift := uint(0); ; shift += 7 {
  1156  				if shift >= 64 {
  1157  					return ErrIntOverflowDatabase
  1158  				}
  1159  				if iNdEx >= l {
  1160  					return io.ErrUnexpectedEOF
  1161  				}
  1162  				b := dAtA[iNdEx]
  1163  				iNdEx++
  1164  				m.ExpectedSeriesDatapointsPerHour |= (int64(b) & 0x7F) << shift
  1165  				if b < 0x80 {
  1166  					break
  1167  				}
  1168  			}
  1169  		default:
  1170  			iNdEx = preIndex
  1171  			skippy, err := skipDatabase(dAtA[iNdEx:])
  1172  			if err != nil {
  1173  				return err
  1174  			}
  1175  			if skippy < 0 {
  1176  				return ErrInvalidLengthDatabase
  1177  			}
  1178  			if (iNdEx + skippy) > l {
  1179  				return io.ErrUnexpectedEOF
  1180  			}
  1181  			iNdEx += skippy
  1182  		}
  1183  	}
  1184  
  1185  	if iNdEx > l {
  1186  		return io.ErrUnexpectedEOF
  1187  	}
  1188  	return nil
  1189  }
  1190  func (m *Host) Unmarshal(dAtA []byte) error {
  1191  	l := len(dAtA)
  1192  	iNdEx := 0
  1193  	for iNdEx < l {
  1194  		preIndex := iNdEx
  1195  		var wire uint64
  1196  		for shift := uint(0); ; shift += 7 {
  1197  			if shift >= 64 {
  1198  				return ErrIntOverflowDatabase
  1199  			}
  1200  			if iNdEx >= l {
  1201  				return io.ErrUnexpectedEOF
  1202  			}
  1203  			b := dAtA[iNdEx]
  1204  			iNdEx++
  1205  			wire |= (uint64(b) & 0x7F) << shift
  1206  			if b < 0x80 {
  1207  				break
  1208  			}
  1209  		}
  1210  		fieldNum := int32(wire >> 3)
  1211  		wireType := int(wire & 0x7)
  1212  		if wireType == 4 {
  1213  			return fmt.Errorf("proto: Host: wiretype end group for non-group")
  1214  		}
  1215  		if fieldNum <= 0 {
  1216  			return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire)
  1217  		}
  1218  		switch fieldNum {
  1219  		case 1:
  1220  			if wireType != 2 {
  1221  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  1222  			}
  1223  			var stringLen uint64
  1224  			for shift := uint(0); ; shift += 7 {
  1225  				if shift >= 64 {
  1226  					return ErrIntOverflowDatabase
  1227  				}
  1228  				if iNdEx >= l {
  1229  					return io.ErrUnexpectedEOF
  1230  				}
  1231  				b := dAtA[iNdEx]
  1232  				iNdEx++
  1233  				stringLen |= (uint64(b) & 0x7F) << shift
  1234  				if b < 0x80 {
  1235  					break
  1236  				}
  1237  			}
  1238  			intStringLen := int(stringLen)
  1239  			if intStringLen < 0 {
  1240  				return ErrInvalidLengthDatabase
  1241  			}
  1242  			postIndex := iNdEx + intStringLen
  1243  			if postIndex > l {
  1244  				return io.ErrUnexpectedEOF
  1245  			}
  1246  			m.Id = string(dAtA[iNdEx:postIndex])
  1247  			iNdEx = postIndex
  1248  		case 2:
  1249  			if wireType != 2 {
  1250  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  1251  			}
  1252  			var stringLen uint64
  1253  			for shift := uint(0); ; shift += 7 {
  1254  				if shift >= 64 {
  1255  					return ErrIntOverflowDatabase
  1256  				}
  1257  				if iNdEx >= l {
  1258  					return io.ErrUnexpectedEOF
  1259  				}
  1260  				b := dAtA[iNdEx]
  1261  				iNdEx++
  1262  				stringLen |= (uint64(b) & 0x7F) << shift
  1263  				if b < 0x80 {
  1264  					break
  1265  				}
  1266  			}
  1267  			intStringLen := int(stringLen)
  1268  			if intStringLen < 0 {
  1269  				return ErrInvalidLengthDatabase
  1270  			}
  1271  			postIndex := iNdEx + intStringLen
  1272  			if postIndex > l {
  1273  				return io.ErrUnexpectedEOF
  1274  			}
  1275  			m.Address = string(dAtA[iNdEx:postIndex])
  1276  			iNdEx = postIndex
  1277  		case 3:
  1278  			if wireType != 0 {
  1279  				return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
  1280  			}
  1281  			m.Port = 0
  1282  			for shift := uint(0); ; shift += 7 {
  1283  				if shift >= 64 {
  1284  					return ErrIntOverflowDatabase
  1285  				}
  1286  				if iNdEx >= l {
  1287  					return io.ErrUnexpectedEOF
  1288  				}
  1289  				b := dAtA[iNdEx]
  1290  				iNdEx++
  1291  				m.Port |= (uint32(b) & 0x7F) << shift
  1292  				if b < 0x80 {
  1293  					break
  1294  				}
  1295  			}
  1296  		case 4:
  1297  			if wireType != 2 {
  1298  				return fmt.Errorf("proto: wrong wireType = %d for field IsolationGroup", wireType)
  1299  			}
  1300  			var stringLen uint64
  1301  			for shift := uint(0); ; shift += 7 {
  1302  				if shift >= 64 {
  1303  					return ErrIntOverflowDatabase
  1304  				}
  1305  				if iNdEx >= l {
  1306  					return io.ErrUnexpectedEOF
  1307  				}
  1308  				b := dAtA[iNdEx]
  1309  				iNdEx++
  1310  				stringLen |= (uint64(b) & 0x7F) << shift
  1311  				if b < 0x80 {
  1312  					break
  1313  				}
  1314  			}
  1315  			intStringLen := int(stringLen)
  1316  			if intStringLen < 0 {
  1317  				return ErrInvalidLengthDatabase
  1318  			}
  1319  			postIndex := iNdEx + intStringLen
  1320  			if postIndex > l {
  1321  				return io.ErrUnexpectedEOF
  1322  			}
  1323  			m.IsolationGroup = string(dAtA[iNdEx:postIndex])
  1324  			iNdEx = postIndex
  1325  		case 5:
  1326  			if wireType != 2 {
  1327  				return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType)
  1328  			}
  1329  			var stringLen uint64
  1330  			for shift := uint(0); ; shift += 7 {
  1331  				if shift >= 64 {
  1332  					return ErrIntOverflowDatabase
  1333  				}
  1334  				if iNdEx >= l {
  1335  					return io.ErrUnexpectedEOF
  1336  				}
  1337  				b := dAtA[iNdEx]
  1338  				iNdEx++
  1339  				stringLen |= (uint64(b) & 0x7F) << shift
  1340  				if b < 0x80 {
  1341  					break
  1342  				}
  1343  			}
  1344  			intStringLen := int(stringLen)
  1345  			if intStringLen < 0 {
  1346  				return ErrInvalidLengthDatabase
  1347  			}
  1348  			postIndex := iNdEx + intStringLen
  1349  			if postIndex > l {
  1350  				return io.ErrUnexpectedEOF
  1351  			}
  1352  			m.Zone = string(dAtA[iNdEx:postIndex])
  1353  			iNdEx = postIndex
  1354  		case 6:
  1355  			if wireType != 0 {
  1356  				return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
  1357  			}
  1358  			m.Weight = 0
  1359  			for shift := uint(0); ; shift += 7 {
  1360  				if shift >= 64 {
  1361  					return ErrIntOverflowDatabase
  1362  				}
  1363  				if iNdEx >= l {
  1364  					return io.ErrUnexpectedEOF
  1365  				}
  1366  				b := dAtA[iNdEx]
  1367  				iNdEx++
  1368  				m.Weight |= (uint32(b) & 0x7F) << shift
  1369  				if b < 0x80 {
  1370  					break
  1371  				}
  1372  			}
  1373  		default:
  1374  			iNdEx = preIndex
  1375  			skippy, err := skipDatabase(dAtA[iNdEx:])
  1376  			if err != nil {
  1377  				return err
  1378  			}
  1379  			if skippy < 0 {
  1380  				return ErrInvalidLengthDatabase
  1381  			}
  1382  			if (iNdEx + skippy) > l {
  1383  				return io.ErrUnexpectedEOF
  1384  			}
  1385  			iNdEx += skippy
  1386  		}
  1387  	}
  1388  
  1389  	if iNdEx > l {
  1390  		return io.ErrUnexpectedEOF
  1391  	}
  1392  	return nil
  1393  }
  1394  func (m *DatabaseCreateResponse) Unmarshal(dAtA []byte) error {
  1395  	l := len(dAtA)
  1396  	iNdEx := 0
  1397  	for iNdEx < l {
  1398  		preIndex := iNdEx
  1399  		var wire uint64
  1400  		for shift := uint(0); ; shift += 7 {
  1401  			if shift >= 64 {
  1402  				return ErrIntOverflowDatabase
  1403  			}
  1404  			if iNdEx >= l {
  1405  				return io.ErrUnexpectedEOF
  1406  			}
  1407  			b := dAtA[iNdEx]
  1408  			iNdEx++
  1409  			wire |= (uint64(b) & 0x7F) << shift
  1410  			if b < 0x80 {
  1411  				break
  1412  			}
  1413  		}
  1414  		fieldNum := int32(wire >> 3)
  1415  		wireType := int(wire & 0x7)
  1416  		if wireType == 4 {
  1417  			return fmt.Errorf("proto: DatabaseCreateResponse: wiretype end group for non-group")
  1418  		}
  1419  		if fieldNum <= 0 {
  1420  			return fmt.Errorf("proto: DatabaseCreateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1421  		}
  1422  		switch fieldNum {
  1423  		case 1:
  1424  			if wireType != 2 {
  1425  				return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
  1426  			}
  1427  			var msglen int
  1428  			for shift := uint(0); ; shift += 7 {
  1429  				if shift >= 64 {
  1430  					return ErrIntOverflowDatabase
  1431  				}
  1432  				if iNdEx >= l {
  1433  					return io.ErrUnexpectedEOF
  1434  				}
  1435  				b := dAtA[iNdEx]
  1436  				iNdEx++
  1437  				msglen |= (int(b) & 0x7F) << shift
  1438  				if b < 0x80 {
  1439  					break
  1440  				}
  1441  			}
  1442  			if msglen < 0 {
  1443  				return ErrInvalidLengthDatabase
  1444  			}
  1445  			postIndex := iNdEx + msglen
  1446  			if postIndex > l {
  1447  				return io.ErrUnexpectedEOF
  1448  			}
  1449  			if m.Namespace == nil {
  1450  				m.Namespace = &NamespaceGetResponse{}
  1451  			}
  1452  			if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1453  				return err
  1454  			}
  1455  			iNdEx = postIndex
  1456  		case 2:
  1457  			if wireType != 2 {
  1458  				return fmt.Errorf("proto: wrong wireType = %d for field Placement", wireType)
  1459  			}
  1460  			var msglen int
  1461  			for shift := uint(0); ; shift += 7 {
  1462  				if shift >= 64 {
  1463  					return ErrIntOverflowDatabase
  1464  				}
  1465  				if iNdEx >= l {
  1466  					return io.ErrUnexpectedEOF
  1467  				}
  1468  				b := dAtA[iNdEx]
  1469  				iNdEx++
  1470  				msglen |= (int(b) & 0x7F) << shift
  1471  				if b < 0x80 {
  1472  					break
  1473  				}
  1474  			}
  1475  			if msglen < 0 {
  1476  				return ErrInvalidLengthDatabase
  1477  			}
  1478  			postIndex := iNdEx + msglen
  1479  			if postIndex > l {
  1480  				return io.ErrUnexpectedEOF
  1481  			}
  1482  			if m.Placement == nil {
  1483  				m.Placement = &PlacementGetResponse{}
  1484  			}
  1485  			if err := m.Placement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1486  				return err
  1487  			}
  1488  			iNdEx = postIndex
  1489  		default:
  1490  			iNdEx = preIndex
  1491  			skippy, err := skipDatabase(dAtA[iNdEx:])
  1492  			if err != nil {
  1493  				return err
  1494  			}
  1495  			if skippy < 0 {
  1496  				return ErrInvalidLengthDatabase
  1497  			}
  1498  			if (iNdEx + skippy) > l {
  1499  				return io.ErrUnexpectedEOF
  1500  			}
  1501  			iNdEx += skippy
  1502  		}
  1503  	}
  1504  
  1505  	if iNdEx > l {
  1506  		return io.ErrUnexpectedEOF
  1507  	}
  1508  	return nil
  1509  }
  1510  func skipDatabase(dAtA []byte) (n int, err error) {
  1511  	l := len(dAtA)
  1512  	iNdEx := 0
  1513  	for iNdEx < l {
  1514  		var wire uint64
  1515  		for shift := uint(0); ; shift += 7 {
  1516  			if shift >= 64 {
  1517  				return 0, ErrIntOverflowDatabase
  1518  			}
  1519  			if iNdEx >= l {
  1520  				return 0, io.ErrUnexpectedEOF
  1521  			}
  1522  			b := dAtA[iNdEx]
  1523  			iNdEx++
  1524  			wire |= (uint64(b) & 0x7F) << shift
  1525  			if b < 0x80 {
  1526  				break
  1527  			}
  1528  		}
  1529  		wireType := int(wire & 0x7)
  1530  		switch wireType {
  1531  		case 0:
  1532  			for shift := uint(0); ; shift += 7 {
  1533  				if shift >= 64 {
  1534  					return 0, ErrIntOverflowDatabase
  1535  				}
  1536  				if iNdEx >= l {
  1537  					return 0, io.ErrUnexpectedEOF
  1538  				}
  1539  				iNdEx++
  1540  				if dAtA[iNdEx-1] < 0x80 {
  1541  					break
  1542  				}
  1543  			}
  1544  			return iNdEx, nil
  1545  		case 1:
  1546  			iNdEx += 8
  1547  			return iNdEx, nil
  1548  		case 2:
  1549  			var length int
  1550  			for shift := uint(0); ; shift += 7 {
  1551  				if shift >= 64 {
  1552  					return 0, ErrIntOverflowDatabase
  1553  				}
  1554  				if iNdEx >= l {
  1555  					return 0, io.ErrUnexpectedEOF
  1556  				}
  1557  				b := dAtA[iNdEx]
  1558  				iNdEx++
  1559  				length |= (int(b) & 0x7F) << shift
  1560  				if b < 0x80 {
  1561  					break
  1562  				}
  1563  			}
  1564  			iNdEx += length
  1565  			if length < 0 {
  1566  				return 0, ErrInvalidLengthDatabase
  1567  			}
  1568  			return iNdEx, nil
  1569  		case 3:
  1570  			for {
  1571  				var innerWire uint64
  1572  				var start int = iNdEx
  1573  				for shift := uint(0); ; shift += 7 {
  1574  					if shift >= 64 {
  1575  						return 0, ErrIntOverflowDatabase
  1576  					}
  1577  					if iNdEx >= l {
  1578  						return 0, io.ErrUnexpectedEOF
  1579  					}
  1580  					b := dAtA[iNdEx]
  1581  					iNdEx++
  1582  					innerWire |= (uint64(b) & 0x7F) << shift
  1583  					if b < 0x80 {
  1584  						break
  1585  					}
  1586  				}
  1587  				innerWireType := int(innerWire & 0x7)
  1588  				if innerWireType == 4 {
  1589  					break
  1590  				}
  1591  				next, err := skipDatabase(dAtA[start:])
  1592  				if err != nil {
  1593  					return 0, err
  1594  				}
  1595  				iNdEx = start + next
  1596  			}
  1597  			return iNdEx, nil
  1598  		case 4:
  1599  			return iNdEx, nil
  1600  		case 5:
  1601  			iNdEx += 4
  1602  			return iNdEx, nil
  1603  		default:
  1604  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1605  		}
  1606  	}
  1607  	panic("unreachable")
  1608  }
  1609  
  1610  var (
  1611  	ErrInvalidLengthDatabase = fmt.Errorf("proto: negative length found during unmarshaling")
  1612  	ErrIntOverflowDatabase   = fmt.Errorf("proto: integer overflow")
  1613  )
  1614  
  1615  func init() {
  1616  	proto.RegisterFile("github.com/m3db/m3/src/query/generated/proto/admin/database.proto", fileDescriptorDatabase)
  1617  }
  1618  
  1619  var fileDescriptorDatabase = []byte{
  1620  	// 572 bytes of a gzipped FileDescriptorProto
  1621  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xc1, 0x6e, 0xd3, 0x40,
  1622  	0x10, 0xc5, 0x49, 0xd3, 0xe2, 0xa9, 0x5a, 0xca, 0x16, 0x2a, 0xab, 0x88, 0x10, 0x82, 0x10, 0xb9,
  1623  	0x10, 0x4b, 0xcd, 0x89, 0x63, 0x43, 0x45, 0x7b, 0x80, 0xaa, 0x72, 0xb8, 0x5b, 0x6b, 0x7b, 0x70,
  1624  	0x56, 0x64, 0xbd, 0xdb, 0xdd, 0xb5, 0xa0, 0xf9, 0x08, 0xc4, 0x95, 0x3f, 0xe2, 0xc8, 0x27, 0xa0,
  1625  	0x70, 0xe3, 0x2b, 0xd0, 0x6e, 0x6c, 0x27, 0x40, 0x4e, 0xbd, 0x8d, 0xdf, 0xbc, 0x99, 0x9d, 0xf7,
  1626  	0x66, 0x0c, 0xa7, 0x39, 0x33, 0xd3, 0x32, 0x19, 0xa6, 0x82, 0x87, 0x7c, 0x94, 0x25, 0x21, 0x1f,
  1627  	0x85, 0x5a, 0xa5, 0xe1, 0x75, 0x89, 0xea, 0x26, 0xcc, 0xb1, 0x40, 0x45, 0x0d, 0x66, 0xa1, 0x54,
  1628  	0xc2, 0x88, 0x90, 0x66, 0x9c, 0x15, 0x61, 0x46, 0x0d, 0x4d, 0xa8, 0xc6, 0xa1, 0x03, 0x49, 0xc7,
  1629  	0xa1, 0xc7, 0xe3, 0x5b, 0x74, 0x2a, 0x28, 0x47, 0x2d, 0x69, 0x5a, 0xb5, 0xba, 0x55, 0x0f, 0x39,
  1630  	0xa3, 0x29, 0x72, 0x2c, 0xcc, 0xb2, 0x47, 0xff, 0x77, 0x0b, 0x1e, 0x9e, 0x55, 0x13, 0xbe, 0x56,
  1631  	0x48, 0x0d, 0x46, 0x78, 0x5d, 0xa2, 0x36, 0xe4, 0x39, 0xec, 0x37, 0x0f, 0xc6, 0x36, 0x0a, 0xbc,
  1632  	0x9e, 0x37, 0xf0, 0xa3, 0xbd, 0x06, 0xbd, 0xa4, 0x1c, 0x09, 0x81, 0x2d, 0x73, 0x23, 0x31, 0x68,
  1633  	0xb9, 0xa4, 0x8b, 0xc9, 0x63, 0x80, 0xa2, 0xe4, 0xb1, 0x9e, 0x52, 0x95, 0xe9, 0xa0, 0xdd, 0xf3,
  1634  	0x06, 0x9d, 0xc8, 0x2f, 0x4a, 0x3e, 0x71, 0x00, 0x79, 0x09, 0x44, 0xa1, 0x9c, 0xb1, 0x94, 0x1a,
  1635  	0x26, 0x8a, 0xf8, 0x03, 0x4d, 0x8d, 0x50, 0xc1, 0x96, 0xa3, 0xdd, 0x5f, 0xcb, 0xbc, 0x71, 0x09,
  1636  	0x3b, 0x88, 0x42, 0x83, 0x85, 0x23, 0x1b, 0xc6, 0x31, 0xe8, 0x2c, 0x07, 0x69, 0xd0, 0xf7, 0x8c,
  1637  	0x23, 0x09, 0x01, 0x92, 0x99, 0x48, 0x3f, 0xc6, 0x9a, 0xcd, 0x31, 0xd8, 0xee, 0x79, 0x83, 0xdd,
  1638  	0x93, 0x83, 0xa1, 0x53, 0x3d, 0x1c, 0xdb, 0xc4, 0x84, 0xcd, 0x31, 0xf2, 0x93, 0x3a, 0x24, 0x4f,
  1639  	0xa1, 0x33, 0x15, 0xda, 0xe8, 0x60, 0xa7, 0xd7, 0x1e, 0xec, 0x9e, 0xec, 0x56, 0xdc, 0x0b, 0xa1,
  1640  	0x4d, 0xb4, 0xcc, 0x90, 0x77, 0xf0, 0x80, 0xe6, 0xb9, 0xc2, 0xdc, 0xfa, 0x18, 0x37, 0xc2, 0x83,
  1641  	0xbb, 0xae, 0xfb, 0x71, 0x55, 0x71, 0xda, 0x50, 0x2e, 0x6b, 0x46, 0x74, 0x48, 0xff, 0x07, 0xfb,
  1642  	0x12, 0x0e, 0x37, 0x70, 0xad, 0x85, 0x6b, 0xfe, 0xba, 0x98, 0x74, 0x01, 0x14, 0x6a, 0x31, 0x2b,
  1643  	0xad, 0xbe, 0xca, 0xdc, 0x35, 0x64, 0x83, 0x29, 0xed, 0x0d, 0xa6, 0xf4, 0x39, 0xf8, 0x8d, 0x76,
  1644  	0xb7, 0x2a, 0xb6, 0x7a, 0xc7, 0xc6, 0xe4, 0x2d, 0x3c, 0xc3, 0xcf, 0x12, 0x53, 0xab, 0x4f, 0xa3,
  1645  	0x62, 0xa8, 0x63, 0x7b, 0xb0, 0x52, 0xb0, 0xc2, 0xe8, 0x58, 0xa2, 0x8a, 0xa7, 0xa2, 0x54, 0x6e,
  1646  	0x80, 0x76, 0xf4, 0xa4, 0xa6, 0x4e, 0x1c, 0xf3, 0xac, 0x21, 0x5e, 0xa1, 0xba, 0x10, 0xa5, 0xea,
  1647  	0x7f, 0xf3, 0x60, 0xcb, 0xfa, 0x47, 0xf6, 0xa1, 0xc5, 0xb2, 0xea, 0xa1, 0x16, 0xcb, 0x48, 0x00,
  1648  	0x3b, 0x34, 0xcb, 0x14, 0x6a, 0x5d, 0x69, 0xa9, 0x3f, 0xed, 0x50, 0x52, 0x28, 0xe3, 0xc6, 0xdf,
  1649  	0x8b, 0x5c, 0x4c, 0x5e, 0xc0, 0x3d, 0xa6, 0xc5, 0x6c, 0x79, 0x1e, 0xb9, 0x12, 0xa5, 0x74, 0xd7,
  1650  	0xe1, 0x47, 0xfb, 0x0d, 0x7c, 0x6e, 0x51, 0x5b, 0x3c, 0x17, 0x45, 0x7d, 0x10, 0x2e, 0x26, 0x47,
  1651  	0xb0, 0xfd, 0x09, 0x59, 0x3e, 0x35, 0xee, 0x06, 0xf6, 0xa2, 0xea, 0xab, 0xff, 0xc5, 0x83, 0xa3,
  1652  	0x7f, 0x2f, 0x5d, 0x4b, 0x51, 0x68, 0x24, 0xaf, 0xc0, 0x5f, 0xed, 0xd6, 0x73, 0xbb, 0x7d, 0x54,
  1653  	0xed, 0xb6, 0xd9, 0xd2, 0x39, 0x9a, 0x9a, 0x1f, 0xad, 0xd8, 0xb6, 0xb4, 0xf9, 0xa5, 0x9c, 0xb4,
  1654  	0x55, 0xe9, 0x55, 0x8d, 0xff, 0x55, 0xda, 0xb0, 0xc7, 0x07, 0xdf, 0x17, 0x5d, 0xef, 0xc7, 0xa2,
  1655  	0xeb, 0xfd, 0x5c, 0x74, 0xbd, 0xaf, 0xbf, 0xba, 0x77, 0x92, 0x6d, 0xf7, 0x4f, 0x8e, 0xfe, 0x04,
  1656  	0x00, 0x00, 0xff, 0xff, 0xce, 0xeb, 0x60, 0x31, 0x67, 0x04, 0x00, 0x00,
  1657  }