Update templates to remove Response from the resource structs

pull/4653/head
Todd 2 years ago
parent 3c9415eb15
commit e03c6babd7

@ -30,8 +30,6 @@ type Account struct {
Attributes map[string]interface{} `json:"attributes,omitempty"`
ManagedGroupIds []string `json:"managed_group_ids,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type AccountReadResult struct {

@ -31,8 +31,6 @@ type Alias struct {
Type string `json:"type,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type AliasReadResult struct {

@ -31,8 +31,6 @@ type AuthMethod struct {
IsPrimary bool `json:"is_primary,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
AuthorizedCollectionActions map[string][]string `json:"authorized_collection_actions,omitempty"`
Response *api.Response
}
type AuthMethodReadResult struct {

@ -29,8 +29,6 @@ type AuthToken struct {
ApproximateLastUsedTime time.Time `json:"approximate_last_used_time,omitempty"`
ExpirationTime time.Time `json:"expiration_time,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type AuthTokenReadResult struct {

@ -31,8 +31,6 @@ type CredentialLibrary struct {
AuthorizedActions []string `json:"authorized_actions,omitempty"`
CredentialType string `json:"credential_type,omitempty"`
CredentialMappingOverrides map[string]interface{} `json:"credential_mapping_overrides,omitempty"`
Response *api.Response
}
type CredentialLibraryReadResult struct {

@ -29,8 +29,6 @@ type Credential struct {
Type string `json:"type,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type CredentialReadResult struct {

@ -30,8 +30,6 @@ type CredentialStore struct {
Attributes map[string]interface{} `json:"attributes,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
AuthorizedCollectionActions map[string][]string `json:"authorized_collection_actions,omitempty"`
Response *api.Response
}
type CredentialStoreReadResult struct {

@ -29,8 +29,6 @@ type Group struct {
MemberIds []string `json:"member_ids,omitempty"`
Members []*Member `json:"members,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type GroupReadResult struct {

@ -35,8 +35,6 @@ type HostCatalog struct {
SecretsHmac string `json:"secrets_hmac,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
AuthorizedCollectionActions map[string][]string `json:"authorized_collection_actions,omitempty"`
Response *api.Response
}
type HostCatalogReadResult struct {

@ -36,8 +36,6 @@ type Host struct {
ExternalId string `json:"external_id,omitempty"`
ExternalName string `json:"external_name,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type HostReadResult struct {

@ -34,8 +34,6 @@ type HostSet struct {
SyncIntervalSeconds int32 `json:"sync_interval_seconds,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type HostSetReadResult struct {

@ -30,8 +30,6 @@ type ManagedGroup struct {
Attributes map[string]interface{} `json:"attributes,omitempty"`
MemberIds []string `json:"member_ids,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type ManagedGroupReadResult struct {

@ -29,8 +29,6 @@ type Policy struct {
Version uint32 `json:"version,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type PolicyReadResult struct {

@ -33,8 +33,6 @@ type Role struct {
GrantStrings []string `json:"grant_strings,omitempty"`
Grants []*Grant `json:"grants,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type RoleReadResult struct {

@ -30,8 +30,6 @@ type Scope struct {
AuthorizedActions []string `json:"authorized_actions,omitempty"`
AuthorizedCollectionActions map[string][]string `json:"authorized_collection_actions,omitempty"`
StoragePolicyId string `json:"storage_policy_id,omitempty"`
Response *api.Response
}
type ScopeReadResult struct {

@ -38,8 +38,6 @@ type SessionRecording struct {
AuthorizedActions []string `json:"authorized_actions,omitempty"`
RetainUntil time.Time `json:"retain_until,omitempty"`
DeleteAfter time.Time `json:"delete_after,omitempty"`
Response *api.Response
}
type SessionRecordingReadResult struct {

@ -37,8 +37,6 @@ type Session struct {
TerminationReason string `json:"termination_reason,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Connections []*Connection `json:"connections,omitempty"`
Response *api.Response
}
type SessionReadResult struct {

@ -37,8 +37,6 @@ type StorageBucket struct {
SecretsHmac string `json:"secrets_hmac,omitempty"`
WorkerFilter string `json:"worker_filter,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
Response *api.Response
}
type StorageBucketReadResult struct {

@ -43,8 +43,6 @@ type Target struct {
Address string `json:"address,omitempty"`
Aliases []*Alias `json:"aliases,omitempty"`
WithAliases []*Alias `json:"with_aliases,omitempty"`
Response *api.Response
}
type TargetReadResult struct {

@ -33,8 +33,6 @@ type User struct {
FullName string `json:"full_name,omitempty"`
Email string `json:"email,omitempty"`
PrimaryAccountId string `json:"primary_account_id,omitempty"`
Response *api.Response
}
type UserReadResult struct {

@ -10,8 +10,6 @@ import (
type CertificateAuthority struct {
Certs []*Certificate `json:"certs,omitempty"`
Response *api.Response
}
type CertificateAuthorityReadResult struct {

@ -39,8 +39,6 @@ type Worker struct {
DirectlyConnectedDownstreamWorkers []string `json:"directly_connected_downstream_workers,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
LocalStorageState string `json:"local_storage_state,omitempty"`
Response *api.Response
}
type WorkerReadResult struct {

@ -719,9 +719,7 @@ import (
type {{ .Name }} struct { {{ range .Fields }}
{{ .Name }} {{ .FieldType }} `, "`json:\"{{ .ProtoName }}{{ if ( ne ( len ( .JsonTags ) ) 0 ) }},{{ stringsjoin .JsonTags \",\" }}{{ end }}{{ if ( not .AllowEmpty ) }},omitempty{{ end }}\"`", `{{ end }}
{{ if ( not ( eq ( len ( .CreateResponseTypes ) ) 0 ) )}}
Response *api.Response
{{ else if ( eq .Name "Error" ) }}
{{ if ( eq .Name "Error" ) }}
response *Response
{{ end }}
}

Loading…
Cancel
Save