2022-05-25 18:43:35 +00:00
|
|
|
// Code generated by mog. DO NOT EDIT.
|
|
|
|
|
|
|
|
package pbpeering
|
|
|
|
|
|
|
|
import "github.com/hashicorp/consul/api"
|
|
|
|
|
2022-06-10 16:10:46 +00:00
|
|
|
func EstablishRequestToAPI(s *EstablishRequest, t *api.PeeringEstablishRequest) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
t.PeerName = s.PeerName
|
2022-06-10 16:10:46 +00:00
|
|
|
t.PeeringToken = s.PeeringToken
|
2022-07-15 14:07:07 +00:00
|
|
|
t.Partition = s.Partition
|
2022-05-25 18:43:35 +00:00
|
|
|
t.Meta = s.Meta
|
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func EstablishRequestFromAPI(t *api.PeeringEstablishRequest, s *EstablishRequest) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
s.PeerName = t.PeerName
|
2022-06-10 16:10:46 +00:00
|
|
|
s.PeeringToken = t.PeeringToken
|
2022-07-15 14:07:07 +00:00
|
|
|
s.Partition = t.Partition
|
2022-05-25 18:43:35 +00:00
|
|
|
s.Meta = t.Meta
|
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func EstablishResponseToAPI(s *EstablishResponse, t *api.PeeringEstablishResponse) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func EstablishResponseFromAPI(t *api.PeeringEstablishResponse, s *EstablishResponse) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func GenerateTokenRequestToAPI(s *GenerateTokenRequest, t *api.PeeringGenerateTokenRequest) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
t.PeerName = s.PeerName
|
2022-06-10 16:10:46 +00:00
|
|
|
t.Partition = s.Partition
|
2022-05-25 18:43:35 +00:00
|
|
|
t.Meta = s.Meta
|
2022-07-21 21:56:11 +00:00
|
|
|
t.ServerExternalAddresses = s.ServerExternalAddresses
|
2022-05-25 18:43:35 +00:00
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func GenerateTokenRequestFromAPI(t *api.PeeringGenerateTokenRequest, s *GenerateTokenRequest) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
s.PeerName = t.PeerName
|
2022-06-10 16:10:46 +00:00
|
|
|
s.Partition = t.Partition
|
2022-05-25 18:43:35 +00:00
|
|
|
s.Meta = t.Meta
|
2022-07-21 21:56:11 +00:00
|
|
|
s.ServerExternalAddresses = t.ServerExternalAddresses
|
2022-05-25 18:43:35 +00:00
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func GenerateTokenResponseToAPI(s *GenerateTokenResponse, t *api.PeeringGenerateTokenResponse) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
t.PeeringToken = s.PeeringToken
|
2022-05-25 18:43:35 +00:00
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
func GenerateTokenResponseFromAPI(t *api.PeeringGenerateTokenResponse, s *GenerateTokenResponse) {
|
2022-05-25 18:43:35 +00:00
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
2022-06-10 16:10:46 +00:00
|
|
|
s.PeeringToken = t.PeeringToken
|
2022-05-25 18:43:35 +00:00
|
|
|
}
|
|
|
|
func PeeringToAPI(s *Peering, t *api.Peering) {
|
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
t.ID = s.ID
|
|
|
|
t.Name = s.Name
|
|
|
|
t.Partition = s.Partition
|
2022-06-08 22:53:32 +00:00
|
|
|
t.DeletedAt = TimePtrFromProto(s.DeletedAt)
|
2022-05-25 18:43:35 +00:00
|
|
|
t.Meta = s.Meta
|
|
|
|
t.State = PeeringStateToAPI(s.State)
|
|
|
|
t.PeerID = s.PeerID
|
|
|
|
t.PeerCAPems = s.PeerCAPems
|
|
|
|
t.PeerServerName = s.PeerServerName
|
|
|
|
t.PeerServerAddresses = s.PeerServerAddresses
|
2022-06-29 21:07:30 +00:00
|
|
|
t.ImportedServiceCount = s.ImportedServiceCount
|
|
|
|
t.ExportedServiceCount = s.ExportedServiceCount
|
2022-09-29 19:37:19 +00:00
|
|
|
t.ImportedServices = s.ImportedServices
|
|
|
|
t.ExportedServices = s.ExportedServices
|
2022-05-25 18:43:35 +00:00
|
|
|
t.CreateIndex = s.CreateIndex
|
|
|
|
t.ModifyIndex = s.ModifyIndex
|
|
|
|
}
|
|
|
|
func PeeringFromAPI(t *api.Peering, s *Peering) {
|
|
|
|
if s == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
s.ID = t.ID
|
|
|
|
s.Name = t.Name
|
|
|
|
s.Partition = t.Partition
|
2022-06-08 22:53:32 +00:00
|
|
|
s.DeletedAt = TimePtrToProto(t.DeletedAt)
|
2022-05-25 18:43:35 +00:00
|
|
|
s.Meta = t.Meta
|
|
|
|
s.State = PeeringStateFromAPI(t.State)
|
|
|
|
s.PeerID = t.PeerID
|
|
|
|
s.PeerCAPems = t.PeerCAPems
|
|
|
|
s.PeerServerName = t.PeerServerName
|
|
|
|
s.PeerServerAddresses = t.PeerServerAddresses
|
2022-06-29 21:07:30 +00:00
|
|
|
s.ImportedServiceCount = t.ImportedServiceCount
|
|
|
|
s.ExportedServiceCount = t.ExportedServiceCount
|
2022-09-29 19:37:19 +00:00
|
|
|
s.ImportedServices = t.ImportedServices
|
|
|
|
s.ExportedServices = t.ExportedServices
|
2022-05-25 18:43:35 +00:00
|
|
|
s.CreateIndex = t.CreateIndex
|
|
|
|
s.ModifyIndex = t.ModifyIndex
|
|
|
|
}
|