func GetStorageReplicaInfo(c common.Client, uri string) (*StorageReplicaInfo, error) {
	resp, err := c.Get(uri)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	var storagereplicainfo StorageReplicaInfo
	err = json.NewDecoder(resp.Body).Decode(&storagereplicainfo)
	if err != nil {
		return nil, err
	}
	storagereplicainfo.SetClient(c)
	return &storagereplicainfo, nil
}
GetStorageReplicaInfo will get a StorageReplicaInfo instance from the service.
package swordfish
import (
	"encoding/json"
	"github.com/stmcginnis/gofish/common"
)
type ConsistencyState string
const (
	ConsistentConsistencyState ConsistencyState = "Consistent"
	InconsistentConsistencyState ConsistencyState = "Inconsistent"
)
type ConsistencyStatus string
const (
	ConsistentConsistencyStatus ConsistencyStatus = "Consistent"
	InProgressConsistencyStatus ConsistencyStatus = "InProgress"
	DisabledConsistencyStatus ConsistencyStatus = "Disabled"
	InErrorConsistencyStatus ConsistencyStatus = "InError"
)
type ConsistencyType string
const (
	SequentiallyConsistentConsistencyType ConsistencyType = "SequentiallyConsistent"
)
type ReplicaPriority string
const (
	LowReplicaPriority ReplicaPriority = "Low"
	SameReplicaPriority ReplicaPriority = "Same"
	HighReplicaPriority ReplicaPriority = "High"
	UrgentReplicaPriority ReplicaPriority = "Urgent"
)
type ReplicaProgressStatus string
const (
	CompletedReplicaProgressStatus ReplicaProgressStatus = "Completed"
	DormantReplicaProgressStatus ReplicaProgressStatus = "Dormant"
	InitializingReplicaProgressStatus ReplicaProgressStatus = "Initializing"
	PreparingReplicaProgressStatus ReplicaProgressStatus = "Preparing"
	SynchronizingReplicaProgressStatus ReplicaProgressStatus = "Synchronizing"
	ResyncingReplicaProgressStatus ReplicaProgressStatus = "Resyncing"
	RestoringReplicaProgressStatus ReplicaProgressStatus = "Restoring"
	FracturingReplicaProgressStatus ReplicaProgressStatus = "Fracturing"
	SplittingReplicaProgressStatus ReplicaProgressStatus = "Splitting"
	FailingOverReplicaProgressStatus ReplicaProgressStatus = "FailingOver"
	FailingBackReplicaProgressStatus ReplicaProgressStatus = "FailingBack"
	DetachingReplicaProgressStatus ReplicaProgressStatus = "Detaching"
	AbortingReplicaProgressStatus ReplicaProgressStatus = "Aborting"
	MixedReplicaProgressStatus ReplicaProgressStatus = "Mixed"
	SuspendingReplicaProgressStatus ReplicaProgressStatus = "Suspending"
	RequiresFractureReplicaProgressStatus ReplicaProgressStatus = "RequiresFracture"
	RequiresResyncReplicaProgressStatus ReplicaProgressStatus = "RequiresResync"
	RequiresActivateReplicaProgressStatus ReplicaProgressStatus = "RequiresActivate"
	PendingReplicaProgressStatus ReplicaProgressStatus = "Pending"
	RequiresDetachReplicaProgressStatus ReplicaProgressStatus = "RequiresDetach"
	TerminatingReplicaProgressStatus ReplicaProgressStatus = "Terminating"
	RequiresSplitReplicaProgressStatus ReplicaProgressStatus = "RequiresSplit"
	RequiresResumeReplicaProgressStatus ReplicaProgressStatus = "RequiresResume"
)
type ReplicaReadOnlyAccess string
const (
	SourceElementReplicaReadOnlyAccess ReplicaReadOnlyAccess = "SourceElement"
	ReplicaElementReplicaReadOnlyAccess ReplicaReadOnlyAccess = "ReplicaElement"
	BothReplicaReadOnlyAccess ReplicaReadOnlyAccess = "Both"
)
type ReplicaRecoveryMode string
const (
	AutomaticReplicaRecoveryMode ReplicaRecoveryMode = "Automatic"
	ManualReplicaRecoveryMode ReplicaRecoveryMode = "Manual"
)
type ReplicaRole string
const (
	SourceReplicaRole ReplicaRole = "Source"
	TargetReplicaRole ReplicaRole = "Target"
)
type ReplicaState string
const (
	InitializedReplicaState ReplicaState = "Initialized"
	UnsynchronizedReplicaState ReplicaState = "Unsynchronized"
	SynchronizedReplicaState ReplicaState = "Synchronized"
	BrokenReplicaState ReplicaState = "Broken"
	FracturedReplicaState ReplicaState = "Fractured"
	SplitReplicaState ReplicaState = "Split"
	InactiveReplicaState ReplicaState = "Inactive"
	SuspendedReplicaState ReplicaState = "Suspended"
	FailedoverReplicaState ReplicaState = "Failedover"
	PreparedReplicaState ReplicaState = "Prepared"
	AbortedReplicaState ReplicaState = "Aborted"
	SkewedReplicaState ReplicaState = "Skewed"
	MixedReplicaState ReplicaState = "Mixed"
	PartitionedReplicaState ReplicaState = "Partitioned"
	InvalidReplicaState ReplicaState = "Invalid"
	RestoredReplicaState ReplicaState = "Restored"
)
type ReplicaType string
const (
	MirrorReplicaType ReplicaType = "Mirror"
	SnapshotReplicaType ReplicaType = "Snapshot"
	CloneReplicaType ReplicaType = "Clone"
	TokenizedCloneReplicaType ReplicaType = "TokenizedClone"
)
type ReplicaUpdateMode string
const (
	ActiveReplicaUpdateMode ReplicaUpdateMode = "Active"
	SynchronousReplicaUpdateMode ReplicaUpdateMode = "Synchronous"
	AsynchronousReplicaUpdateMode ReplicaUpdateMode = "Asynchronous"
	AdaptiveReplicaUpdateMode ReplicaUpdateMode = "Adaptive"
)
type UndiscoveredElement string
const (
	SourceElementUndiscoveredElement UndiscoveredElement = "SourceElement"
	ReplicaElementUndiscoveredElement UndiscoveredElement = "ReplicaElement"
)
type ReplicaInfo struct {
	ConsistencyEnabled bool
	ConsistencyState ConsistencyState
	ConsistencyStatus ConsistencyStatus
	ConsistencyType ConsistencyType
	dataProtectionLineOfService []string
	FailedCopyStopsHostIO bool
	PercentSynced int
	replica string
	ReplicaPriority ReplicaPriority
	ReplicaProgressStatus ReplicaProgressStatus
	ReplicaReadOnlyAccess ReplicaReadOnlyAccess
	ReplicaRecoveryMode ReplicaRecoveryMode
	ReplicaSkewBytes int64
	ReplicaState ReplicaState
	ReplicaType ReplicaType
	ReplicaUpdateMode ReplicaUpdateMode
	RequestedReplicaState ReplicaState
	SyncMaintained bool
	UndiscoveredElement UndiscoveredElement
	WhenActivated string
	WhenDeactivated string
	WhenEstablished string
	WhenSuspended string
	WhenSynced string
	WhenSynchronized string
}
func (replicainfo *ReplicaInfo) UnmarshalJSON(b []byte) error {
	type temp ReplicaInfo
	var t struct {
		temp
		DataProtectionLineOfService common.Links
		Replica                     common.Link
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*replicainfo = ReplicaInfo(t.temp)
	replicainfo.dataProtectionLineOfService = t.DataProtectionLineOfService.ToStrings()
	replicainfo.replica = string(t.Replica)
	return nil
}
type StorageReplicaInfo struct {
	common.Entity
	ODataContext string `json:"@odata.context"`
	ODataType string `json:"@odata.type"`
	Description string
}