agent/taskresource/asmsecret/asmsecret.go
func (secret *ASMSecretResource) MarshalJSON() ([]byte, error) {
	if secret == nil {
		return nil, errors.New("asmsecret resource is nil")
	}
	createdAt := secret.GetCreatedAt()
	return json.Marshal(ASMSecretResourceJSON{
		TaskARN:   secret.taskARN,
		CreatedAt: &createdAt,
		DesiredStatus: func() *ASMSecretStatus {
			desiredState := secret.GetDesiredStatus()
			s := ASMSecretStatus(desiredState)
			return &s
		}(),
		KnownStatus: func() *ASMSecretStatus {
			knownState := secret.GetKnownStatus()
			s := ASMSecretStatus(knownState)
			return &s
		}(),
		RequiredSecrets:        secret.getRequiredSecrets(),
		ExecutionCredentialsID: secret.getExecutionCredentialsID(),
	})
}
func (secret *ASMSecretResource) MarshalJSON() ([]byte, error) {
	if secret == nil {
		return nil, errors.New("asmsecret resource is nil")
	}
	createdAt := secret.GetCreatedAt()
	return json.Marshal(ASMSecretResourceJSON{
		TaskARN:   secret.taskARN,
		CreatedAt: &createdAt,
		DesiredStatus: func() *ASMSecretStatus {
			desiredState := secret.GetDesiredStatus()
			s := ASMSecretStatus(desiredState)
			return &s
		}(),
		KnownStatus: func() *ASMSecretStatus {
			knownState := secret.GetKnownStatus()
			s := ASMSecretStatus(knownState)
			return &s
		}(),
		RequiredSecrets:        secret.getRequiredSecrets(),
		ExecutionCredentialsID: secret.getExecutionCredentialsID(),
	})
}
// MarshalJSON serialises the ASMSecretResource struct to JSON