code: func (d *ResourceData) Id() string {
  	var result string
  
  	if d.state != nil {
  		result = d.state.ID
  		if result == "" {
  			result = d.state.Attributes["id"]
  		}
  	}
  
  	if d.newState != nil {
  		result = d.newState.ID
  		if result == "" {
  			result = d.newState.Attributes["id"]
  		}
  	}
  
  	return result
  }
docs: // Id returns the ID of the resource.