Skip to content

Commit

Permalink
Removed unused internal type getters (cadence-workflow#4852)
Browse files Browse the repository at this point in the history
  • Loading branch information
vytautas-karpavicius authored May 30, 2022
1 parent b457b55 commit 2408f9d
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 4,675 deletions.
252 changes: 0 additions & 252 deletions common/types/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,13 @@ func (v *AddSearchAttributeRequest) GetSearchAttribute() (o map[string]IndexedVa
return
}

// GetSecurityToken is an internal getter (TBD...)
func (v *AddSearchAttributeRequest) GetSecurityToken() (o string) {
if v != nil {
return v.SecurityToken
}
return
}

// DescribeClusterResponse is an internal type (TBD...)
type DescribeClusterResponse struct {
SupportedClientVersions *SupportedClientVersions `json:"supportedClientVersions,omitempty"`
MembershipInfo *MembershipInfo `json:"membershipInfo,omitempty"`
PersistenceInfo map[string]*PersistenceInfo `json:"persistenceInfo,omitempty"`
}

// GetSupportedClientVersions is an internal getter (TBD...)
func (v *DescribeClusterResponse) GetSupportedClientVersions() (o *SupportedClientVersions) {
if v != nil && v.SupportedClientVersions != nil {
return v.SupportedClientVersions
}
return
}

// GetMembershipInfo is an internal getter (TBD...)
func (v *DescribeClusterResponse) GetMembershipInfo() (o *MembershipInfo) {
if v != nil && v.MembershipInfo != nil {
return v.MembershipInfo
}
return
}

// AdminDescribeWorkflowExecutionRequest is an internal type (TBD...)
type AdminDescribeWorkflowExecutionRequest struct {
Domain string `json:"domain,omitempty"`
Expand All @@ -79,14 +55,6 @@ func (v *AdminDescribeWorkflowExecutionRequest) GetDomain() (o string) {
return
}

// GetExecution is an internal getter (TBD...)
func (v *AdminDescribeWorkflowExecutionRequest) GetExecution() (o *WorkflowExecution) {
if v != nil && v.Execution != nil {
return v.Execution
}
return
}

// AdminDescribeWorkflowExecutionResponse is an internal type (TBD...)
type AdminDescribeWorkflowExecutionResponse struct {
ShardID string `json:"shardId,omitempty"`
Expand All @@ -103,22 +71,6 @@ func (v *AdminDescribeWorkflowExecutionResponse) GetShardID() (o string) {
return
}

// GetHistoryAddr is an internal getter (TBD...)
func (v *AdminDescribeWorkflowExecutionResponse) GetHistoryAddr() (o string) {
if v != nil {
return v.HistoryAddr
}
return
}

// GetMutableStateInCache is an internal getter (TBD...)
func (v *AdminDescribeWorkflowExecutionResponse) GetMutableStateInCache() (o string) {
if v != nil {
return v.MutableStateInCache
}
return
}

// GetMutableStateInDatabase is an internal getter (TBD...)
func (v *AdminDescribeWorkflowExecutionResponse) GetMutableStateInDatabase() (o string) {
if v != nil {
Expand Down Expand Up @@ -147,14 +99,6 @@ func (v *GetWorkflowExecutionRawHistoryV2Request) GetDomain() (o string) {
return
}

// GetExecution is an internal getter (TBD...)
func (v *GetWorkflowExecutionRawHistoryV2Request) GetExecution() (o *WorkflowExecution) {
if v != nil && v.Execution != nil {
return v.Execution
}
return
}

// GetStartEventID is an internal getter (TBD...)
func (v *GetWorkflowExecutionRawHistoryV2Request) GetStartEventID() (o int64) {
if v != nil && v.StartEventID != nil {
Expand Down Expand Up @@ -195,29 +139,13 @@ func (v *GetWorkflowExecutionRawHistoryV2Request) GetMaximumPageSize() (o int32)
return
}

// GetNextPageToken is an internal getter (TBD...)
func (v *GetWorkflowExecutionRawHistoryV2Request) GetNextPageToken() (o []byte) {
if v != nil && v.NextPageToken != nil {
return v.NextPageToken
}
return
}

// GetWorkflowExecutionRawHistoryV2Response is an internal type (TBD...)
type GetWorkflowExecutionRawHistoryV2Response struct {
NextPageToken []byte `json:"nextPageToken,omitempty"`
HistoryBatches []*DataBlob `json:"historyBatches,omitempty"`
VersionHistory *VersionHistory `json:"versionHistory,omitempty"`
}

// GetNextPageToken is an internal getter (TBD...)
func (v *GetWorkflowExecutionRawHistoryV2Response) GetNextPageToken() (o []byte) {
if v != nil && v.NextPageToken != nil {
return v.NextPageToken
}
return
}

// GetHistoryBatches is an internal getter (TBD...)
func (v *GetWorkflowExecutionRawHistoryV2Response) GetHistoryBatches() (o []*DataBlob) {
if v != nil && v.HistoryBatches != nil {
Expand All @@ -239,45 +167,13 @@ type HostInfo struct {
Identity string `json:"Identity,omitempty"`
}

// GetIdentity is an internal getter (TBD...)
func (v *HostInfo) GetIdentity() (o string) {
if v != nil {
return v.Identity
}
return
}

// MembershipInfo is an internal type (TBD...)
type MembershipInfo struct {
CurrentHost *HostInfo `json:"currentHost,omitempty"`
ReachableMembers []string `json:"reachableMembers,omitempty"`
Rings []*RingInfo `json:"rings,omitempty"`
}

// GetCurrentHost is an internal getter (TBD...)
func (v *MembershipInfo) GetCurrentHost() (o *HostInfo) {
if v != nil && v.CurrentHost != nil {
return v.CurrentHost
}
return
}

// GetReachableMembers is an internal getter (TBD...)
func (v *MembershipInfo) GetReachableMembers() (o []string) {
if v != nil && v.ReachableMembers != nil {
return v.ReachableMembers
}
return
}

// GetRings is an internal getter (TBD...)
func (v *MembershipInfo) GetRings() (o []*RingInfo) {
if v != nil && v.Rings != nil {
return v.Rings
}
return
}

// PersistenceSetting is used to expose persistence engine settings
type PersistenceSetting struct {
Key string `json:"key"`
Expand Down Expand Up @@ -310,14 +206,6 @@ type ResendReplicationTasksRequest struct {
EndVersion *int64 `json:"endVersion,omitempty"`
}

// GetDomainID is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetDomainID() (o string) {
if v != nil {
return v.DomainID
}
return
}

// GetWorkflowID is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetWorkflowID() (o string) {
if v != nil {
Expand All @@ -342,137 +230,32 @@ func (v *ResendReplicationTasksRequest) GetRemoteCluster() (o string) {
return
}

// GetStartEventID is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetStartEventID() (o int64) {
if v != nil && v.StartEventID != nil {
return *v.StartEventID
}
return
}

// GetStartVersion is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetStartVersion() (o int64) {
if v != nil && v.StartVersion != nil {
return *v.StartVersion
}
return
}

// GetEndEventID is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetEndEventID() (o int64) {
if v != nil && v.EndEventID != nil {
return *v.EndEventID
}
return
}

// GetEndVersion is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetEndVersion() (o int64) {
if v != nil && v.EndVersion != nil {
return *v.EndVersion
}
return
}

// RingInfo is an internal type (TBD...)
type RingInfo struct {
Role string `json:"role,omitempty"`
MemberCount int32 `json:"memberCount,omitempty"`
Members []*HostInfo `json:"members,omitempty"`
}

// GetRole is an internal getter (TBD...)
func (v *RingInfo) GetRole() (o string) {
if v != nil {
return v.Role
}
return
}

// GetMemberCount is an internal getter (TBD...)
func (v *RingInfo) GetMemberCount() (o int32) {
if v != nil {
return v.MemberCount
}
return
}

// GetMembers is an internal getter (TBD...)
func (v *RingInfo) GetMembers() (o []*HostInfo) {
if v != nil && v.Members != nil {
return v.Members
}
return
}

type GetDynamicConfigRequest struct {
ConfigName string `json:"configName,omitempty"`
Filters []*DynamicConfigFilter `json:"filters,omitempty"`
}

func (v *GetDynamicConfigRequest) GetConfigName() (o string) {
if v != nil {
return v.ConfigName
}
return
}

func (v *GetDynamicConfigRequest) GetFilters() (o []*DynamicConfigFilter) {
if v != nil && v.Filters != nil {
return v.Filters
}
return
}

type GetDynamicConfigResponse struct {
Value *DataBlob `json:"value,omitempty"`
}

func (v *GetDynamicConfigResponse) GetValue() (o *DataBlob) {
if v != nil && v.Value != nil {
return v.Value
}
return
}

type UpdateDynamicConfigRequest struct {
ConfigName string `json:"configName,omitempty"`
ConfigValues []*DynamicConfigValue `json:"configValues,omitempty"`
}

func (v *UpdateDynamicConfigRequest) GetConfigName() (o string) {
if v != nil {
return v.ConfigName
}
return
}

func (v *UpdateDynamicConfigRequest) GetConfigValues() (o []*DynamicConfigValue) {
if v != nil && v.ConfigValues != nil {
return v.ConfigValues
}
return
}

type RestoreDynamicConfigRequest struct {
ConfigName string `json:"configName,omitempty"`
Filters []*DynamicConfigFilter `json:"filters,omitempty"`
}

func (v *RestoreDynamicConfigRequest) GetConfigName() (o string) {
if v != nil {
return v.ConfigName
}
return
}

func (v *RestoreDynamicConfigRequest) GetFilters() (o []*DynamicConfigFilter) {
if v != nil && v.Filters != nil {
return v.Filters
}
return
}

// AdminDeleteWorkflowRequest is an internal type (TBD...)
type AdminDeleteWorkflowRequest struct {
Domain string `json:"domain,omitempty"`
Expand Down Expand Up @@ -508,48 +291,13 @@ type AdminDeleteWorkflowResponse struct {
VisibilityDeleted bool `json:"visibilityDeleted,omitempty"`
}

func (v *AdminDeleteWorkflowResponse) GetHistoryDeleted() (o bool) {
if v != nil {
return v.HistoryDeleted
}
return
}

func (v *AdminDeleteWorkflowResponse) GetExecutionsDeleted() (o bool) {
if v != nil {
return v.ExecutionsDeleted
}
return
}

func (v *AdminDeleteWorkflowResponse) GetVisibilityDeleted() (o bool) {
if v != nil {
return v.VisibilityDeleted
}
return
}

type AdminMaintainWorkflowRequest = AdminDeleteWorkflowRequest
type AdminMaintainWorkflowResponse = AdminDeleteWorkflowResponse

type ListDynamicConfigRequest struct {
ConfigName string `json:"configName,omitempty"`
}

func (v *ListDynamicConfigRequest) GetConfigName() (o string) {
if v != nil {
return v.ConfigName
}
return
}

type ListDynamicConfigResponse struct {
Entries []*DynamicConfigEntry `json:"entries,omitempty"`
}

func (v *ListDynamicConfigResponse) GetEntries() (o []*DynamicConfigEntry) {
if v != nil && v.Entries != nil {
return v.Entries
}
return
}
Loading

0 comments on commit 2408f9d

Please sign in to comment.