def _make_credentials_property(name):
    """Helper method which generates properties.

    Used to access and set values on credentials property as if they were native
    attributes on the current object.

    Args:
      name: A string corresponding to the attribute being accessed on the
          credentials attribute of the object which will own the property.

    Returns:
      An instance of `property` which is a proxy for the `name` attribute on the
          credentials attribute of the object.
    """

    def get_credentials_value(self):
        return getattr(self.credentials, name)

    def set_credentials_value(self, value):
        setattr(self.credentials, name, value)

    return property(get_credentials_value, set_credentials_value)