How can I make an object transform to given position and rotation

For example, if I want to move my object to x=10, y=5, z=2 position and rotate to x=45, y=0, z=45 rotation, how will I be able to do this using the following code
transform.Translate(1f * Time.deltaTime, 0f, 0f);
for position and using this code

transform.Rotate (new Vector3 (15, 30, 45) * Time.deltaTime);
for rotation.

to rotate:

 transformObject.eulerAngles = Vector3(x,y,z) //x,y,z or Vector3 variable

to move:

transformObject.translate(x,y,z); //x,y,z or Vector3 variable

@Eudaimonium has correct answer too :slight_smile: but i prefer translate :smiley:

using UnityEngine;
using System.Collections;

public class CamTrack : MonoBehaviour {
	public GameObject Player;
	public GameObject Camera;
	public static int global; //global variable
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	void LateUpdate()
	{
		//Default position
		if (Camera.transform.position.x < Player.transform.position.x) //move right
		{
			transform.Translate(1f * Time.deltaTime, 0f, 0f);
		}

		if (Camera.transform.position.x > Player.transform.position.x) //move left
		{
			transform.Translate(-1f * Time.deltaTime, 0f, 0f);
		}
			
		if (Camera.transform.position.z < Player.transform.position.z + -3) //move front
		{
			transform.Translate(0f, 0f, 1f * Time.deltaTime);
		}

		if (Camera.transform.position.z > Player.transform.position.z + -3) //move back
		{
			transform.Translate(0f, 0f, -1f * Time.deltaTime);
		}

		if (Camera.transform.position.y < Player.transform.position.y + 1) //move up
		{
			transform.Translate(0f, 1f * Time.deltaTime, 0f);
		}

		if (Camera.transform.position.y > Player.transform.position.y + 1) //move down
		{
			transform.Translate(0f, -1f * Time.deltaTime, 0f);
		}
	}
}

This is what I wanted