code: 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(),
  	})
  }
docs: // MarshalJSON serialises the ASMSecretResource struct to JSON